[mapserver-users] Help: MS 3.5 PHP3 MapScript Install

Stephen Woodbridge woodbri at swoodbridge.com
Fri Jan 4 23:58:07 EST 2002


OK, So I read that before and my system had mod_so so I thought it was
OK, but I guess not. That's OK, I decided to built a newer apache with
DSO and fought through a plague of problems and finally got apache and
php3 working as DSO (but I still have to go back and fix php4 and
mod_perl which broke doing this) ...

NEW PROBLEM! (I seem to get stuff on regex stuff alot :)

Now I tried to rebuild mapserver 3.5 with mapscript using:

./configure \
  --with-perl-options=PREFIX=/usr \
  --with-ogr --with-gdal --with-wmsclient --with-proj \
  --with-php=/home/woodbri/linux/php-3.0.16 \
  --with-apxs=/usr/sbin/apxs

and get down to:

gcc -c -O2  -Wall -DIGNORE_MISSING_DATA  -DUSE_EPPL -DUSE_PROJ
-DUSE_PROJ_API_H -DUSE_WMS -DUSE_WMS_LYR  -DUSE_TIFF -DUSE_JPEG
-DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_TTF
-DGD_HAS_GDIMAGEGIFPTR   -DUSE_OGR -DUSE_GDAL   -I/usr/include      
-I/home/woodbri/linux/php-3.0.16/regex  -I/usr/local/include
-I/usr/local/include  -I/usr/local/include
-I/usr/local/include/w3c-libwww -DHAVE_CONFIG_H 
/home/woodbri/linux/php-3.0.16/regex/regcomp.c -o
/home/woodbri/linux/php-3.0.16/regex/regcomp.o
In file included from /home/woodbri/linux/php-3.0.16/regex/regcomp.c:14:
/home/woodbri/linux/php-3.0.16/regex/cclass.h:8: warning: missing braces
around initializer for `cclasses[0]'

and a whole lot more warnings like the last until make dies!

I assume that the references to my php dir are an attempt to reuse the
regex code built into php. Does this mean I need to configure php
differently or what? And since I JUST built php WHY is it compiling it
again and putting the .o back over there instead of locally!

OK, Don't ask me why (I didn't do a make clean on php) but that dir had
not been built, presumably because php picked up the regex which is
installed as a system library. I did a make in this dir and went back to
mapserver and every think built ok. 

So, I  cp php_mapscript.so /etc/httpd/modules/  over and say cool now I
can get the mapscript/php test to work .... NO such luck!!!!
I still get the:

[Fri Jan  4 22:26:31 2002] [notice] Accept mutex: sysvsem (Default:
sysvsem)
httpd: error in loading shared libraries:
/usr/lib/apache/php_mapscript.so: undefined symbol:
_register_list_destructors

So 5 hours later and I'm back where I started. I must have mised
something. Maybe a good nights sleep and I will see it in the morning.

[root at linus httpd]# /sbin/httpd -l
bash: /sbin/httpd: No such file or directory
[root at linus httpd]# /usr/sbin/httpd -l
Compiled-in modules:
  http_core.c
  mod_so.c
suexec: disabled; invalid wrapper /usr/sbin/suexec

phpinfo() reports:

Configure command: ./configure '--prefix=/usr'
'--with-apxs=/usr/sbin/apxs' '--with-config-file-path=/etc/httpd'
'--enable-safe-mode'
    '--enable-versioning' '--enable-force-cgi-redirect=yes'
'--enable-discard-path=yes' '--with-exec-dir=/usr/bin'
'--with-system-regex'
    '--disable-debug' '--with-zlib' '--with-gdbm' '--enable-debugger'
'--enable-magic-quotes' '--enable-track-vars' '--enable-sysvsem'
       '--enable-sysvshm' '--enable-track-vars' '--with-xml'
'--with-ftp' '--with-jpeg' '--without-ttf' '--with-gd'
'--with-mysql=/usr'

php3.ini file path is set to: /etc/httpd

I checked to make sure I have the -rdynamic in the php Makefile, NO the
little beggar some how escaped again! It it a real pain to keep adding
it and losing it every time you run configure. So I add it again; make
clean; make; su; make install; restart apache; Still does not work!

I appreaciate the help. This falls into the "It just isn't easy!"
catagory.

-Steve


Daniel Morissette wrote:
> 
> Stephen Woodbridge wrote:
> 
> >Additional info:  THe apache error_log has:
> >
> >httpd: error in loading shared libraries:
> >/usr/lib/apache/php_mapscript.so: undefined symbol:
> >_register_list_destructors
> >
> >in it. So this looks like the problem, but How do I fix it?
> >
> This happens if your  php executable (if you compiled PHP as a CGI) or
> your httpd binary (if PHP is compiled statically into Apache) was not
> linked to support loading shared libraries.  It has to be relinked using
> the "-rdynamic" option (on Linux) which will allow loading of shared
> libraries.
> 
> See also:
> http://www2.dmsolutions.ca/mapserver/php_mapscript/php_mapscript_faq.html#4.3
> 
> Daniel



More information about the mapserver-users mailing list