[MS4W-Users] Does PHP-Mapscript-FCGI cache the map-object?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[MS4W-Users] Does PHP-Mapscript-FCGI cache the map-object?

ludwig@kni-online.de
Hi list,
I'm using ms4w in version 3.0.1, Apache 2.2.17, PHP 5.3.5 in
Fast-CGI-Mode (mod_fcgid/2.3.6 ) and just had a strange problem.

I use only PostGIS-Layers. The layers in the mapfile are all set to
"STATUS OFF" and have no "connection" and "data"-parameters, because
this is set dynamicaly by mapscript. They use "PROCESSING
"CLOSE_CONNECTION=DEFER".

By mistake ther were errors in former runs of the map-creation, the
"data"-String had some SQL-Errors. Afterwards the corrected PHP-Script
still threw lots of error-messages "msPostGISLayerWhichShapes(): Query
error. Error (FEHLER:  Syntaxfehler bei »AND« LINE 5: ...ew_gewaesser AS
"gewaesser_obj.gewaesser"  WHERE  AND  AND", although at that time I
only had loaded the map-Object ($map_object =
ms_newMapObj($path_to_the_map_file);), set the Size
($map_object->setSize($map_width, $map_height);) and so the layers had
no data and no connection params and status off.

These messages did not disappear until shutting down and restarting the
Apache (and the PHP-FCGI-Process).

That leads me to the assumption, that somewhere the map-object (with all
errors) is cached and reused within the FCGI-Process and overwrites the
new loaded mapfile. A somehow disturbing behaviour...

Is this a bug or did I oversee something?

Ludwig
_______________________________________________
MS4W-Users mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/ms4w-users
Reply | Threaded
Open this post in threaded view
|

Re: [MS4W-Users] Does PHP-Mapscript-FCGI cache the map-object?

jmckenna
Administrator
Hello Ludwig,

I don't have your answer, but I can give you my thoughts when I read this:

- what happens when you make sure to check Task Manager that the mapserv.exe process is not listed there, after you make changes to your mapfile?

- I wonder if any of the mod_fcgid parameters apply to your case (http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html)

That's all I have at the moment at a quick glance :)

-jeff


--
Jeff McKenna
MapServer Consulting and Training Services
http://www.gatewaygeomatics.com/ 



Reply | Threaded
Open this post in threaded view
|

Re: [MS4W-Users] Does PHP-Mapscript-FCGI cache the map-object?

alien9
This post has NOT been accepted by the mailing list yet.
In reply to this post by ludwig@kni-online.de
Hi, Ludwig, I've been having trouble with this exact issue, and the answer seems to be yes, the object and its errors are stored within the fcgi process.
I have to restart both the web server (nginx) and the fcgi and fpm (process manager) to achieve control over the map object again, even in new instances.
It's a bit annoying, and the remedy may to be the careful usage of the free() method on the map object after every manipulation. With that procedure you will get rid of the failed object and will be able to manipulate the new instance.
Regards,

Tiago