php maoscript

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

php maoscript

SARA
This post has NOT been accepted by the mailing list yet.

Hi
I use ms4w 2.2.8 on windows 7. and have problem in runing php code.
i dont know what should config php mapscript for ms4w. in mapserver documenation page and other place written with install ms4w, php and mysql install too. bau dont know why dont run php files
!
i add extension=php_mapscript.dll file in php.ini  and apply all section in this page: http://trac.osgeo.org/mapserver/wiki/PHPMapScriptCGI
but dont solv.
please help me
regurd
Reply | Threaded
Open this post in threaded view
|

Re: php maoscript

SARA
This post has NOT been accepted by the mailing list yet.
actualy it dont know objecOriented php!! becuse for below code:
 <?php
       
  // Create a unique image name every time through
     
  $image_name = sprintf("phpms-hello%0.6d",rand(0,999999)).".png";

  // Create a new instance of a map object
     
  $map = ms_newMapObj("c:/ms4w/apps/Iran/hello.map");

  // Create an image of the map and save it to disk
     
  $image=$map->draw();
  $image->saveImage("c:/ms4w/tmp/ms_tmp/".$image_name);
?>

<html>
<head><title>PHP MapScript Hello World</title></head>
<body>
  <form action="phpms_hello.php" method="POST">
    <input type="image" name="img"
          src="c:/ms4w/tmp/ms_tmp/<?php echo $image_name; ?>">
  </form>
</body>
</html>

 this masage shown:
"draw(); $image->saveImage("c:/ms4w/tmp/ms_tmp/".$image_name); ?>
submit query"
Reply | Threaded
Open this post in threaded view
|

Re: php mapscript

SARA
This post has NOT been accepted by the mailing list yet.
i solve it
now this page be ruu but sown this erore:

"Warning: [MapServer Error]: getString(): Parsing error near (“):(line 8) in C:\ms4w\Apache\htdocs\myproject\phpms_hello.php on line 10

Warning: Failed to open map file c:/ms4w/apps/Iran/hello.map in C:\ms4w\Apache\htdocs\myproject\phpms_hello.php on line 10

Fatal error: Call to a member function draw() on a non-object in C:\ms4w\Apache\htdocs\myproject\phpms_hello.php on line 14"

please help me
regurd