[Mapserver-users] Shared library error with PHP MapScript

Doug ummmmm at myrealbox.com
Wed Jul 28 12:24:58 PDT 2004


Daryl Herzmann wrote:

 > Howdy,
 >
 > I will take a stab...
 >
 > On Wed, 28 Jul 2004, Doug wrote:
 >
 >> Fedora Core 2, Apache 2, PHP 4.3.8, PHP-MapScript 4.2.1.
 >>
 >> When we dl("php_mapscript.so") in a test php file, we get:
 >>
 >> PHP Warning: dl(): Unable to load dynamic library
 >> '/usr/lib/php4/php_mapscript.so' - libpq.so.3: cannot open shared
 >> object file: No such file or directory in /var/www/html/test.php on
 >> line 2
 >>
 >> in Apache's error log. But when we run the same file from the
 >> command-line (php test.php), there is no error and the MapScript
 >> section of phpinfo() is displayed fine.
 >>
 >> Also, ldd/usr/lib/php4/php_ mapscript.so seems to show no problems
 >> with any of its .so files, including libpq.so.3.
 >
 >
 > Where is libpq.so.3 located on the system?  Is it /usr/local/pgsql/lib/ ?

Yes.

 > Can the user that apache is running as have permissions to see this file?

Aargh!  Now that's stupid.  I had already looked at the specific file's 
permissions, and they were fine, as they were for /usr/local/pgsql/lib. 
  But they weren't for /usr/local/pgsql.  Fixed that, and my test page 
worked.  Thanks for getting me to look again.  <Kick, kick>

 >
 > Just for kicks, run the locate command see if there are any other libs
 > hanging out on the system
 >
 > locate libpq.so.3
 > locate php_mapscript.so
 >
 > HTH,
 >   daryl
 >



More information about the MapServer-users mailing list