Just an update/repost of a problem that I have with php_mapscript from a command line (DOS prompt in this case). I have not determined the nature of the problem, which is quite vexing, but I did at least to make a workaround. Since the same exact script runs fine via the http process, I used wget to call my script. Anyhow, I thought I would repost in case anyone has experienced this and/or found the cause.
Original Message with some updates: I am having a strange occurrence. I have a php script that uses PHP mapscript to manipulate some maps. I have no problem with it if I call the script from my web browser, however, when I call it via command line PHP, i.e., "php scriptname.php", it fails when I try to do anything with the map object. I have tried loading the php_mapscript.dll from the dl() command, just to be certain (although it was most definitely loaded as indicated by the phpinfo() command). I have done a phpinfo() from my script and verified that mapscript is in fact loaded when php is invoked from the command line. It looks as thought the command that I am using to instantiate the map object instance is failing. To create the object, I use: $this->map = ms_newMapObj($map_path.$map_file); To verify this creation I use: print_r((array)$this->map ); When I call this script from the command line it yields: Array( [0] => ) But when I call it from the browser, it gives a valid object: Array ( [_handle_] => Resource id #41 [numlayers] => 8 [name] => PrecipMap [status] => 1 [debug] => 1 [width] => 720 [height] => 500 [maxsize] => 2048 [transparent] => -1111 [interlace] => -1111 [imagetype] => AGG [imagequality] => -1111 [extent] => ms_rect_obj Object ( [_handle_] => Resource id #42 [minx] => -79.322914123535 ... (etc. etc.) The only difference that I can think of is that the php-cgi.exe is getting used by the browser, while php.exe is used at the command line. I tried executing the script with the cgi version, but to no avail, same behaviour, script dies without any word whenever I try to call a mapObj method. System: Windows XP PHP 5.2.5 Mapscript - PHP MapScript Version => ($Revision: 7251 $ $Date: 2008-01-08 12:04:53 -0500 (Tue, 08 Jan 2008) $) Any guidance would be appreciated, r.b. Robert W. Burgholzer Surface Water Modeler Office of Water Supply and Planning Virginia Department of Environmental Quality [EMAIL PROTECTED] 804-698-4405 Open Source Modeling Tools: http://sourceforge.net/projects/npsource/
_______________________________________________ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
_______________________________________________ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users