[Mapserver-dev] Can't run PHP/Mapscript as a CLI????

Daniel Morissette morissette at dmsolutions.ca
Wed Jun 11 14:05:09 EDT 2003


woodbri at swoodbridge.com wrote:
> 
> Whoever is making this check needs to relax it so you can run as a
> CLI for debugging purposes. 

I have added "cli" to the test in php_mapscript.c, so now the accepted
SAPI names are "cgi", "cgi-fcgi" and "cli".  

(I did this in both CVS branches: 4.0 and 3.6)


> There may be other ways, but my standard
> way to debug server 500 errors and other problems is to run php like:
> 
> [root at woodbri htdocs]# export
> QUERY_STRING='TEMPLATE=geobase_en.html&CONTEXT=geobase_regional_en.xml
> &sessionid=123455677'
> [root at woodbri htdocs]# export REQUEST_METHOD=GET
> [root at woodbri htdocs]# export REDIRECT_STATUS=200
> [root at woodbri htdocs]# php cwc2.php
> 
> or run it in the debugger to see where it dies. This used to work
> fine.
> 

You could simply call your php CGI for debugging with an explicit path,
that's what we always do.

Daniel
-- 
------------------------------------------------------------
 Daniel Morissette               morissette at dmsolutions.ca
 DM Solutions Group              http://www.dmsolutions.ca/
------------------------------------------------------------



More information about the mapserver-dev mailing list