PHP Mapscript on Debian GNU/Linux Sarge

Paul Scott pscott at UWC.AC.ZA
Tue Aug 2 03:01:22 EDT 2005


I have just finished compiling php mapscript for Debian gnu/linux from
the stock apt sources and debian packages.

In order to compile php mapscript properly, using PHP's Regex, do the
following:

apt-get -s build-dep php4 > builddep-php4-packages
apt-get -s build-dep mapserver > builddep-mapserver-packages
apt-get build-dep php4
apt-get build-dep mapserver
apt-get install fakeroot
apt-get install dpkg-dev
apt-get install php4-dev

apt-get source php4
cd php4-4.3.10
fakeroot dpkg-buildpackage

cp apache-build/regex/.libs/*.o regex/

apt-get source mapserver
cd mapserver-4.4.1
fakeroot dpkg-buildpackage

fgrep ./configure config.log > conf.new

Edit the "conf.new" file to remove the leading "$" sign, and add the following 
configure options to the end of the line:
 
 --with-php=/usr/include/php4/ 
 --with-php-regex-dir=../php4-4.3.10/regex/

 ./conf.new

make 

strip --strip-unneeded mapscript/php3/php_mapscript.so
su
cp mapscript/php3/php_mapscript.so /usr/lib/php4/20020429/

All thats left is to test:

<?
  dl('php_mapscript.so');
  phpinfo();
?>

Thought someone else may benefit from this...

--Paul



More information about the mapserver-users mailing list