Hi,All ,
I am trying to install php as a php/mpscript of mapserver . but when I test
it , there is a warning :
“Warning: dl() [function.dl]: Unable to load dynamic
library '/usr/local/php5/lib/php/extensions/no-debug-non-zts-
20060613/php_mapscript.so' - /usr/local/php5/lib/php/extensions/no-debug-
non-zts-20060613/php_mapscript.so: cannot open shared object file: No such
file or directory in /var/www/html/mytest.php on line 3”
The following is what I have done:
1 My OS is Fedora Core 5 i386 , It has php preinstalled so I uninstall it
Rpm �Cq php �Cnodeps
2 Install all the libraries in /usr/local/, such as gdal proj …
3 Install php in /usr/local/php5 . The version of php is php-5.2.2
./configure �Cenable-share
--with-regex=system
--with-gd=/usr/local
--enable-force-cgi-redirect
--enable-dbase
--with-config-file-path=/usr/local/php5
--prefix=/usr/local/php5
Make
Meke test
Make install
Cp sapi/cgi/php /var/www/cgi-bin/php
Cp php.ini-dist /usr/local/lib/php.ini
Vi php.ini
# Add two line :
extension_dit=”/usr/local/php5/lib/php/extensions”
extension = “php_mapscript.so”
4 configure and install mapserver
./configure �Cwith-org=/usr/local/bin/gdal-config
--with-gdal=/usr/local/bin/gdal-config
--with-httpd=/usr/sbin/httpd
--with-proj=/usr/local
--with-freetype=/usr/
--with-gd=/usr/local
--with-php=/usr/local/php5
Make
Cp ./mapscript/php3/php_mapscrpt.so /usr/local/php5/lib/php/extensions/
/sbin/ldconfig �Cv
/sbin/ldconfig /usr/local �Cv
Then I run ./mapserv
It works well
Cp mapserv /var/www/cgi-bin/
# Vi httpd.conf
# Add lines as followed
AddTpye application/x-httpd-php .phtml
Action php-sctipt /cgi-bin/php
AddHandler php-script .php
But when vi a file mytest.php in DormentRoot
<?php
dl(“php_mapscript.so”);
phpinfor();
?>
It will show the warning message .
Can you give me some idea?
Any help will be appreciated,
Thanks a million!!
Best wishes,
feigle