[mapserver-users] Advice requested: CGI

Stephen Woodbridge woodbri at swoodbridge.com
Tue Apr 9 10:55:04 EDT 2002


Twan,

You can have BOTH a DSO module for your regular scripts and a CGI for
mapserver.

Install PHP without mapscript as DSO module.
Build PHP CGI with mapscript and copy it to the /cgi-bin directory
Change the extension for mapscript files to something like .php4 or
.phtml and configure Apache to run them as CGI

I think there is more info on wiki and the list archives.

-Steve

Twan Kogels wrote:
> 
> Hello,
> 
> I've got a server online with mapserver 3.5 (stable release) and php4.0.x.
> I've installed php as DSO module in apache. Yesterday the systemadmin
> noticed that the current version of php4 has a major bug (the famous upload
> bug). So he wants to upgrade php4 to php4.1.2.
> 
> Today i downloaded the nightly package of mapserver and php4.1.2 and
> installed everything local. php is now installed as CGI, but this is not
> ideal, cause my other php scripts are executing slow when accessed with a
> HTTP/1.1 browser. For example:
> ===begin.php===
> <?
> #!/usr/local/apache/cgi-bin/php
> if($todo=="go")
> {
>          header("Location: pagina.php");
>          exit;
> }
> ?>
> <A href="begin.php?todo=go">test</a>
> ============
> 
> ===pagina.php===
> <?
> #!/usr/local/apache/cgi-bin/php
> header("Location: begin.php");
> exit;
> ?>
> ==============
> When you click on the "test" link in "begin.php" it takes a whopping 6
> seconds to execute when using a HTTP/1.1 browser (HTTP/1.0 goes smoothly).
> 
> What should i do? I can't take the major performance hit on my scripts, i
> also can't keep a server with a major bug online.
> 
> Best regards,
> - Twan
> 
> --
> http://www.twansoft.com



More information about the mapserver-users mailing list