Mapscript PHP Error - failed to map segment from shared object
Aaron Racicot
aaronr at ECOTRUST.ORG
Mon Mar 21 11:48:05 PST 2005
I am no expert at the shared library stuff, but my guess is that you did
not tell the web server where to locate PHP includes. Below is what I
did to set up PHP on my Fedora Core 3 box, maybe it will help. I think
you might need to focus on the "extension_dir" variable in the php.ini
file. It looks like your web server is looking in /usr/lib/php4/
Here is a snip of my installation history:
+++++++++++++++++++++++++++++++++++
First get the new version:
mkdir php
cd php
wget http://us2.php.net/get/php-4.3.10.tar.gz/from/this/mirror
tar -xzvf php-4.3.10.tar.gz
cd php-4.3.10
./configure --enable-force-cgi-redirect
--with-config-file-path=/etc/httpd/ --with-gd=/usr/local
--with-jpeg-dir=/usr/lib --with-png-dir=/usr/lib --wit
h-tiff-dir=/usr/lib --with-zlib-dir=/usr/lib --with-freetype-dir
--without-ttf --with-mysql --with-regex=system --enable-dbase
--enable-dbx --enable-ve
rsioning --with-pgsql=/usr/local/pgsql
make
make install
strip sapi/cgi/php
cp sapi/cgi/php /var/www/cgi-bin/
cp php.ini-dist /etc/httpd/php.ini
Made the following mod to /etc/httpd/php.ini:
; Directory in which the loadable extensions (modules) reside.
;extension_dir = "./"
extension_dir = "/etc/httpd/php_mods"
mkdir /etc/httpd/php_mods
------>>>>>>>>> This is where the Mapscript .so will go...
Added the following to /etc/httpd/conf/httpd.conf
#
# For PHP scripts as CGI-BIN
#
AddType application/x-httpd-php-cgi .php .php4 .php3 .phtml
Action application/x-httpd-php-cgi /cgi-bin/php
Now re-start the server:
/etc/rc.d/init.d/httpd restart
Stopping httpd: [ OK ]
Starting httpd: [ OK ]
+++++++++++++++++++++++++++++++++++
+----------------------------------------+
| Aaron Racicot | aaronr at ecotrust.org |
| GIS Programmer | 503.467.0759 |
+----------------------------------------+
| e c o t r u s t |
| Jean Vollum Natural Capital Center |
| 721 NW Ninth Avenue |
| Suite 200 |
| Portland, OR 97209 |
| www.ecotrust.org |
+----------------------------------------+
-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On
Behalf Of Troy R. Johnson
Sent: Monday, March 21, 2005 11:03 AM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: [UMN_MAPSERVER-USERS] Mapscript PHP Error - failed to map
segment from shared object
Hi folks, hopefully someone can help me here.
I'm trying to get the php_mapscript.so working under Fedora core 3.
So far I've downloaded PHP version 4.3.9 and compiled it.
I did a make install for php. This installed php to /usr/local/bin/
Then I compiled Mapserver 4.4.1
More information about the MapServer-users
mailing list