473,395 Members | 1,681 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

extension loading works in command-line, but not Apache browser

Hi, all I'm trying to do is load the php_mapscript.so library into php.

Here's the php file:
Code:

dl("php_mapscriot.so")
if (extension_loaded("MapScript"))
echo "works!";
else
echo "doesn't work!";
print_r(get_loaded_extensions());

Here's from the command line:
Code:

[edfialk@niceguy mapserver]$ php phpinfo.php
<HTML>
works!
<br>Array
(
[0] =yp [1] =xml [2] =wddx [3] =tokenizer [4]
=sysvshm [5] =sysvsem [6] =>standard [7] =sockets [8]
=shmop [9] =session [10] =pspell [11] =posix [12]
=>pcre [13] =pcntl [14] =overload [15] =mime_magic
[16] =iconv [17] =gmp [18] =gettext [19] =ftp [20]
=exif [21] =dio [22] =dbx [23] =dba [24] =curl
[25] =ctype [26] =calendar [27] =bz2 [28] =bcmath
[29] =zlib [30] =openssl [31] =MapScript [32] =gd
[33] =ldap
)
<br>
Config file:/etc/php.ini
Here's from the browser:
(http://niceguy.wustl.edu/mapserver/phpinfo.php):
Code:

Warning: dl(): Unable to load dynamic library
'/usr/lib64/php4/php_mapscript.so' - /usr/lib64/php4/php_mapscript.so:
cannot open shared object file: Permission denied in
/var/www/html/mapserver/phpinfo.php on line 22
doesn't work!
Array ( [0] =yp [1] =xml [2] =wddx [3] =tokenizer [4] =>
sysvshm [5] =sysvsem [6] =standard [7] =sockets [8] =shmop [9]
=session [10] =pspell [11] =posix [12] =pcre [13] =overload
[14] =mime_magic [15] =iconv [16] =gmp [17] =gettext [18] =>
ftp [19] =exif [20] =dio [21] =dbx [22] =dba [23] =curl [24]
=ctype [25] =calendar [26] =bz2 [27] =bcmath [28] =zlib [29]
=openssl [30] =apache2handler [31] =gd [32] =ldap )
RAWR Permission denied?! Apache is run as 'nobody', the
php_mapscript.so has 777 permissions, user/group root/root.

I'm pretty desperate about this.
Anyone have any ideas?

Thanks in advance!
-Ed

Jan 19 '07 #1
3 2737
oeb
edfialk wrote:
Hi, all I'm trying to do is load the php_mapscript.so library into php.

Here's the php file:
Code:

dl("php_mapscriot.so")
if (extension_loaded("MapScript"))
echo "works!";
else
echo "doesn't work!";
print_r(get_loaded_extensions());

Here's from the command line:
Code:

[edfialk@niceguy mapserver]$ php phpinfo.php
<HTML>
works!
<br>Array
(
[0] =yp [1] =xml [2] =wddx [3] =tokenizer [4]
=sysvshm [5] =sysvsem [6] =>standard [7] =sockets [8]
=shmop [9] =session [10] =pspell [11] =posix [12]
=>pcre [13] =pcntl [14] =overload [15] =mime_magic
[16] =iconv [17] =gmp [18] =gettext [19] =ftp [20]
=exif [21] =dio [22] =dbx [23] =dba [24] =curl
[25] =ctype [26] =calendar [27] =bz2 [28] =bcmath
[29] =zlib [30] =openssl [31] =MapScript [32] =gd
[33] =ldap
)
<br>
Config file:/etc/php.ini
Here's from the browser:
(http://niceguy.wustl.edu/mapserver/phpinfo.php):
Code:

Warning: dl(): Unable to load dynamic library
'/usr/lib64/php4/php_mapscript.so' - /usr/lib64/php4/php_mapscript.so:
cannot open shared object file: Permission denied in
/var/www/html/mapserver/phpinfo.php on line 22
doesn't work!
Array ( [0] =yp [1] =xml [2] =wddx [3] =tokenizer [4] =>
sysvshm [5] =sysvsem [6] =standard [7] =sockets [8] =shmop [9]
=session [10] =pspell [11] =posix [12] =pcre [13] =overload
[14] =mime_magic [15] =iconv [16] =gmp [17] =gettext [18] =>
ftp [19] =exif [20] =dio [21] =dbx [22] =dba [23] =curl [24]
=ctype [25] =calendar [26] =bz2 [27] =bcmath [28] =zlib [29]
=openssl [30] =apache2handler [31] =gd [32] =ldap )
RAWR Permission denied?! Apache is run as 'nobody', the
php_mapscript.so has 777 permissions, user/group root/root.

I'm pretty desperate about this.
Anyone have any ideas?

Thanks in advance!
-Ed
I don't know if it is relevant, but from
http://ie.php.net/dl

"As of PHP 5, the dl() function is deprecated in every SAPI except CLI.
Use Extension Loading Directives method instead."

oeb
Jan 19 '07 #2
Thanks oeb, but I'm actually using 4.3.9

Jan 19 '07 #3
On 19 Jan 2007 08:54:00 -0800, "edfialk" <ed*****@gmail.comwrote:
>Here's from the browser:
(http://niceguy.wustl.edu/mapserver/phpinfo.php):
I just had a look, and you appear to have the extension loaded twice now -
lots of warnings about it not being able to re-register functions and
constants, but MapScript appears later in the phpinfo output...

--
Andy Hassall :: an**@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Jan 19 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Lee Stewart | last post by:
I've got an extension that I coded as a DLL in Windows and can use the dl() function to load it with no problem. This makes my test functions available and everything works fine. I'd like to...
9
by: timothy.williams | last post by:
Hi. I trying to write an extension module to call some C libraries so I can use them in Python. Several of the library functions pass pointers to structures as arguments. I was thinking that I...
0
by: phpnube | last post by:
I used this php package to install on my system... PHP 5.0.0 installer - 26 July 2004 (CGI only, packaged as Windows installer to install and configure PHP, and automatically configure IIS, PWS...
0
by: neilgg | last post by:
I'm trying to write an IAS Extension DLL using some managed code to do the authentication. I've created a mixed-mode DLL, as IAS need standard DLL export functions called RadiusExtensionInit,...
1
by: Andy G | last post by:
I hate to post just a general error like this but one of my clients that coded this system is getting an error when loading a page. I know that you can't point out the specific problem so forget...
2
by: Rob | last post by:
I was working on a project and everything was going fine, then all of a sudden the form set as my startup object stopped loading. I tried setting some others as the startup object, and some of my...
0
by: lushdog | last post by:
Hi, i'm writing a shell extension in c# that will add two menu's to the right-click menu of explorer if any file is selected, i.e. it's registered in the * section of Classes in the registry. ...
1
by: tyler | last post by:
I've written a small python extension but I'm having difficulty loading it at runtime. The source for my extension is a module which is a member of a package is organized as follows. ...
0
by: anujseth76 | last post by:
Hi, This might be slightly off topic and but i am hoping someone here can help. I am trying to build a python wrapper for some C++ classes that access oracle. when i try loading the module i...
5
by: malkarouri | last post by:
Hi everyone, Is it possible to write a Python extension that uses the Boehm garbage collector? I have a C library written that makes use of boehm-gc for memory management. To use that, I have...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.