Yesterday, I had some xdebug problems which people on this site very graciously helped me through. Everything was working just fine, when suddenly, it stopped working for no disernable reason.
What I have is Eclipse running a Zend PHP debugger. I am working my way through David Powers’ book: PHP Solutions and using his online code, so I am doing nothing exotic. When I try to run my PHP Webpage, I get a message saying: “Debugger Error” “Specified script cannot be found”. This tells me that the debugger can’t find the PHP.exe program (right?). Knowing that, I go to the Run Configurations dialog box and I notice that the PHP Executable form box has changed from XDebug Defaut (which is what it is when it is working) to xdebug (C:\xampp\php\php.exe).
I didn’t change it. I was just editing a file to make a change the book suggested when this changed and the darn thing quit working. I am not quite sure how to change the PHP executable preferences back to the working value or prevent this from happening again.
OK. I have a fix. It is weird, but it does work. First some back ground that I left out above (written before I fully understood the problem):
The problem reappeared and actually I think it happened the first time after I added the following code snippet to the wrong location:
This was added to the following code (copied from PHP Solutions by David Powers) to the location BEFORE the
tag instead of after it:
This caused the Run Configuration to change from a PHP Web Page to a PHP Script. Ellipse then couldn’t find the fictitious script.
The solution to this problem is as follows:
1) Fix the code
2) go into RUN->Run Configurations
3) Delete the spurious configurations under PHP Script and reselect the correct configuration.
4) turn Auto generate on or off and then press apply and then do it again to bring it back to the original configuration.
The problem should go away.