NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Install debug on shared server


Joined: 18 Mar 2008
Posts: 14
Reply with quote
I am using a hosting service (HostingZoom.com) - and have successfully configured a custom php.ini module.

Just for background - the only way they allow custom php.ini is by 1st configuring .htaccess (in public_html) with the following line:
Code:
Action application/x-httpd-php5 /php5.cgi

which points to the file php5.cgi file:
Code:
#!/bin/sh
exec /usr/local/cpanel/cgi-sys/php5 -c /home/MY_DOMAIN/php.ini

This is working (have tested custom features like append and prepend files)

NOW for the debugger -

Because this is a shared hosting scenario, I don't have access to directories above /home/MY_DOMAIN. Didn't think this matters, because I can tell php (through php.ini) where the debug file is (SOMEONE PLEASE CONFIRM). I placed the dbg.so-5.2.x in my uppermost dir (/home/MY_DOMAIN/), and added the necessary zend_extension line and [debug] sections in my custom php.ini:

Code:
[Zend]
zend_optimizer.optimization_level=15
zend_extension_manager.optimizer=/usr/local/Zend/lib/Optimizer-3.2.0
zend_extension_manager.optimizer_ts=/usr/local/Zend/lib/Optimizer_TS-3.2.0
zend_optimizer.version=3.2.0

zend_extension=/home/MY_DOMAIN/dbg.so-5.2.x

zend_extension=/usr/local/Zend/lib/ZendExtensionManager.so
zend_extension_ts=/usr/local/Zend/lib/ZendExtensionManager_TS.so


[debugger]
debugger.enabled=on
debugger.profiler_enabled=on 
debugger.hosts_allow= XX.XX.XXX.XXX localhost
debugger.hosts_deny=ALL
debugger.ports=7869, 10000/16


I run a phpinfo(), dbg-wizard.php and PhpED debug. All 3 tell me something like 'I noticed that DBG (PHP DEBUGGER) is NOT INSTALLED'

Help
View user's profileFind all posts by garflySend private message
Veteran

Joined: 06 Jun 2007
Posts: 289
Location: Vancouver, Canada
Reply with quote
In my experience, the DBG module must be loaded before the Zend Optimizer module. Your php.ini loads it the other way round. I suggest you move zend_extension=/home/MY_DOMAIN/dbg.so-5.2.x line to before the [Zend] section.

_________________
Smile
View user's profileFind all posts by annoSend private messageVisit poster's website


Joined: 18 Mar 2008
Posts: 14
Reply with quote
OK - so I am incrementally getting closer. To get to my current point (still not working - but close), I have made just about every mistake possible. Here are some things to watch out for:

1) make sure you are using the correct version of the dbg.so-5.2.x debugger (there is one in the x86 folder and one in the x86_64 folder - rookie mistake, I know)

2) I kept getting a 'Failure, core dump' message when using the x86 glibc 2.7 version. I couldn't figure out how to get my hoster's version of glibc, so I just tried the 2.3 version, and I seem to be 'better'.

I am currently getting a 'undefined symbol: OnUpdateLong' while loading the 2.3 version. Other posts are telling me that this is something to do with php4. But, as I stated in posts above, I am running php5 (confirmed by dbg-wizard page).

Marching forward (looking for suggestions)...
View user's profileFind all posts by garflySend private message


Joined: 18 Mar 2008
Posts: 14
Reply with quote
Still need help:

I am seeing from another post that OnUpdateLong error is caused by compiling php w/ '--enable-versioning'

problems-installing-debugger-solved-t2405.html

But I can't re-compile php on my shared server (can I?)

I am stuck - any suggestions?
View user's profileFind all posts by garflySend private message


Joined: 18 Mar 2008
Posts: 14
Reply with quote
Making incremental improvements.

There seems to be no errors when I rung pages - only when I test my server from ssh command line will I get the OnUpdateLong error.

When I run pages through the browser, I don't get any errors, and I get the following message from dbg-wizard.php:


DBG (PHP DEBUGGER) Version 3.2.14 is INSTALLED

Yea!

Now I try to use the debugger button on the client side (in PhpEd) for a simple 'hello world' index.php, and I get a popup telling me that the debugger has timed out (could not conntect to the server).

Trying the solve the next problem...

Any help would be appreciated (I have a correctly installed server dbg - I can't seem to get my client-side debugger to communicate with it).

Thanks all in advance,
View user's profileFind all posts by garflySend private message


Joined: 18 Mar 2008
Posts: 14
Reply with quote
Found this article about timeouts-

tip-troubleshooting-debugger-communications-t579.html#2264

Step one:
Quote:
1. Make sure that debugger module has the same version as dbglistener. PhpED 3.3 comes with DBG-2.16 and can work with DBG-2.16 only.


Took me a while to figure that the 'dbglistener' was the little satellite icon on the icon bar. Opening it up had, and hitting the i (information) incon tells me that the PHP DBG listener is version 3.2.14.

Server side module is: DBG (PHP DEBUGGER) Version 3.2.14 is INSTALLED (got this line from dbg-wizard.php)

Ok so far...
View user's profileFind all posts by garflySend private message
Veteran

Joined: 06 Jun 2007
Posts: 289
Location: Vancouver, Canada
Reply with quote
Have you tried my suggestion to load the DBG module before the Zend Optimizer module? If the Zend Optimizer is not needed, you might be better off not load it at all.

_________________
Smile
View user's profileFind all posts by annoSend private messageVisit poster's website


Joined: 18 Mar 2008
Posts: 14
Reply with quote
Sorry about not responding anno, but yep, I tried that, and it didn't seem to make much of a difference on my specific configuration.

As far as I can tell, I have actually progressed: The DBG module seems to be loading on the server! (dbg-wizard.php tells me so- Yea). Because it's a publicly hosted server, and my client is operating through a firewall, PHP DBG listener (desk top) doesn't seem to be communicating with the server DBG module. (I tried and failed on a few of the telnet commands)

My next step it to figure out how to get them to chat with each other through SSH.

ANNO, thanks for looping back, checking up, and throwing a recommendation into the ring. Very much appreciated.
View user's profileFind all posts by garflySend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8342
Reply with quote
please try to run debugger with IDE and check browser output. If debugger did not start debug session for a reason, it will tell you so in the browser.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Install debug on shared 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