Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » PHP Development Tools (PDT) » Mac OS X - PDT - Zend Debugger: Requested URL Error(Unable to link (invoke) php due to file not found)
Mac OS X - PDT - Zend Debugger: Requested URL Error [message #499118] Thu, 19 November 2009 22:57 Go to next message
Norman Racine is currently offline Norman RacineFriend
Messages: 2
Registered: November 2009
Junior Member
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 #499125 is a reply to message #499118] Thu, 19 November 2009 23:49 Go to previous messageGo to next message
Norman Racine is currently offline Norman RacineFriend
Messages: 2
Registered: November 2009
Junior Member
Okay ... we can ignore the stuff about Safari vs internal web browser. I got that to work by being a bit more attentive. The core issue remains, however.
Re: Mac OS X - PDT - Zend Debugger: Requested URL Error [message #820547 is a reply to message #499118] Wed, 14 March 2012 09:12 Go to previous message
Vincent Dirks is currently offline Vincent DirksFriend
Messages: 1
Registered: March 2012
Junior Member
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("" . $_SERVER["HTTP_HOST"] . $_SERVER["SCRIPT_NAME")) ?>/results.php" method="post">

(please you will need to remove the dot in the 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

Previous Topic:Problem with Code Explorer (Eclipce 3.7.0 + PDT 3.0.0 + ZendDebugger)
Next Topic:Permission problems with Eclipse Helios and Subversive
Goto Forum:

Current Time: Wed Feb 08 22:46:34 GMT 2023

Powered by FUDForum. Page generated in 0.02152 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top