[mapserver-users] Regarding Apache

Gregor at HostGIS gregor at hostgis.com
Fri Feb 6 03:58:01 EST 2009


Amiya Patra wrote:
> *PHP/MapScript and PHP has a habit of causing Apache to effectively freeze*
> But how to solve that one...!!!!!!!!!!!!!!!!!!!!!!!!

If you suspect that that's the problem with your server, do what 
everyone else does: compile and run PHP as a CGI program, not as a DSO.

It is unfortunate. By using PHP as a CGI, you fix that problem, but lose 
a lot of the benefits of PHP as DSO, such as database connection pooling 
and being able to use Zend Optimizer. But if you're using PHP/MapScript 
that's just how it is.

I do have one workaround which suits us well at one site: We I figured 
out that it's the imgObj->draw() method that causes the freezes (in our 
use cases). We use PHP/MapScript extensively, but for the rendering we 
use shp2img via the `` operator. This gets around the freezing problem, 
as well as a few other bugs in draw() which we found unacceptable.

-- 
Gregor Mosheh / Greg Allensworth    BS, A+, Network+, Security+, Server+
System Administrator, Lead Programmer
HostGIS development & hosting services, http://www.HostGIS.com/

"Remember that no one cares if you can back up,
  only if you can restore." - AMANDA


More information about the mapserver-users mailing list