|
||||
[maplab-users] Php/CGI - MapLab problemPaul Spencer pgs@magma.caFri, 26 Jul 2002 17:36:03 -0400
|
David, as you have surmised, MapScript will not work reliably as a module, only cgi. Assuming that you are compiling php421, you could can modify the httpd.conf file: AddType application/x-httpd-php .php .php4 .php3 .phtml Action phtml-script /cgi-bin/php421 and copy your php to /var/www/cgi-bin/php421 Change the rest of your configuration back to the way it was and then comment out the <IfModule> for mod_php4 and mod_php3 (and any other php-related options Oh, one other change, you may want to add index.phtml as a valid default page in <IfModule mod_dir.c> 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 >
This archive was generated by Pipermail. |
MapTools.org -- Hosted by DM Solutions Group |