NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Problem with URL mapping *solved*


Joined: 03 Mar 2004
Posts: 40
Reply with quote
Hi all,

I'm having trouble getting a particular debugging configuration to work. I have a project setup like this:

Code:
Project
    Root Directory:  C:\web\askeet
Mapping
    Run Mode: HTTP mode (3rd party WEB server)
    Root URL:  http://askeet/
    Remote root directory: c:/web/askeet/web

Note that the Project Root and the Remote Root are different.

With this configuration, I get the following error:
Quote:
Failed to start debugger session (timeout)
Please verify if debugger module is installed on the server that corresponds to "http://askeet/web/index.php" URL.
Also make sure that server is up and running.

Note that the URL is mis-mapped. It should be "http://askeet/index.php" and that's why it can't find the debugger.

If I change the Remote Root to "c:/web/askeet/" (which is incorrect) I get the same error with the same mis-mapped url

If I change the Project Root to "c:/web/askeet/web" I get some joy -- the debugger runs. But then generates an error for every file that's called on the remote that is no longer in the project:
Quote:
Failed to map remote file
"C:\web\askeet\cache\frontend\prod\config\config_core_compile.yml.php"
to any local file

So it looks to me like either a phped mapping bug or a configuration problem.

I'm running the debugger from within PHPed by opening c:/web/askeet/web/index.php and pressing f9. I also get the same error if I use Tools/Open URL and open http://askeet.

Any help would be appreciated -- I'm a long time PHPed user who switched to ZDE a couple of years ago and I'm trying very hard to come back. Smile
View user's profileFind all posts by jonphippsSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8340
Reply with quote
There are two different scenarios possible:
I. WEB server is running on your local machine
In this case Remote Root and Project Root must be the same.
If for example you run Apache, I'd recommend you to set project root to its DocumentRoot directory, or HomeDirectory in case of IIS.
URL should be http://localhost/ (or https://localhost/)

II. WEB server is running on a different machine.
Let's call your local machine as W (workstation) and server as S machine.
Project root should be a valid directory on W machine.
Remote root should be a valid directory on S machine.
URL should be a valid url (it does not depend on W or S).
There a two possible ways:
II.a) You may want to publish your local files from project's directory tree to server's DocumentRoot using FTP, WEBDAV or SFTP
PhpED supports all these protocol. Just create an account and put its name in the project properties, publishing account input.
Suppose your server runs on windows and has C:\web\askeet\ as Document Root (it's on S machine). Also suppose you have copy of all web files on your W machine in directory C:\web. Imagine that you managed to run FTP server on S machine and it provides access to Document Root (C:\web\askeet\) directly (it's FTP root).
In this case project properties are obviously simple: Project Root->C:\web\ Remote Root->C:\web\askeet\ Publishing Root->/ and finally URL->http://askeet/
You may want to verify if everything is correct by checking a file in the web's root. Say it's index.php. Then this file should be in C:\web\index.php on W machine, in C:\web\askeet\ directory on S machine and be accessible as http://askeet/index.php on the server.
II.b) You may want to avoid local-to-server deployment and access to server file's direcly. Suppose directories are the same as in the example above. In this case you'd add network share of C:\web\askeet\ directory on S machine and assign a name to it. Say it is named as "webroot".
On your W machine, you'd map it as networking disk. (actually you can access to shared directory by server name prefixed with two slashes but it runs slower). Say, you mapped it as disk Y:\. In this case you see index.php mentioned above as Y:\index.php on your W machine, as C:\web\askeet\index.php on your S machine and http://askeet/index.php via http.
So the project properties should be Project root->Y:\ Remote Root->C:\web\askeet\ URL->http://askeet/

That's all tricks.
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 03 Mar 2004
Posts: 40
Reply with quote
ddmitrie wrote:
There are two different scenarios possible:
I. WEB server is running on your local machine
In this case Remote Root and Project Root must be the same.

This wasn't clear to me and is very helpful.
Your thorough description of scenario II was also very helpful.

Thanks!

ddmitrie wrote:
That's all tricks.

Well, there's one more -- I ended up using the different Project and Remote Roots, but still on my local machine and solved the "Failed to map remote file" by adding entries for the folders containing the missing files ('C:/PHP/PEAR' and 'C:/web') to the mapping table.

PHPed really is a great product and I've missed using it. I have to say it's a little odd to have used PHPed all day very comfortably for several years, switched, and then come back to it in a 'new' version. Sometimes I'm saying to myself "I know how to do that, why doesn't it work?" but I'm thinking of the wrong program or the wrong version. But more often I'm saying "That's so cool! I didn't realize how much I missed that feature."

Thanks for an excellent piece of work.
View user's profileFind all posts by jonphippsSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8340
Reply with quote
Thanks for your kind words.

Quote:
I'm saying "That's so cool! I didn't realize how much I missed that feature."

Would you allow us to put these words onto the web? Smile
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 03 Mar 2004
Posts: 40
Reply with quote
ddmitrie wrote:
Thanks for your kind words.
Would you allow us to put these words onto the web? Smile

Sure, although I haven't decided to come back yet. Almost... Smile
View user's profileFind all posts by jonphippsSend private message
Problem with URL mapping *solved*
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic