[Mapserver-users] php/mapscript error

woodbri at swoodbridge.com woodbri at swoodbridge.com
Thu Oct 23 09:31:01 EDT 2003


Murat,

Please note the the error:

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

is not your php script but the php executable. What has happened here 
is that PHP is getting passed the PHP executable as the script name 
and is trying to interpret the executable as the script. I think this 
is problem between Apache and PHP when PHP is configured as a CGI 
module. I have run into this problem before and was able to solve it 
by changing to different version of PHP. I didn't try to diagnose the 
problem just found a workaround to avoid it. 

-Steve W.

On 23 Oct 2003 at 16:11, Murat Isik wrote:

> 
> 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 
> 
> 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=73616
> 
> 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
> 
> 
> 
> 





More information about the mapserver-users mailing list