MapTools.org

[maplab-users] Php/CGI - MapLab problem

Daniel Morissette morissette@dmsolutions.ca
Mon, 29 Jul 2002 15:20:02 -0400
Hi David,

Another user on the MapServer-users list ran into the same thing and it
turned out that the source of the problem was that he was using the
'php' executable shipped by RedHat.  Even accessing regular PHP pages
probably won't work either with this php executable.

The solution in his case was to recompile a new PHP executable (there
are step by step instructions in the Wiki)... I would recommend that you
get the latest PHP version 4.2.2.  Then re-run configure for MapServer
while pointing it to the PHP4.2.2 source, copy the new php_mapscript.so
to your extension_dir and you should be running.

I hope that helps,

Daniel


David Graham wrote:
> 
> Just installed the latest MapLab but now having problems with Php.  Here
> is the details
> 
> Php 4.1.2
> 
> MapScript Version ($Revision: 1.113 $ $Date: 2002/07/08 21:28:57 $)
> MapServer version 3.7 (development) OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP
> SUPPORTS=PROJ SUPPORTS=TTF SUPPORTS=WMS_SERVER INPUT=EPPL7 INPUT=JPEG
> INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE
> 
> Apache 1.3.23
> 
> Linux version 2.4.18-3 (bhcompile@porky.devel.redhat.com) (gcc version
> 2.96 20000731 (Red Hat Linux 7.3 2.96-110)) #1 Thu Apr 18 07:32:41 EDT 2002
> 
> I am not a Php person, but I have done a lot of work with mapscript.  I
> installed MapLab and everything was working great, until I tried to
> render things.  Then I got a page generated by Mapscript that refrenced
> a threading problem at
> http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?PHPMapScriptCGI.
> 
> So I endevered to install the CGI version of PHP.  I first found that
> Red Hat ships with one in /usr/bin.|
> 
> root@host# cp /usr/bin/php /var/www/cgi-bin/.
> root@host# vi /etc/httpd/conf/httpd.conf |
> 
> I found the section for the php4 module.  It looked like:
> 
> | <IfModule mod_php4.c>
>     AddType application/x-httpd-php .php .php4 .php3 .phtml
>     AddType application/x-httpd-php-source .phps
> </IfModule>
> <IfModule mod_php3.c>
>     AddType application/x-httpd-php3 .php3
>     AddType application/x-httpd-php3-source .phps
> </IfModule>
> <IfModule mod_php.c>
>     AddType application/x-httpd-php .phtml
> </IfModule> |
> 
> I remove the .phtml type from the php4 section. Then add the following
> lines below the php module definitions.
> 
> | Action phtml-script /cgi-bin/php
> AddHandler phtml-script .phtml |
> 
> I restarted the Http Server and went back to the maplab/htdocs/index.phtml page and this is what I got:
> 
> *Warning*:  Unexpected character in input:  '' (ASCII=4) state=1 in */var/www/cgi-bin/php* on line *6081*
> *Warning*:  Unexpected character in input:  ' in */var/www/cgi-bin/php* on line *6082*
> *Warning*:  Unexpected character in input:  '' (ASCII=4) state=1 in */var/www/cgi-bin/php* on line *6082*
> *Warning*:  Unexpected character in input:  '' (ASCII=4) state=1 in */var/www/cgi-bin/php* on line *6083*
> *Warning*:  Unexpected character in input:  '' (ASCII=28) state=1 in */var/www/cgi-bin/php* on line *6084*
> *Parse error*:  parse error in */var/www/cgi-bin/php* on line *6084*
> 
> My question is - What have I done wrong!
> 
> Things worked well before I made the switch to CGI (with the exception that mapscript did not want to work).  Any help anyone can give would be aprecieated.
> 
> Dave
> 
> --
> David W. Graham
> Director of Geospatial Applications Development
> information integration and imaging, LLC
> 201 Linden St, Third Floor
> Fort Collins, CO 80524
> (970) 482-4400
> dgraham@i3.com
> http://www.i3.com
> 
> _______________________________________________
> Maplab-users mailing list
> Maplab-users@dmsolutions.ca
> http://lists.dmsolutions.ca/mailman/listinfo/maplab-users


This archive was generated by Pipermail.