|Re: Mac OS X - PDT - Zend Debugger: Requested URL Error [message #820547 is a reply to message #499118]
||Wed, 14 March 2012 09:12
| Vincent Dirks
Registered: March 2012
I'm rather new to PDT too and struck the same problem. I'm also running PDT on MAC with Zend Debugger. |
I was following instructions in os-php-eclipse-pdt-debug-pdf.pdf (use google to find it) which I found quite useful although it is a bit out of date.
I think that PDT for our configuration/platform seems to have issues finding your ./second file for the purpose of debugging it, although when you are viewing it with your browser it seems to be fine.
I spent a fair bit of time with PHP Server settings, in particular the Server Path Mappings as well as with where exactly the project files and/or the application php code files reside but nothing worked.
I noted that there are CLI and CGI versions of the php executable. I understand that the CLI version is for Command Line Interface, ie. using PHP locally rather than for web based stuff. Not sure how, but I ended up with CLI. It seems to be working ok for me except for this little problem. I did notice that the CLI version differs in one aspect from CGI in that CLI does not change directories to the location of the php file being executed.
In the end to solve the problem I just loaded the form action with the complete URL of the second file to call, and this now works with PDT and Zend debugger. This does become a pain when you're developing on a local machine and then deploying to a web visible machine, but I just used the following bit of PHP code to prepend the first page's location.
<form action="<?php print(dirname("ht.tp://" . $_SERVER["HTTP_HOST"] . $_SERVER["SCRIPT_NAME")) ?>/results.php" method="post">
(please you will need to remove the dot in the ht.tp:// as this forum is blocking me from puting in any links.)
The dirname function just trims off the calling page's name and we then append results.php to make the action value.
With this I can debug in Eclipse, and use it in my browser directly, both locally and remotely.
I know this may not always work (eg with when you need a QUERY_STRING) but its a start.
[Updated on: Wed, 14 March 2012 09:14]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.06687 seconds