Jump to content

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


edfialk

Recommended Posts

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());[/code]


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
[/code]

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 )[/code]

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
Link to comment
Share on other sites

First off 755 should suffice for that file '/usr/lib64/php4/php_mapscript.so'.

Secondly, you need to check the permissions of /usr/lib64/php4, and /usr/lib64/
If these are chmod'd 744 for example, the file files inside cannot be read/executed.

Put together a simple php script to see if apache can read/execute '/usr/lib64/php4/php_mapscript.so'

-steve
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.