NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
[resolved] DBG 2.15 not working, at all


Joined: 29 May 2008
Posts: 9
Reply with quote
Haven't gotten the slightest debugger-like behavior out of it.

I am trying to run locally on a Linux machine, using the CLI and running scripts directly (which would, I think, be the simplest case).

I put the so in the lib directory under the name dbg.so-5.1.x (I am running PHP 5.1.6)

I put the following at the end of the php.ini

Code:
extension="dbg.so-5.1.x"
[debugger]
debugger.enabled = On
debugger.profiler_enabled = Off


phpinfo returns the following:
Code:
This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
    with eAccelerator v0.9.5.2, Copyright (c) 2004-2006 eAccelerator, by eAccelerator
    with DBG v2.15.5, (C) 2000,2007, by Dmitri Dmitrienko


I wrote a simple PHP script:
Code:
<?
function f() {
    echo "hello, there";
}
f();
?>


And here's what happens (or fails to happen):

Code:
DBG php debugger, version 2.15.5, Copyright 2001, 2007, Dmitri Dmitrienko, www.nusphere.com
dbg>file myfile.php
Reading symbols from myfile.php...done.
dbg>run

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


No plausible perturbation I could think of in any of these steps made the slightest observable difference.

So tell me, is it possible to get DBG to do anything? If so, how?
View user's profileFind all posts by mlortonSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8342
Reply with quote
DBG 2.15 (free version) is not compatible with php opcode caches like eAccelerator.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
[NOT resolved] DBG 2.15 not working, at all


Joined: 29 May 2008
Posts: 9
Reply with quote
Quote:
DBG 2.15 (free version) is not compatible with php opcode caches like eAccelerator.
Good catch, but no, still doesn't work.

I commented the eAccelerator description out of /etc/php.ini and the phpinfo() no longer reports it as present, but DBG maintains its sphinx-like silence on the subject.
Code:
DBG php debugger, version 2.15.5, Copyright 2001, 2007, Dmitri Dmitrienko, www.nusphere.com
dbg>file myfile.php
Reading symbols from myfile.php...done.
dbg>run

Program exited.
Session start timeout has expired.
Program is not being run.
dbg>list
No symbol table is loaded.  Use the "file" command.
dbg>


Any ideas of how I might go about debugging the debugger? Thanks.

Quote:
Quis custodiet ipsos custodes? (Who watches the watchman?)
-- Juvenal
View user's profileFind all posts by mlortonSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8342
Reply with quote
is there only one php in your system?
will it see its configuration file if you run it from say your home directory?
did you set debugger PORT value to 7869?

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 29 May 2008
Posts: 9
Reply with quote
dmitri wrote:
is there only one php in your system?

AFAIK. Certainly, when I run PHP from my home directory, the phpinfo() command says that I included the DBG plug-in.
dmitri wrote:
will it see its configuration file if you run it from say your home directory?

See above.
dmitri wrote:
did you set debugger PORT value to 7869?

I modified the /etc/php.ini to include the lines
debugger.port=7869
debugger.host=clienthost

And I tried running the CLI with and without --port=7869

Needless to say, no change in the program's behavior was observed. Even helloworld.c is no more stoically unvarying in its indifferent to external circumstances than is DBG.
View user's profileFind all posts by mlortonSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8342
Reply with quote
Quote:
I modified the /etc/php.ini to include the lines

I meant debugger port in dbg-cli: set port 7869
also, it's not clear if you set path to php: set cgiexec /usr/bin/php-cgi
and turned http mode off: set mode off

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 29 May 2008
Posts: 9
Reply with quote
Thanks for the quick reply.

dmitri wrote:

I meant debugger port in dbg-cli: set port 7869
also, it's not clear if you set path to php: set cgiexec /usr/bin/php-cgi
and turned http mode off: set mode off


I didn't before, but now:

Quote:
DBG php debugger, version 2.15.5, Copyright 2001, 2007, Dmitri Dmitrienko, www.nusphere.com
dbg>set port 7869
dbg>set mode off
dbg>set cgiexec /usr/bin/php-cgi
CGI handler "/usr/bin/php-cgi" not found.
dbg>set cgiexec /usr/bin/php
dbg>file myfile.php
Reading symbols from myfile.php...done.
dbg>run

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


Quote:
A foolish consistency is the hobgoblin of little minds.
-- Emerson
View user's profileFind all posts by mlortonSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8342
Reply with quote
if php-cgi is not in /usr/bin, where is it?
Is what you run php-cgi or php cli?
Debugger console supports only HTTP mode and CGI mode. Php cli is not supported (at the moment).

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 29 May 2008
Posts: 9
Reply with quote
dmitri wrote:
if php-cgi is not in /usr/bin, where is it?
Is what you run php-cgi or php cli?
Debugger console supports only HTTP mode and CGI mode. Php cli is not supported (at the moment).

I don't know and neither does "find" on my computer. Google doesn't know much on the subject either.
What I run from the command line is "php". Is that CGI or CLI? How can I tell? Is there a pre-compiled version of php-cgi 5.1.6 for Linux I could download?
View user's profileFind all posts by mlortonSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8342
Reply with quote
You may want to check your linux distro to see if php-cgi is included there. Most probably it is.
To see whether particular php binary is CGI or CLI you only need to check its output for --version command line option. For example PHP 5.1.6 (cgi) or PHP 5.1.6 (cgi-fcgi) will be shown for CGI.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 29 May 2008
Posts: 9
Reply with quote
dmitri wrote:
You may want to check your linux distro to see if php-cgi is included there. Most probably it is.
To see whether particular php binary is CGI or CLI you only need to check its output for --version command line option. For example PHP 5.1.6 (cgi) or PHP 5.1.6 (cgi-fcgi) will be shown for CGI.


Quote:

php --version
PHP 5.1.6 (cli) (built: Jan 29 2008 16:59:26)
Copyright (c) 1997-2006 The PHP Group


And no, php-cgi doesn't seem to be anywhere on my computer. So I'm screwed? Spending a day downloading and compiling PHP from source just so DBG will work isn't very appealing, given my track record with it so far.
View user's profileFind all posts by mlortonSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8342
Reply with quote
hmm. People rarely need to debug their php scripts under CLI. What they need the most is debugging their web sites and DBG is very strong in this area. Did you by any chance try NuSphere PhpED 5.2 that comes with DBG 3.2.14?

Regarding php-cgi under linux, it's intalled under my CentOS 5.1 with php-cli-5.1.6-15.el5 rpm:

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
[resolved] DBG 2.15 not working, at all
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 2  

  
  
 Reply to topic