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

woodbri at swoodbridge.com woodbri at swoodbridge.com
Wed Jun 11 19:05:35 EDT 2003


I used to call it directly also, but on PHP-4.3.2-RC2 it does not 
allow accept any command line args when run from the shell. So I'm 
not sure if this is a bug or a feature :(

-Steve

On 11 Jun 2003 at 14:05, Daniel Morissette wrote:

> 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.x
> > ml &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