[Mapserver-users] php/mapscript error

Murat Isik muratisik at megatek.com.tr
Thu Oct 23 09:11:04 EDT 2003


This is a multi-part message in MIME format.

------=_NextPart_000_00CB_01C39980.42145C00
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable


Hello,

I have been working onphp for the last couple of days with mapscript in =
order to write my own dynamic-layer-generating code. But I hit a hard =
rock along the way.
I am running Redhat 9.0, apache 2.0, mapserver 3.6.0, php-4.2.2-17, =
php-mapscript-3.6.0-4. All mapserver and php related stuff is installed =
through related rpms.
Php works fine both with its own info.php and mapscript's =
phpinfo_mapscript.phtml.
When I test test_draw_map.phtml, I get the following error: (which I =
believe is well known)

Fatal error: Due to thread-safety problems, php_mapscript cannot be used =
as a 'apache2filter' module. You will have to reconfigure your PHP as a =
CGI to run this version of MapScript. See =
http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?PHPMapScriptCGI. in =
/var/www/html/mapserver/itasca/test_draw_map.phtml on line 34

I follow the link and do whats told by adding=20

Action application/x-httpd-php /cgi-bin/php

line to httpd.conf.
Then I test the same test_draw_map.phtml, I get the error:

Warning: Unexpected character in input: ' in /usr/bin/php on line 358

Warning: Unexpected character in input: ' in /usr/bin/php on line 358

Parse error: parse error, unexpected '[' in /usr/bin/php on line 358

test_draw_map.phtml does not have 358 lines. Then I search this error on =
the web and end up with this bug page:

http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=3D73616

Then I get stuck there :(
Am I missing something here? This is about my ignarence on php, =
php/mapscript or is this a real problem?
In any case what's the way out? I am sorry if this is stated before in =
the maillist and I missed it.

Have a nice day

Thank you

Murat Isik




------=_NextPart_000_00CB_01C39980.42145C00
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1226" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Hello,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I have been working onphp for the last =
couple of=20
days with mapscript in order to write my own dynamic-layer-generating =
code. But=20
I hit a hard rock along the way.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I am running Redhat 9.0, apache 2.0, =
mapserver=20
3.6.0, php-4.2.2-17, php-mapscript-3.6.0-4. All mapserver and php =
related stuff=20
is installed through related rpms.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Php works fine both with its own =
info.php and=20
mapscript's phpinfo_mapscript.phtml.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>When I test test_draw_map.phtml, I get =
the=20
following error: (which I believe is well known)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><STRONG>Fatal error</STRONG>: Due to thread-safety problems, =
php_mapscript=20
cannot be used as a 'apache2filter' module. You will have to reconfigure =
your=20
PHP as a CGI to run this version of MapScript. See <A=20
href=3D"http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?PHPMapScriptCGI">htt=
p://mapserver.gis.umn.edu/cgi-bin/wiki.pl?PHPMapScriptCGI</A>.=20
in <B>/var/www/html/mapserver/itasca/test_draw_map.phtml</B> on line=20
<B>34</B></DIV>
<DIV><STRONG></STRONG>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I follow the link and do whats told by =
adding=20
</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Action application/x-httpd-php=20
/cgi-bin/php</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>line to httpd.conf.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Then I test the same =
test_draw_map.phtml, I get the=20
error:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><STRONG>Warning</STRONG>: Unexpected character in input: ' in=20
<B>/usr/bin/php</B> on line <B>358</B><BR><BR><B>Warning</B>: Unexpected =

character in input: ' in <B>/usr/bin/php</B> on line =
<B>358</B><BR><BR><B>Parse=20
error</B>: parse error, unexpected '[' in <B>/usr/bin/php</B> on line=20
<B>358</B></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>test_draw_map.phtml does not have 358 =
lines. Then I=20
search this error on the web and end up with this bug page:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><A=20
href=3D"http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=3D73616">http=
://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=3D73616</A></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Then I get stuck there :(</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Am I missing something here? This is =
about my=20
ignarence on php, php/mapscript or is this a real problem?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>In any case what's the way out? I am =
sorry if this=20
is stated before in the maillist and I missed it.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Have a nice day</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Thank you</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Murat Isik</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV></BODY></HTML>

------=_NextPart_000_00CB_01C39980.42145C00--




More information about the mapserver-users mailing list