Segmentation fault: PHP Mapscript related?

BC Rocks bcrocks at GMAIL.COM
Wed Apr 13 16:28:54 EDT 2005


Thanks Toomas,

I tried what you suggested:  PHP and Mapserver are explicitly using
--with-gd=/usr/local
but I still segfault.  I even tried compiling PHP with no GD support,
but no luck (segfault).  FYI, I did have 2 versions of GD installed,
but I uninstalled one and am left with gd-2.0.33.  Still segfaulting

BTW, here is my GDAL config (just in case there are other blatent
conflicting libraries I am overlooking):
./configure --enable-shared --with-png=/usr/lib --with-jpeg=/usr/lib
--with-pg=/var/lib/pgsql/bin/pg_config --with-geos=yes
--with-libtiff=/usr/local/lib --with-geotiff=yes --with-ecw=yes
(ecw did not work)

Any other thoughts?


Thanks,
BC

On 4/13/05, Toomas Aas <toomas.aas at raad.tartu.ee> wrote:
> BC Rocks wrote:
> 
> > PHP was configured as follows (as I am successfully using on another
> > box): ./configure --build=i686-mandrake-linux-gnu --prefix=/usr
> > --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin
> > --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include
> > --libdir=/usr/lib --libexecdir=/usr/lib --localstatedir=/var/lib
> > --sharedstatedir=/usr/com --mandir=/usr/share/man
> > --infodir=/usr/share/info --enable-discard-path
> > --enable-force-cgi-redirect --enable-shared --disable-static
> > --disable-debug --disable-rpath --enable-pic
> > --enable-inline-optimization --enable-memory-limit
> > --with-config-file-path=/etc --with-config-file-scan-dir=/etc/php
> > --with-pear=/usr/share/pear --enable-magic-quotes --enable-debugger
> > --enable-track-vars --with-exec-dir=/usr/bin --with-versioning
> > --with-mod_charset --with-regex=php --enable-track-vars
> > --enable-trans-sid --enable-safe-mode --enable-ctype --enable-ftp
> > --with-gettext=/usr --enable-posix --enable-session --enable-sysvsem
> > --enable-sysvshm --enable-yp --with-openssl=/usr --without-kerberos
> > --with-ttf --with-freetype-dir=/usr/include/freetype2
> > --with-zlib=/usr --with-zlib=/usr --with-zlib-dir=/usr --with-pear
> > --with-jpeg-dir=/usr --with-png-dir=/usr --with-gd
> > --enable-gd-native-ttf --with-pgsql=/var/lib/pgsql/ --without-iodbc
> > --without-custom-odbc --without-unixODBC --without-dbmaker
> > --enable-soap --with-xml=/usr/include/libxml2/libxml
> > --with-apxs2=/usr/sbin/apxs2 --with-mcrypt=/usr/local/lib
> > --with-curl=/usr/local/include
> >
> > Mapserver configure parameters are as follows: ./configure
> > --with-php=/usr/include/php
> > --with-php-regex-dir=/usr/src/php/php-5.0.4/regex
> > --with-jpeg=/usr/lib --with-png=/usr/lib
> > --with-freetype=/usr/bin/freetype-config --with-proj --with-gd
> > --without-pdf --with-geos=/usr/local/bin/geos-config --with-gdal
> > --with-postgis=/var/lib/pgsql/bin/pg_config --without-tiff
> > --with-wmsclient --with-wfsclient --with-wcs
> > --with-curl-config=/usr/bin --with-ogr --with-httpd=/usr/sbin/httpd2
> 
> I notice that you have used --with-gd both when compiling PHP and Mapserver.
> 
> Actually, you should use something like --with-gd=/usr when compiling
> PHP. Otherwise PHP gets compiled with it's bundled version of GD, and
> php_mapscript.so gets compiled with whatever version of GD is found at
> build time. If these versions don't match exactly, nasty things can happen.
> 
> Substitute the real path where GD is installed instead of /usr, of course.
> 
> To be really sure, use the same path when compiling Mapserver. If you
> have only one version of GD installed on your system, it shouldn't
> matter, but better safe than sorry.
> 
> > I read some threads with regard to GDAL and JPG/TIFF issues (I did
> > try using the internal GDAL libs), but I don't think that is the
> > issue... especially since if I pull the php, things compile.
> 
> This seems a likely indication of conflicting GD versions between PHP
> and Mapserver.
> 
> --
> Toomas
>



More information about the mapserver-users mailing list