[mapserver-users] libgdal error with php/MapScript

2009-01-08 Thread Jacolin Yves
Hello,

I get an error when loading php_mapscript.so in my apache config.

Here is my config:
* Centos 4 (in an openvz system)
* PHP 4.3.9 (with GD 2.0.28)
* Apache 2
* GD 2.0.35
* AGG 2.4
* Mapserver 5.2.1
* geos 3.0.3
* gdal-ogr 1.6.0
* proj 4.6.1

MapServer configure:
./configure 
--with-agg=/usr/local/src/build/agg-2.4 
--with-postgis 
--with-wmsclient --with-wfsclient 
--with-geos --with-proj --with-gdal=/usr/local/bin/gdal-config 
--with-ogr=/usr/local/bin/gdal-config 
--with-php=/usr/include/php/
--with-freetype=/usr/bin/freetype-config --with-eppl --with-xpm=/usr/X11R6/lib/ 
--with-gd=/usr/local/ --with-python

GDAL-OGR configure:
./configure 
--with-python 
--with-pg=/usr/local/pgsql/bin/pg_config
--without-grass

After installing all dependance and set up php config to enable php_mapscript, 
I try to look if php/mapscript is really enabled:
$ php -i | grep mapscript
give:
PHP Warning:  Unknown(): Unable to load dynamic 
library '/usr/lib/php4/php_mapscript.so' - libgdal.so.1: cannot open shared 
object file: No such file or directory in Unknown on line 0
/etc/php.d/mapscript.ini

There is no mapscript table in phpinfo() function.

Any tips to find a solution?

Thanks in advance.

Y.
-- 
Yves Jacolin
---
http://softlibre.gloobe.org
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] libgdal error with php/MapScript

2009-01-08 Thread Daniel Morissette

Jacolin Yves wrote:

... --with-gdal=/usr/local/bin/gdal-config ...



[...]

PHP Warning:  Unknown(): Unable to load dynamic 
library '/usr/lib/php4/php_mapscript.so' - libgdal.so.1: cannot open shared 
object file: No such file or directory in Unknown on line 0

/etc/php.d/mapscript.ini



Your libgdal.so.1 is installed in /usr/local/lib. You need to make sure 
that directory is in the system's library path. The simple way to do 
that is to add /usr/local/lib to the file /etc/ld.so.conf and then run 
/sbin/ldconfig as root to update the runtime linker's cache.


Daniel
--
Daniel Morissette
http://www.mapgears.com/
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] libgdal error with php/MapScript

2009-01-08 Thread Jacolin Yves
Le Thursday 08 January 2009 15:39:14 Alan Boudreault, vous avez écrit :
 Yves,

 Did you look is there is any  libgdal.so* file in the lib directory?
 If there's one... but it's not named libgdal.so.1  maybe you could
 try to make a symbolic link to it.

 Alan

Alan,

the libgdal.so.1 exist, ls /usr/local/lib/libgdal* gives:
/usr/local/lib/libgdal.a  
/usr/local/lib/libgdal.la  
/usr/local/lib/libgdal.so  
/usr/local/lib/libgdal.so.1  
/usr/local/lib/libgdal.so.1.13.0

thanks

Y.
-- 
Yves Jacolin
---
http://softlibre.gloobe.org
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] libgdal error with php/MapScript

2009-01-08 Thread Jacolin Yves
Le Thursday 08 January 2009 15:39:14 Daniel Morissette, vous avez écrit :
 Jacolin Yves wrote:
  ... --with-gdal=/usr/local/bin/gdal-config ...

 [...]

  PHP Warning:  Unknown(): Unable to load dynamic
  library '/usr/lib/php4/php_mapscript.so' - libgdal.so.1: cannot open
  shared object file: No such file or directory in Unknown on line 0
  /etc/php.d/mapscript.ini

 Your libgdal.so.1 is installed in /usr/local/lib. You need to make sure
 that directory is in the system's library path. The simple way to do
 that is to add /usr/local/lib to the file /etc/ld.so.conf and then run
 /sbin/ldconfig as root to update the runtime linker's cache.

 Daniel
Daniel,

/etc/ld.so.conf and ldconfig command was already edited or run :(

I am building PHP5 to see if this changes something,

Thanks anyway,

Y.
-- 
Yves Jacolin
---
http://softlibre.gloobe.org
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] libgdal error with php/MapScript

2009-01-08 Thread Jacolin Yves
Le Thursday 08 January 2009 15:57:01 Guillaume Sueur, vous avez écrit :
 Can't it comes from an external lib dynamiccaly linked to gdal, like
 Ecwlib or other ? did you try to call your php page from the command
 line, which can give more information on missing dependancies ?

 regards,

 Guillaume

 Jacolin Yves a écrit :
  Le Thursday 08 January 2009 15:39:14 Daniel Morissette, vous avez écrit :
  Jacolin Yves wrote:
  ... --with-gdal=/usr/local/bin/gdal-config ...
 
  [...]
 
  PHP Warning:  Unknown(): Unable to load dynamic
  library '/usr/lib/php4/php_mapscript.so' - libgdal.so.1: cannot open
  shared object file: No such file or directory in Unknown on line 0
  /etc/php.d/mapscript.ini
 
  Your libgdal.so.1 is installed in /usr/local/lib. You need to make sure
  that directory is in the system's library path. The simple way to do
  that is to add /usr/local/lib to the file /etc/ld.so.conf and then run
  /sbin/ldconfig as root to update the runtime linker's cache.
 
  Daniel
 
  Daniel,
 
  /etc/ld.so.conf and ldconfig command was already edited or run :(
 
  I am building PHP5 to see if this changes something,
 
  Thanks anyway,
 
  Y.

Sorry to Guillaume and Daniel :)

I built php5 and tested it: same problem. I realised that I stoped to test php 
with command line ;) and indeed php -i | grep mapscript send same issue.

Daniel, I tried again to run ldconfig and it is now working!

The problem was resolved by removing the build file  
in /etc/ld.so.conf/build containing /usr/local/lib/ and adding this dir 
directly in /etc/ld.so.conf (include command inside doesn't seems 
working !)

Many thanks to all,

Y.
-- 
Yves Jacolin
---
http://softlibre.gloobe.org
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] libgdal error with php/MapScript

2009-01-08 Thread Guillaume Sueur
Can't it comes from an external lib dynamiccaly linked to gdal, like
Ecwlib or other ? did you try to call your php page from the command
line, which can give more information on missing dependancies ?

regards,

Guillaume

Jacolin Yves a écrit :
 Le Thursday 08 January 2009 15:39:14 Daniel Morissette, vous avez écrit :
 Jacolin Yves wrote:
 ... --with-gdal=/usr/local/bin/gdal-config ...
 [...]

 PHP Warning:  Unknown(): Unable to load dynamic
 library '/usr/lib/php4/php_mapscript.so' - libgdal.so.1: cannot open
 shared object file: No such file or directory in Unknown on line 0
 /etc/php.d/mapscript.ini
 Your libgdal.so.1 is installed in /usr/local/lib. You need to make sure
 that directory is in the system's library path. The simple way to do
 that is to add /usr/local/lib to the file /etc/ld.so.conf and then run
 /sbin/ldconfig as root to update the runtime linker's cache.

 Daniel
 Daniel,
 
 /etc/ld.so.conf and ldconfig command was already edited or run :(
 
 I am building PHP5 to see if this changes something,
 
 Thanks anyway,
 
 Y.


___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users