PHP MapScript - MapFile access violation

Plonauta a.acquista at LIBERO.IT
Fri Dec 22 05:11:12 EST 2006


Hi all, I'm Alessio.
Now I'm using MapServer 4.10, PHP 5.2 and IIS5 on Win2K Pro.
I haven't use ms4w package.
I configured IIS for PHP 5.2.0 support (installed as ISAPI, not CGI), PHP
for MapScript support and tested all by a "phpinfo()" page.

I can get from MapServer a map of entire world from a shape file.

I need to load a map greater than web page size, so I've put in the page a
table with the size of the map.
Into each cell there is an img object with visibility property sets to
"hidden".
This table is inserted into a div with position property sets to "absolute",
so I can drag this div and scroll the entire table (so, the entire map).

When a cell is in the page area (between the upper-lower and left-right page
borders) I assign to the src property of the contained img a php page path,
passing in QueryString the coordinates of the map portion I need.

In this php page, using MapScript, I create a map object, set size and
extent of the map portion I need, and draw it directly in the browser.

It seems wonderful and so "GoogleMap-like", but at this point I've got a
problem.
Some times the MapScript elaboration fails because php can't load the map
file.

My table, in the page area, has 5 columns and 4 rows (so 20 cells), and in
the first "version" of this web app, requests of these 20 cells to php page
with MapScript inside, starts at the same time.
After second image loaded (some times after the third), the php page returns
an acces violation, and at this point I can't use MapServer until I reboot
IIS.

It seems like my php page try to open map file before it was released by
previous MapObj instance.
So, in the second "version" of the web app, I insert the requests into an
array and like a FIFO queue, start a request after the previous was
completed.

This "upgrade" isn't enough, because with IRregular frequency, php returns
the same error.

So, I've delayed the request by a javascript "setTimeout" with 500
milliseconds.

But another time it isn't enough.

My last "upgrade" is to create 4 MapFiles with the same instructions inside
to shunt request queue.
In this case, instead the "access violation" message, php tells me that it
fails to open map file and the ".dbf" shape file.

It occurs if, while map portions are loading in a browser window, I open
another browser window and it also starts to load map portions.

Do you help me ?

Thanx in advance and excuse me for my bad bad bad english

Alessio

-- 
View this message in context: http://www.nabble.com/PHP-MapScript---MapFile-access-violation-tf2869969.html#a8021511
Sent from the Mapserver - User mailing list archive at Nabble.com.



More information about the mapserver-users mailing list