How to change from preinstalled xdebug to Zend debugger?
Posted by: achristouio (---.90-149-222.nextgentel.com)
Date: July 10, 2012 01:08PM

I use Zend Studio for editing and after adding php 5.3.8, debugging won't work anymore since xdebug is the installed debugger, and trying to edit the php.ini is either overwritten at restart or something else is happening since pressing on php.ini in the Wamp menu give a file where the change has been removed.

How do I proceed to make a permanent change of the debugger?

(PS. I presume I can add another setup of php in case I add other editors, like Embarcadero RADphp to the list of php editing tools

Anyone?

Alf Christophersen

Options: ReplyQuote
Re: How to change from preinstalled xdebug to Zend debugger?
Posted by: achristouio (---.uio.no)
Date: July 16, 2012 03:29PM

To ask in another way,

Where is the setup for xdebug which is used to make the php.ini file for php v. 5.3.8, recently

; XDEBUG Extension
;
;
zend_extension = "c:/wamp/bin/php/php5.3.8/zend_ext/php_xdebug-2.1.2-5.3-vc9.dll"
;

[xdebug]
xdebug.remote_enable = off
xdebug.profiler_enable = off
xdebug.profiler_enable_trigger = off
xdebug.profiler_output_name = cachegrind.out.%t.%p
xdebug.profiler_output_dir = "c:/wamp/tmp"


I want to change this so zenddebugger.dll is used instead., like

[Zend]
Zend_debugger.allow_hosts=127.0.0.1/32,10.0.0.0/16,192.168.1.0/16,129.240.250.0/16
zend_debugger.expose_remotely=always
zend_extension_ts="c:/wamp/bin/php/php5.2.6/ext/ZendDebugger.dll"


So

Options: ReplyQuote
Re: How to change from preinstalled xdebug to Zend debugger?
Posted by: RiggsFolly (---.ppp.as43234.net)
Date: July 16, 2012 04:24PM

I think you have answered your own question havent you?

I would suggest that zend and xdebug wont play nice together so just comment out ALL references to xdebug in the php.ini


Heres the zend documentation which appears to say exactly what you have suggested
[static.zend.com]

Options: ReplyQuote
Re: How to change from preinstalled xdebug to Zend debugger?
Posted by: stevenmartin99 (Moderator)
Date: July 16, 2012 04:29PM

Its not in the php folder if that's what you
Mean.

Left click wamp icon > php > php.ini

Last 10 lines

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: How to change from preinstalled xdebug to Zend debugger?
Posted by: achristouio (---.uio.no)
Date: July 16, 2012 05:09PM

Finally got it working :-)

First, I copied the lines above from that php.ini and the last lines from the php.ini that is set up when selecting the other php, 5.2.6.

If I edit the content of php 5.2.6's phpForApache.ini in the bin folder and add something innocent, like a commentn, and restart, the comment will be visible also in the php.ini for 5.2.6.

But,

If I did edit the phpForApache.ini file for v.5.3.8 it was strangely enough overwritten. but maybe it was something that happened if 5.3.8 already was running.

Seems to have loaded zenddebug by now.

Hope it will be persistent.

Options: ReplyQuote
Re: How to change from preinstalled xdebug to Zend debugger?
Posted by: achristouio (---.uio.no)
Date: July 16, 2012 05:10PM

By the way, is it possible to have both debuggers installed at the same time?

Options: ReplyQuote
Re: How to change from preinstalled xdebug to Zend debugger?
Posted by: RiggsFolly (---.ppp.as43234.net)
Date: July 16, 2012 06:38PM

INFO ON PHP.INI


When you are running PHP via your webserver, Apache is what runs PHP so to speak.

The ini file used by PHP when you are running through your webserver and therefore Apache is in the x:\wamp\bin\apache\apachex.y.x\bin\ folder.

THATS WHY STEVE KEEPS TELLING YOU TO USE THE wamp manager -> PHP -> php.ini menu to open the editor on the correct file!!!!!!

There is also a php.ini in the x:\wamp\bin\php\php5.x.y folder. THIS IS USED BY THE PHP CLI ( CLI = Command Line Interface ) and also most of the wamp functionality by the way ( so have a care changing that )

There is also a phpForApache.ini file in the x:\wamp\bin\php\php5.x.y.



REASON FOR HAVING 2 or more:

When you use the wamp facility to switch version of PHP it copies the php.ini from the APACHE folder back into the PHP FROM version folder for safe keeping.
It then copies the phpForApache.ini file from the php folder of the PHP TO VERSION into the apache folder.



You should not be editing the phpForApache.ini file directly unless you REALLY know what you are doing as when you switch versions of php it is likely to be overwritten in this process. Or more likely any changes are just ignored as its not using that ini file anyway.



IN SHORT use the wampmanager -> PHP -> php.ini link to edit your currently running php.ini file.

Options: ReplyQuote
Re: How to change from preinstalled xdebug to Zend debugger?
Posted by: achristouio (---.uio.no)
Date: July 16, 2012 07:49PM

Problem is that I debug old code in 5.2 so it works in 5.3.
That mean, I switch continually btw. 5.2.6 and 5.3.8.

That also means, the apache php.ini is continually overwritten by the phpForApache.ini file each time I switch.

So, I neeeded to edit the 5.3.8 version so it didn't overwrite the edited content.

It was quite confusing for a while since it wasn't documented what original did overwrite the php.ini file in Apache directory

:-)

But seem to load correctly

(If I start also using an editor using xdebug, I will set up another directory for that)

Options: ReplyQuote
Re: How to change from preinstalled xdebug to Zend debugger?
Posted by: RiggsFolly (---.ppp.as43234.net)
Date: July 16, 2012 09:24PM

Quote

That also means, the apache php.ini is continually overwritten by the phpForApache.ini file each time I switch.


Not actually as there a 2 different iniForAcache.ini file each one stored in the PHP folder relevant to the PHP version.

If you have PHP5.2 running and edit with the wampmanager link it edits the ini file in the apache folder.

When you switch FROM 5.2 TO 5.3 wamp
1. copies the apache/ini to php 5.2 folder as iniForApche.ini
2. copies the php 5.3 folders iniForApache into the apache folder as php.ini

So the upshot is that you
1. activate the PHP version you want to configure THEN edit the php.ini using the wamp manage link.

2. activatre the next PHP version you want to configure THEN edit the php.ini using the wamp manage link.

When you next switch it all happens again THUS protecting the php config used in each version of PHP.


This way you could set up php 5.2 to use ZEND debugger and 5.3 to use XDEBUG

switching php versions will automatically save and restore the correct php.ini and restart apache to activate the new php config.

Options: ReplyQuote


Sorry, only registered users may post in this forum.