[Mapserver-users] PHP MapScript problem (use of undefined constant)
Geoffrey Rowland
geoffrey.rowland at noaa.gov
Tue Sep 2 13:52:46 PDT 2003
This is a multi-part message in MIME format.
--------------010304030609070602010607
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Yes, I am using Mapserver 4 and PHP 4.3.2, I tried using the
selectOutputFormat and it still gives the same error. What is very
strange is I have this same script running on a different server, set up
(as far as I am aware) the same exact way as the server I am having
problems with, and it works fine.
Armin Burger wrote:
>Geoffrey,
>
>are you using Mapserver 4? Then you have to define the image format
>before:
>
>$map->selectOutputFormat("swf");
>$image=$map->draw();
>$image_url=$image->saveWebImage();
>
>Armin
>
>
>
>
>>Notice: Use of undefined constant MS_SWF - assumed 'MS_SWF' in
>>D:\Inetpub\CIP ROOT BETA\wnv\wnv_pop.php on line 4
>>
>>
>
>
>
>>this will have the same notice no matter what type of file i try to
>>output...and the image doesn't output (nothing is written in the
>>directory that i specified to use in my map file). any idea what may
>>
>>
>be
>
>
>>causing this?
>>
>>
>
>
>
>><?
>> $map = ms_newMapObj("pop.map");
>> $image=$map->draw();
>> $image_url=$image->saveWebImage(MS_SWF,1,1,0);
>>
>>
>
>
>
>> ?>
>>
>>
--
Geoffrey Rowland
Technical Officer
Climate Information Project
NOAA Research
Office of Global Programs
http://www.cip.ogp.noaa.gov
Contractor,
RGII Technologies, Inc., a Computer Horizons Company
http://www.rg2.com
Phone: 301-427-2089x186
Fax : 301-427-2082
geoffrey.rowland at noaa.gov
--------------010304030609070602010607
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
<title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
Yes, I am using Mapserver 4 and PHP 4.3.2, I tried using the
selectOutputFormat and it still gives the same error. What is very
strange is I have this same script running on a different server, set
up (as far as I am aware) the same exact way as the server I am having
problems with, and it works fine.<br>
<br>
Armin Burger wrote:<br>
<blockquote type="cite"
cite="mid20030902201201.DKLW16764.viefep12-int.chello.at at libero.it">
<pre wrap="">Geoffrey,
are you using Mapserver 4? Then you have to define the image format
before:
$map->selectOutputFormat("swf");
$image=$map->draw();
$image_url=$image->saveWebImage();
Armin
</pre>
<blockquote type="cite">
<pre wrap="">Notice: Use of undefined constant MS_SWF - assumed 'MS_SWF' in
D:\Inetpub\CIP ROOT BETA\wnv\wnv_pop.php on line 4
</pre>
</blockquote>
<pre wrap=""><!---->
</pre>
<blockquote type="cite">
<pre wrap="">this will have the same notice no matter what type of file i try to
output...and the image doesn't output (nothing is written in the
directory that i specified to use in my map file). any idea what may
</pre>
</blockquote>
<pre wrap=""><!---->be
</pre>
<blockquote type="cite">
<pre wrap="">causing this?
</pre>
</blockquote>
<pre wrap=""><!---->
</pre>
<blockquote type="cite">
<pre wrap=""><?
$map = ms_newMapObj("pop.map");
$image=$map->draw();
$image_url=$image->saveWebImage(MS_SWF,1,1,0);
</pre>
</blockquote>
<pre wrap=""><!---->
</pre>
<blockquote type="cite">
<pre wrap=""> ?>
</pre>
</blockquote>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Geoffrey Rowland
Technical Officer
Climate Information Project
NOAA Research
Office of Global Programs
<a class="moz-txt-link-freetext" href="http://www.cip.ogp.noaa.gov">http://www.cip.ogp.noaa.gov</a>
Contractor,
RGII Technologies, Inc., a Computer Horizons Company
<a class="moz-txt-link-freetext" href="http://www.rg2.com">http://www.rg2.com</a>
Phone: 301-427-2089x186
Fax : 301-427-2082
<a class="moz-txt-link-abbreviated" href="mailto:geoffrey.rowland at noaa.gov">geoffrey.rowland at noaa.gov</a>
</pre>
</body>
</html>
--------------010304030609070602010607--
More information about the MapServer-users
mailing list