[mapserver-users] PHP 4.0.4 vs. 4.0.5, MapScript - weird behavior

Hankley, Chip Chip.Hankley at GASAI.Com
Fri Jun 15 07:33:22 PDT 2001


I think I've noticed some weird behavior when using MapScript with the
latest version of PHP (4.0.5).

When working through the gmap application, and I would always get "Warning:
Undefined index:" errors for the following types of lines:

if ($HTTP_FORM_VARS["minx"])

when the variable had not been POSTED (i.e. if a checkbox was unchecked, the
variable would not exist, and this would return an error).

I'm running PWS on NT4...

If anybody's running 4.0.5 and would be interested in trying this, I'd be
curious if they get the same error (on other platforms)... Save the
following code to foo.php and run it. If the checkbox is checked, the line
"It worked!" should appear below the submit button...at least this is the
behavior you'd expect in 4.0.4 - in 4.0.5 it returns an error at the
beginning of the page.

<HTML>
<Title>PHP Test</Title>
<BODY>
<form action="foo.php" method="post">
    <input type="checkbox" name="ColorPhoto" value="Y">Color Photo (Low
Res)<P>
    <input type="submit">
</form>

<?
if ($HTTP_POST_VARS['ColorPhoto'])
  printf("It worked!");
?>      

<?phpinfo(INFO_VARIABLES);?>
</BODY>
</HTML>

Anyway, I'm dubious about the overall effects of this (and other
differences?) on MapScript...I've been trying to get things to work under
4.0.5 with great difficulty...going back to 4.0.4.

Cheers!

Chip Hankley






More information about the MapServer-users mailing list