[mapserver-users] Fwd: Bug by compiling with PHP

Steve Lime steve.lime@dnr.state.mn.us
Wed, 15 May 2002 09:57:27 -0500


Received: from mail.state.mn.us
	(state.mn.us [156.99.125.109])
	by co5.dnr.state.mn.us; Wed, 15 May 2002 07:33:10 -0500
Return-Path: <silke@intevation.de>
Received: from lists.gis.umn.edu by mail.state.mn.us with ESMTP for steve.lime@dnr.state.mn.us; Wed, 15 May 2002 07:33:09 -0500
Received: from mail.intevation.de (aktaia.intevation.org [212.95.126.10])
	by lists.gis.umn.edu (8.9.3+Sun/8.9.1) with ESMTP id HAA10530
	for <mapserver-bugs@lists.gis.umn.edu>; Wed, 15 May 2002 07:34:11 -0500 (CDT)
Received: from thetis.keller (thetis.hq [192.168.11.13])
	by mail.intevation.de (Postfix) with SMTP id B462D1B6D9
	for <mapserver-bugs@lists.gis.umn.edu>; Wed, 15 May 2002 14:33:02 +0200 (CEST)
Received: (nullmailer pid 26235 invoked by uid 1054);
	Wed, 15 May 2002 12:33:03 -0000
Date: Wed, 15 May 2002 14:33:03 +0200
From: Silke Reimer <silke@intevation.de>
To: mapserver-bugs@lists.gis.umn.edu
Subject: Bug by compiling with PHP
Message-Id: <20020515123303.GA25608@intevation.de>
User-Agent: Mutt/1.3.28i
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="AhhlLboLdkugWU4S"
Content-Disposition: inline

--AhhlLboLdkugWU4S
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hallo!

The last days I tried to compile mapserver with PHP. Finally I was
successful but before I had to change the Makefile and the Makefile.in 
slightly: 

I did
 ./configure --with-proj --with-gdal --with-ogr --with-postgis --with-php=/usr/include/php3/cgi

Then I had to change Makefile.in so that the library for postgis was
included (missing -lpq; see patch ms_php_Makefile.in.patch).

Afterwards I had to make two changes in the Makefile. First the
compiler command was written two times (don't know why, perhaps a
mistake in the configure script). Then the paths two the header
files for php weren't set correctly. This is probably more my own
problem then yours. The changes are documented in
ms_php_Makefile.patch.

Best regards,

Silke 

-- 
Silke Reimer

Intevation GmbH                      http://intevation.de/
FreeGIS                                http://freegis.org/


--AhhlLboLdkugWU4S
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="ms_php_Makefile.in.patch"

diff -ur mapserver_3.5/mapscript/php3/Makefile.in mapserver_3.5_dev/mapscript/php3/Makefile.in
--- mapserver_3.5/mapscript/php3/Makefile.in	Wed May 15 14:23:35 2002
+++ mapserver_3.5_dev/mapscript/php3/Makefile.in	Wed May 15 12:43:07 2002
@@ -75,7 +75,7 @@
 
 
 php_mapscript.so: $(PHPMS_OBJS) ../../libmap.a
-	$(LD) -o $@ $(PHPMS_OBJS) $(MS_LIBS) 
+	$(LD) -o $@ $(PHPMS_OBJS) $(MS_LIBS) -lpq
 
 php_proj.so:  $(PHPPROJ_OBJS)
 	$(LD) -o $@ $(PHPPROJ_OBJS) $(MS_LIBS)

--AhhlLboLdkugWU4S
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="ms_php_Makefile.patch"

diff -ur mapserver_3.5/mapscript/php3/Makefile mapserver_3.5_dev/mapscript/php3/Makefile
--- mapserver_3.5/mapscript/php3/Makefile	Wed May 15 12:49:11 2002
+++ mapserver_3.5_dev/mapscript/php3/Makefile	Wed May 15 12:43:07 2002
@@ -34,7 +34,7 @@
 # | contact core@php.net.                                                |
 # +----------------------------------------------------------------------+
 
-CC =     cc  cc -I. -I.. -fPIC
+CC =     cc -I. -I.. -fPIC
 LD =     cc -shared -L/usr/local/lib -rdynamic
 CFLAGS = -O2  -Wall -DCOMPILE_DL=1 -DPHP3
 RUNPATHS= 
@@ -42,11 +42,11 @@
 #
 # Set PHP_SRC_DIR to point to the root of the PHP source tree
 #
-PHP_SRC_DIR = /usr/include/php3/cgi
+PHP_SRC_DIR = /usr/include/php3
 
 PHP_INC = -I$(PHP_SRC_DIR) -I$(PHP_SRC_DIR)/dl -I$(PHP_SRC_DIR)/main \
 	  -I$(PHP_SRC_DIR)/Zend -I$(PHP_SRC_DIR)/include \
-	  -I$(PHP_SRC_DIR)/TSRM 
+	  -I$(PHP_SRC_DIR)/cgi -I$(PHP_SRC_DIR)/TSRM 
 
 #
 # Set MapServer extensions parameters.  See main MapServer Makefile for 

--AhhlLboLdkugWU4S--