Debug problem. |
Site Admin
|
you may want to check if file does exist first. Most probably it does not.
it's because you run another PHP installation under Apache and it may have different settings, for example include_path |
||||||||||||||||
_________________ The PHP IDE team |
Veteran
|
Hi Dmitri. If the file did not exist it would not work even if I switched to the external http server, but when I switch to the external server it does not complain about the existing file. I think that my existing PHP version (5.2.4) is older than the version included with the latest build, and that the new version is more picky about the file paths on windows. Please notice that the path is a mixture of backslash and forward slash and I think that is why it can't find the file, if I use the internal web server on windows. (Because forward slash is not a path separator on windows) Is there a way to change this, cause changing the root folder to use forward slashes does not work in PHPed. And during install I said NO to get the php.ini files overwritten, so the debugger should work using the external http, but using that the breakpoint is not catched. And even if I did say YES to have the php.ini file overwritten, then that would not really change it, cause it will still not overwrite my php.ini settings for my external http server. What do you think.? |
||||||||||||||||||
|
Site Admin
|
I'm not sure what happend to people today... (or may be to me alone) Please read the other part of my answer. Hope it explains why it may happen. and no, I did not encounter any problems with forward slashes vs backward ones under windows. Seems both work fine.
when installer asked to overwrite php.ini, it meant php that was already installed with phped. Not your web server's php. |
||||||||||||||||
_________________ The PHP IDE team |
Veteran
|
Ok Sorry Dmitri, how would you be able to know that the include_path on the external server is not set to the above. External Webserver : include_path=".;C:/www/TechPlat/apache/php/PEAR" Internal webserver : include_path = ".;C:\Program Files\nusphere\phped\php5\..\include_lib;C:\Program Files\nusphere\phped\php5\PEAR" So I may not have made it clear but it is not a matter of different include_path settings. I HAVE FOUND THE PROBLEM. It is the DOCUMENT_ROOT (the path to the server htdocs) The external server has this pointing to c:\www\TechPlat\apache\htdocs but the internal has it pointing to c:\www\TechPlat\apache\htdocs\morgenfruen Because this is what it is set to on the project properties. Now WHY that has been set after the update I can't tell, I can tell you for SURE that I have been able to debug using the internal server before I made the update. At some point I got an error opening PHPed about a project XML file that had errors, could that have something to do with the DOCUMENT_ROOT being changed ? |
||||||||||||||||||
|
Veteran
|
Ok Dmitri.
I can see there is a small problem. The internal webserver obviously sees the project ROOT directory as the webservers root (the DOCUMENT_ROOT environment variable). There is no where in the project settings where I can change this DOCUMENT_ROOT setting. And I do not want to change the ROOT directory to the same DOCUMENT_ROOT directory as my external web server, because then code completion will be useless, because of the other projects I am working on. Is there a way I can control the DOCUMENT_ROOT setting per project basis? It still does not explain why debugging using the external http server fails. So I looked at phpinfo, and noticed that I was still using debugger 3.2.3, so I upgraded to the latest 3.2.12 and I downloaded the debugger wizard file and ran it. It gave me this output.
Ok so I created a simpel test fil named nusphere.php with this content
So to see if everything worked I tried to run it but got this error Clicking OK opens the project settings Please note that I have set this according to the debugger wizard file. So what do I do now, when I can't get the internal or external webserver to debug ? Internal debugging requieres me to be able to overwrite the DOCUMENT_ROOT for the internal webserver, and external http debug won't work with the settings recommended by the excellent wizard. |
||||||||||||||||
|
Veteran
|
Ok I changed the Remote Root Directory to C:\www\TechPlat\apache\htdocs\ which is the same of my apache server.
But debugging still don't work. If I run a file in the debugger and put a breakpoint in the very first line, it is ignored. If I turn on the "Stop on the first line after run" then it goes into debug mode, but if I then press F5, all other breakpoints are just ignored. This is very frustrating. The log area has this text: Failed to find a way to load "C:\www\TechPlat\apache\htdocs\morgenfruen\index2.php" remote file. Opening it using debugger protocol I tried to copy the line above from the log to the clipboard using the right click feature, but this does not work. |
||||||||||||
|
Site Admin
|
Well, with Apache ("external" server as you call it), you have DOCUMENT_ROOT == WEB ROOT == C:\www\TechPlat\apache\htdocs\
With SRV ("internal" server as you call it) you have DOCUMENT_ROOT == PROJECT ROOT == C:\www\TechPlat\apache\htdocs\morgenfruen\ To avoid problems with include(), I'd highly recommend you not to use DOCUMENT_ROOT, but dirname(__FILE__) or have dot (.) in the include_path and use relative directories in the include(). |
||||||||||||
_________________ The PHP IDE team |
Veteran
|
I can't I needed to find a way to place my configuration file to make sure that I would always be able to find it. Regardless of how you install my script. You see, I am trying to build a framework that can be installed into any CMS. Theoretically I can use the __FILE__ and then just ../../ until I get to the Path. I tried to build a solution that did that and it was a mess to include in many files. The most secure way to make sure always to find the configuration file, is to "jump" straight to the DOCUMENT_ROOT, and place it there. However this does not explain WHY the debugger does not pick up my breakpoints. And also why I have been able to debug for the last 6 months in this project and suddenly now can not. With these project settings, things almost works. The apache server runs my code from within PHPed, and I can run in debug mode, and get the debugger to stop at the very first line (if I turn on that feature) but it ignores my breakpoints, and something is not right since the log file showed the above mentiond error message. This one. Failed to find a way to load "C:\www\TechPlat\apache\htdocs\morgenfruen\index2.php" remote file. Opening it using debugger protocol |
||||||||||||||
|
Veteran
|
|
||||||||||||
|
Site Admin
|
Could you please try add that slash back and check if it stops working again? (it should not stop)
|
||||||||||||
_________________ The PHP IDE team |
Debug problem. |
|
||
Content © NuSphere Corp., PHP IDE team
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by