|Mac OS X - PDT - Zend Debugger: Requested URL Error [message #499118]
||Thu, 19 November 2009 17:57
| Norman Racine
Registered: November 2009
Undoubtedly my installation of PDT and Zend is not done correctly on Mac OS X (Snow Leopard).|
A simple first.php file includes ... <form action="./second.php" ...
When testing (Zend Debugger), I can verify the results of first.php without difficulty. Works very well, in fact. Once I select the submit button on the form, however, I receive the following error:
Page load failed with error: The requested URL was not found on this server.
When I load the same first.php file using Safari and the submit is invoked, the second.php file is called without incident.
Assuming it might be a Safari vs Internal Browser issue, I attempted to set the default browser to Safari (Eclipse->Preferences->General->Web Browser) ... but could not due to an error (The location value is not a valid path name). Maybe related.
Appreciate any help I can received. I am pretty sure this is a MAC OS X specific issue.
|Re: Mac OS X - PDT - Zend Debugger: Requested URL Error [message #820547 is a reply to message #499118]
||Wed, 14 March 2012 05: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 05:14]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.02449 seconds