[mapserver-users] not unique image filenames problem
Puneet Kishor
pkishor at GeoAnalytics.com
Fri Mar 29 06:27:12 PST 2002
Erwin,
On Thursday, March 28, 2002, at 07:02 PM, Consult IT!, E. Perik wrote:
> The image and path are both created correctly. Even when I do a refresh
> (F5) it does not show the image. Refresh creates a new image.
>
> When I save the source-output of the PHP page to an HTML page it show
> the image perfectly.
so, you are saying that the image is created correctly, and if you view
it outside of your application it shows up as it should.
First, lets go back to your original problem/assumption... relative
speeds of Mapserver and PHP are a non-issue, because PHP gets the name
of the image _only_ after Mapserver has had a chance to create it.
If I am reading your notes above correctly, the image _is_ being
created. Additionally, you are right, refresh won't show the previous
image... it will send another call to the server and end up simply
generating another image for the exactly same params. The only way to
verify is to note the name of the image in the source and then look in
your tmp directory if the image is there or not, and if it is, whether
or not it is a correct image.
> Attached you see the created image '101735842035162.png' which is from
> the \tmp directory.
>
> From source of PHP-popup-page:
> <IMG SRC=/tmp/101735842035162.png BORDER=0 WIDTH=400 HEIGHT=300
> NAME=Map>
>
> As you can see in attached 'popup-no-image.jpg' the image is not shown.
yes, but what is the source html of the popup? That is the only thing
that will help you narrow things down definitively.
> Did some testing with another shape-file and that one works just fine.
>
> Narrowed down my problem to just the "Auyuittuq National Park Reserve",
> dbf-row = 6. This seems to be the only one which does not show the
> image.
> Used shapechk.exe and not gave any troubles.
>
> Erased a row in the dbf-file recreated it using shapechk.exe now row 6
> is another shape/park. This new one is now not showing, but "Auyuittuq
> National Park Reserve" (row 5) is. Strange. Looks like row 6 is my
> problem.
>
you are right... this makes even less sense. The Case of the Shape in
Row 6, starring John Woo and Wesley Snipes directed by Woody Allen. My
initial thought was that it might be because of the French accent in
Reserve du Parc Nacional, but that is silly. Loads of Canadians on this
list have never reported such a problem.
Sorry, I have to withdraw from this inquiry and let some other dbf/shape
guru takeover. I will smite my head if it turns out to be something
really obvious and silly.
pk/
>
>
> -----Original Message-----
> From: Puneet Kishor [mailto:pkishor at geoanalytics.com]
> Sent: Thursday, March 28, 2002 11:47 PM
> To: 'E Perik'
> Cc: mapserver-users at lists.gis.umn.edu
> Subject: RE: [mapserver-users] not unique image filenames problem
>
> Erwin,
>
> This doesn't make any sense to me...
>
>
>> Think in my case mapserver is slower in generating the image
>> then PHP is
>> in generating the code which loads the image.
>
>
> no matter what variables you pass to the PHP page, it gets the url only
> after mapserver has ripped through the geodata and generated an image.
> Unless you are somehow timing things that your PHP script is possibly
> running before the Mapserver code runs (possible because you are running
> a
> separate window -- you mentioned popup). More often than not, the red-x
> is
> because of something else going wrong that simply didn't create the
> image.
>
> if you do think it is because of the non-linear nature of your
> application,
> you could put a bit of code in your php page which checks whether the
> specific image exists at the url or not before you try to load it.
>
> maybe this is a good enough reason to try and steer away from popups or
> frames, although they do have a place.
>
>
More information about the MapServer-users
mailing list