[Mapserver-users] PHP problem

Daniel Morissette morissette at dmsolutions.ca
Wed Apr 9 11:15:49 EDT 2003


Jehng-Jung Kao wrote:
> 
> I successfully installed
>    (--with-regex=system; actually, this option does
>    not work with apache-1.3.27, it will automatically change it
>    back to 'php' with this option.
>    I finally get it working by editing the 'configure' file
>    to force it use 'system.')
> 

AFAIK the --with-regex=system doesn't work with Apache *only*when* you
also compile using --with-apxs.  However, for php_mapscript you need PHP
compiled as a CGI which means that you should not use --with-apxs.  If
you don't use --with-apxs to configure your PHP then it should honour
your request to use the system regex.

> But while I try to (from a IE browser) execute a php file with this command:
> 
>  if(! dl('php_mapscript.so')) { die ('Not loaded\n');}
> 
> it does not work. (with an error message
>     "...cannot open shared object file: No such file or directory...")
> 

Can you please copy the complete error message, the path that you
stripped off the quoted error message above probably contains important
hints to resolve this mystery.  Also check the apache error_log, it may
tell you why the php_mapscript.so couldn't load.

> However, when I execute the php file locally on my linux, it works,
>   'php_mapscript.so' is loaded.
> 
> Also, I notice that while I execute the php file on IE,
>   the /usr/local/lib/php.ini was not loaded, although phpinfo() shows
>   the correct configure file path to "/usr/local/lib."
>   (quite strange to me.)
> 

Is the php.ini file ( and the directories leading to it) readable by the
user running the apache process?  

Also, it is possible that your phpinfo() script gets run by a PHP SAPI
module that was already preinstalled on your system, which is different
from the php that you run at the command line.  To verify that, check
that you see "Server API:  CGI" in your phpinfo output.

I hope that helps

Daniel
-- 
------------------------------------------------------------
 Daniel Morissette               morissette at dmsolutions.ca
 DM Solutions Group              http://www.dmsolutions.ca/
------------------------------------------------------------



More information about the mapserver-users mailing list