[Mapserver-users] php/mapscript error

Daniel Morissette morissette at dmsolutions.ca
Thu Oct 23 16:40:14 EDT 2003


See 
http://mapserver.gis.umn.edu/data2/wilma/mapserver-users/0306/msg00597.html

The solution seems to be to remove the --enable-discard-path from the 
PHP configure options.

Daniel


woodbri at swoodbridge.com wrote:
> I think I used PHP 4.3.0 which is know to have a bug that messes up 
> $PHP_SELF variable and has a document workaround on wiki or the 
> archives. I also have gotten it to work with PHP 4.3.1 which is a 
> better choice because it fixes a security bug in PHP 4.3.0.
> 
> -Steve W.
> 
> On 23 Oct 2003 at 16:42, Murat Isik wrote:
> 
> 
>>Thank you,
>>
>>Do you remember which php version worked with you?. I am using php-4.2.2-17.
>>
>>
>>----- Original Message ----- 
>>From: <woodbri at swoodbridge.com>
>>To: <mapserver-users at lists.gis.umn.edu>; "Murat Isik"
>><muratisik at megatek.com.tr>
>>Sent: Thursday, October 23, 2003 4:31 PM
>>Subject: Re: [Mapserver-users] php/mapscript error
>>
>>
>>
>>>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