NuSphere Forums Forum Index
NuSphere Forums
Reply to topic


Joined: 07 Jul 2006
Posts: 6
Reply with quote
Is there some easier way to get DBG to work on OS X ?

The goal: A working PHP degbugger, like in Zend, within Eclipse

Mac 10.4.7
PHP 5.1.4 Entropy Package
Apache 1.3.33
Eclipse 3.2.0
PHPEclipse [updated within Eclispe]


When I tried to recompile PHP [from php.net] with the last post's configuration files, I get
configure: error: libjpeg.(a|so) not found.

Googling for the errir, I:
installed the missing jpeg-6b library
updated gd with fink update gd

After this, I recompiled php and still see the same error

I can't help but wondering if I am on a wild goose chase
Is there an easier way to do this ?

many thanks
g
View user's profileFind all posts by grahamSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8340
Reply with quote
I'm sorry to say that we do not provide support for compling and/or running PHP under Mac OS X.
If you're using "PHP 5.1.4 Entropy Package", why would you need to compile anything in php?
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 07 Jul 2006
Posts: 6
Reply with quote
Apologize for not being clear.
PHP 5.1.4 works fine on my system. Smile

The problem:
I am not able to compile DBG Debugger
From the below compile errors, do you know what it could be ?


I downloaded dbg-cli-2.13.1-src and.....
./configure appears to finish without errors
'make' produces the below erros

make all-recursive
Making all in pcre
gcc -DHAVE_CONFIG_H -I. -I. -I.. -DLINK_SIZE=2 -DPOSIX_MALLOC_THRESHOLD=10 -g -O2 -c chartables.c
gcc -DHAVE_CONFIG_H -I. -I. -I.. -DLINK_SIZE=2 -DPOSIX_MALLOC_THRESHOLD=10 -g -O2 -c pcre.c
gcc -DHAVE_CONFIG_H -I. -I. -I.. -DLINK_SIZE=2 -DPOSIX_MALLOC_THRESHOLD=10 -g -O2 -c pcreposix.c
rm -f libpcre_1.a
ar cru libpcre_1.a chartables.o pcre.o pcreposix.o
ranlib libpcre_1.a
Making all in dbgbase
gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../pcre -I../ -DDBG_USE_STDALLOCA -g -O2 -c dbg_net.c
c++ -DHAVE_CONFIG_H -I. -I. -I.. -I../pcre -I../ -DDBG_USE_STDALLOCA -g -O2 -c DbgSess.cpp
c++ -DHAVE_CONFIG_H -I. -I. -I.. -I../pcre -I../ -DDBG_USE_STDALLOCA -g -O2 -c DbgSpawn.cpp
c++ -DHAVE_CONFIG_H -I. -I. -I.. -I../pcre -I../ -DDBG_USE_STDALLOCA -g -O2 -c ListenerBase.cpp
c++ -DHAVE_CONFIG_H -I. -I. -I.. -I../pcre -I../ -DDBG_USE_STDALLOCA -g -O2 -c dbgbase_globals.cpp
dbgbase_globals.cpp: In function 'int dbh_check_new_client_connect(int, sockaddr*, int)':
dbgbase_globals.cpp:709: error: invalid conversion from 'int*' to 'socklen_t*'
dbgbase_globals.cpp:709: error: initializing argument 3 of 'int accept(int, sockaddr*, socklen_t*)'
make[2]: *** [dbgbase_globals.o] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive-am] Error 2

Some have suggested that you are supposed to roll your own PHP from source.
As I am using Marc Lyniages Entropy PHP package 5.1.4, does anyone recommend the correct PHP tar to download for DBG

I have:
OS X 10.4.7
PHP 5.1.4 www.entropy.ch Release 5 (Universal Binary)
Eclipse 3.1
PHPEclipse [newest update from within Eclipse]

any help is appreciated
View user's profileFind all posts by grahamSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8340
Reply with quote
I'm not familar with "PHP 5.1.4 Entropy Package" but on most platforms you'd need not only php package but php-devel package that comes with necessary headers. Otherwise it won't compile.
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 07 Jul 2006
Posts: 6
Reply with quote
The Entropy Package 5.1.4 is the standard OS X package listed on http://www.php.net/downloads.php under 'Binaries for Other Systems'

I'll see if I can find a php-devel package for OS X
thanks
View user's profileFind all posts by grahamSend private message


Joined: 07 Jul 2006
Posts: 6
Reply with quote
FYI, I was able to get a succesful compile by changeing the file:dbg-cli-2.13.1-src/dbgbase/dbgbase_globals.cpp
ret_val = accept(listen_socket, &laddr, &siz); was changed to
ret_val = accept(listen_socket, &laddr, (socklen_t *) &siz);

even so, the dbg does not load with PHP
I also checked to see if dbg.so actually exists in /usr/local/php5/lib/php/extensions/no-debug-non-zts-20050922
Unfortunately it does not Sad

I tried changing my configure script to match the PHP 5.1.4 configure settings:
sudo ./configure --enable-dbg=shared --with-dbg-profiler --with-php-config=/usr/local/php5/bin/php-config --prefix=/usr/local/php5

This produces the errors:
when I tried to configure with the new settings, I got the errors:
make all-recursive
Making all in pcre
make[2]: Nothing to be done for `all'.
Making all in dbgbase
make[2]: Nothing to be done for `all'.
Making all in dbg
make[2]: Nothing to be done for `all'.
Graham-Andersons-Computer:~/Desktop/dbg-cli-2.13.1-src robert$ make install
Making install in pcre
make[2]: Nothing to be done for `install-exec-am'.
make[2]: Nothing to be done for `install-data-am'.
Making install in dbgbase
/bin/sh ../config/mkinstalldirs /usr/local/php5/lib
/usr/bin/install -c -m 644 libdbgbase.a /usr/local/php5/lib/libdbgbase.a
install: /usr/local/php5/lib/libdbgbase.a: Permission denied
make[2]: *** [install-libLIBRARIES] Error 71
make[1]: *** [install-am] Error 2
make: *** [install-recursive] Error 1


This is a pretty tough problem Sad
Is anyone successfully using DBG Debugger with OS X and PHP 5.1.4 ?
View user's profileFind all posts by grahamSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8340
Reply with quote
it looks like you are trying to compile dbg-cli (client console), not dbg debugger module (server part).
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 07 Jul 2006
Posts: 6
Reply with quote
Ok Smile Now it shows up in phpinfo()
At the end of this message is what I did to make it compile with PHP 5.1.4 Entropy

So now, when attempting to run DBG debugger in Eclipse, I am getting the error
An internal error has occured during: "Computing hasChildren"
java.lang.NullPointerException
Basically, I followed the instruction in http://www.php-debugger.com/

My settings in Debug Are:

File:
Project: AjaxTests
File: arrayTest.php

Arguments:
Working Directory: /Users/robert/Sites [greyed as I checked the Default Directory Button]
checked: user Default Directory

Environment:
checked: Remote Debug
Remote Sourcepath: /Users/robert/Sites/AjaxTests

Interpreter:
/usr/bin/php
Note: Interpreter shows up as a 1/4 button without a name

In Debug Mode, the Console is correctly identifying breakpoint and echoing the result used in the 'arrayTest.php' example from the 'plog' page

However, the debug is only outputing errors


Well, at least I'm at step 2
any help is appreciated






What I did Install DBG Debugger for Entropy PHP 5.1.4 OS X
* Get PHP Package from http://www.entropy.ch/software/macosx/php/
* Download dbg-2.13.1 module sources from http://www.php-debugger.com/dbg/downloads.php
* chmod 755 ./build/shtool
* sudo ./configure --enable-dbg=shared --with-dbg-profiler --with-php-config=/usr/local/php5/bin/php-config --prefix=/usr/local/php5
* sudo make
* copy the newly created './modules/dbg.so' into the php extensions directory
'/usr/local/php5/lib/php/extensions/no-debug-non-zts-20050922'
* Add this to the php.ini file in '/usr/local/php5/lib/php.ini'
[debugger]
extension=dbg.so
/usr/local/php5/lib/php/extensions/no-debug-non-zts-20050922
debugger.enabled=on
debugger.profiler_enabled=on
debugger.hosts_allow=127.0.0.1
debugger.hosts_deny=ALL
debugger.ports=7869, 10000/16
View user's profileFind all posts by grahamSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8340
Reply with quote
Quote:
sudo ./configure --enable-dbg=shared
Quote:
sudo make

don't run configure with root privileges. They are needed only if you run 'make install' and prefix points to a system directory such as /usr or /usr/local - it's where privileges are really needed.

Quote:
debugger.hosts_allow=127.0.0.1
debugger.hosts_deny=ALL
debugger.ports=7869, 10000/16

These settings have no effect for dbg 2.13 or 2.11 (freeware version).

Quote:
However, the debug is only outputing errors
Quote:
An internal error has occured during: "Computing hasChildren"
java.lang.NullPointerException

It does not look like a problem with debugger. From the message it's clear that Java exception triggered. Consult with Eclipse gurus. We there are responsible for PhpED IDE Smile It works like a charm without nightmare that you experienced.
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 07 Jul 2006
Posts: 6
Reply with quote
does PHPIDE work within Eclipse ?
Or, is it separate
View user's profileFind all posts by grahamSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8340
Reply with quote
if you mean NuSphere PhpED IDE, it is a self-contained IDE.
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 01 Aug 2006
Posts: 1
Reply with quote
I am reciveing the same error:

An internal error has occured during: "Computing hasChildren"
java.lang.NullPointerException

Has anyone found a fix for this?

-Humberto
View user's profileFind all posts by humbertoSend private message
php under Mac OS X
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