php/mapscript Unable to load dynamic library php_mapscript.so

=?GB2312?Q?feigle_Dou?= feigle at 126.COM
Tue Jun 19 09:05:54 EDT 2007


Hi=A3=ACAll ,
I am trying  to install php as a php/mpscript of mapserver . but when I t=
est=20
it , there is a warning :
=A1=B0Warning: dl() [function.dl]: Unable to load dynamic=20
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 suc=
h=20
file or directory in /var/www/html/mytest.php on line 3=A1=B1


The following is what I have done:
1=09My OS is Fedora Core 5 i386 , It has php preinstalled so I uninstall =
it=20
Rpm =A8Cq php =A8Cnodeps
2=09Install all the libraries in /usr/local/, such as gdal proj =A1=AD
3=09Install php in /usr/local/php5 . The version of php is php-5.2.2
./configure =A8Cenable-share=20=20
--with-regex=3Dsystem=20=20
--with-gd=3D/usr/local=20=20
--enable-force-cgi-redirect
--enable-dbase
--with-config-file-path=3D/usr/local/php5
--prefix=3D/usr/local/php5
Make=20
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=3D=A1=B1/usr/local/php5/lib/php/extensions=A1=B1
extension =3D =A1=B0php_mapscript.so=A1=B1
4   configure and install mapserver
   ./configure  =A8Cwith-org=3D/usr/local/bin/gdal-config
              --with-gdal=3D/usr/local/bin/gdal-config
              --with-httpd=3D/usr/sbin/httpd
              --with-proj=3D/usr/local
              --with-freetype=3D/usr/
              --with-gd=3D/usr/local
              --with-php=3D/usr/local/php5
  Make
=20=20
  Cp ./mapscript/php3/php_mapscrpt.so   /usr/local/php5/lib/php/extension=
s/
  /sbin/ldconfig =A8Cv
  /sbin/ldconfig  /usr/local =A8Cv
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=20
<?php
dl(=A1=B0php_mapscript.so=A1=B1);
phpinfor();
?>
It will show the warning message .
Can you give me some idea?

Any help will be appreciated,

Thanks a million!!

Best wishes,
feigle



More information about the mapserver-users mailing list