Mapscript PHP Error - failed to map segment from shared object
dbkeon.ml at GMAIL.COM
Mon Mar 21 14:46:38 EST 2005
On 03/21/2005 11:02 AM, Troy R. Johnson wrote:
> Hi folks, hopefully someone can help me here.
> I'm trying to get the php_mapscript.so working under Fedora core 3.
> So far I've downloaded PHP version 4.3.9 and compiled it.
> I did a make install for php. This installed php to /usr/local/bin/
> Then I compiled Mapserver 4.4.1
>>From the command line things seem to work just fine. I can do the following:
> /usr/local/bin/php phpinfo_mapscript.phtml > test.html
> and test.html shows that the MapScript is loaded. Other test also seem to work from the command line.
> However when I try to run this file through a browser I get the following error:
> [Mon Mar 21 11:42:14 2005] [error] [client 172.31.18.130] PHP Warning: dl(): Unable to load dynamic library '/usr/lib/php4/php_mapscript.so' - /usr/lib/php4/php_mapscript.so: failed to map segment from shared object: Permission denied in /var/www/html/phpinfo_mapscript.phtml on line 21
> To set the web server up for php I did the following:
> created a new php.conf file with only these two lines:
> AddHandler phtml-script .phtml
> Action phtml-script /cgi-bin/php.sh
> in my cgi-bin directory, php.sh contains the following:
> export SCRIPT_FILENAME=$PATH_TRANSLATED
Did you edit the extension_dir setting in php.ini? You need to set it
to the directory where you store your PHP extensions, then either copy
or link php_mapscript.so to that directory. It looks like you currently
have extension_dir set to /usr/lib/php4.
More information about the mapserver-users