NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
CLI only, no web server ?


Joined: 12 May 2005
Posts: 5
Reply with quote
Hi,
I use PHP as a general purpose programming language. I want to know if I can use dbg and dbg-cli to debug CLI only PHP programs. I don't have a web server installed on my system.

Thank you.
View user's profileFind all posts by cjbottaroSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
Yes you can. If you want to use dbg-cli, run the following commands:

>set mode on
>set cgiexec /usr/local/bin/php
>file yourscript.php

substitute path to php if you installed it into a different directory.
Don't forget to install debugger module (see FAQ forum here on how to do it)

If you prefer PHPED IDE, you can set Running mode to php-cgi and will allow you debug your scripts w/o browsers and http servers too.
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 12 May 2005
Posts: 5
Reply with quote
Hmm, now I get this error:

dbg>set mode on
dbg>set cgiexec /usr/local/bin/php
dbg>file fwexception_text.php
dbg>run
Can not map local FS file "fwexception_text.php" to any URL. This file must be under "/usr/local/apache/htdocs/" directory Check mapping settings for HTTP mode.

My PHP installation is in /usr/local.

Thanks for the reply.
View user's profileFind all posts by cjbottaroSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
sorry, it's my fault. You need set mode off.
Under mode, dbg-cli understands HTTP mode and consequently requires URLs and etc stuff. Please work with off (which is by default).
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 12 May 2005
Posts: 5
Reply with quote
Heh, this time...

dbg>set mode off
dbg>set cgiexec /usr/local/bin/php
dbg>file client_test.php
Reading symbols from client_test.php...done.
dbg>run

Program exited.
Session start timeout has expired.
Program is not being run.

I know there are some stickies about timing out, but do they apply to cli only programs?

Thanks again.
View user's profileFind all posts by cjbottaroSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
please run /usr/local/bin/php with -i argument and make sure if DBG module is installed and enabled.
View user's profileFind all posts by dmitriSend private messageVisit poster's website
CLI only, no web server ?
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic