[Mapserver-users] Using PHP as CGI when compiled as DSO

'Jason Thaxter' thaxter at gomoos.org
Thu Mar 18 09:02:44 PST 2004


I learned a bit more after I wrote this: check out my note on the wiki re
sapi/cgi/cgi_main.c:
http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?PHPMapScriptCGI

There are *definitely* compile options involved in this problem.
--enable-discard-path is implicated, and there ifdefs for PHP_FASTCGI and
ENABLE_PATHINFO_CHECK that can fix the issue.

Here's an excellent explanation of the cause:
http://www.zend.com/lists/php-dev/200211/msg01353.html

It's not much of a leap to see that the problem was fixed a long time ago, and
package maintainers have occasionally gotten flummoxed by the options that
enable or disable the code.

jason

On Thu, Mar 18, 2004 at 04:43:53PM -0000, Mark Cave-Ayland wrote:
> 
> Hi Jason,
> 
> Thanks for the hint! I couldn't get this to work as described above as I
> found that PHP outputted headers and then appeared to barf :(. After a
> lot of heartache, I found that I had to correct the SCRIPT_FILENAME CGI
> parameter before it would work for me. My eventual CGI file looked like
> this:
> 
> #!/bin/sh
> export SCRIPT_FILENAME=$PATH_TRANSLATED
> EXEC="/usr/bin/php -f $PATH_TRANSLATED"
> $EXEC
> 
> After making this change, everything suddenly came to life. I don't know
> if there was anything peculiar about the compile options which I should
> have noticed that caused this problem, but the box was running RedHat
> 7.2 with Apache 1.3 and PHP 4.3.3.
> 
> 
> Cheers,
> 
> Mark.
> 
> ---
> 
> Mark Cave-Ayland
> Webbased Ltd.
> Tamar Science Park
> Derriford
> Plymouth
> PL6 8BX
> England
> 
> Tel: +44 (0)1752 764445
> Fax: +44 (0)1752 764446
> 
> 
> This email and any attachments are confidential to the intended
> recipient and may also be privileged. If you are not the intended
> recipient please delete it from your system and notify the sender. You
> should not copy it or use it for any purpose nor disclose or distribute
> its contents to any other person.
> 
> 

-- 
----------------------------------------------
Jason Thaxter
GoMOOS, P.O. Box 4919, Portland, ME 04112-4919
Office Location: 1 Canal Plaza, 7th Floor
Office: 207.773.0423
Fax:    207.773.8672
Email:  thaxter at gomoos.org
------------www.gomoos.org--------------------



More information about the MapServer-users mailing list