NuSphere Forums Forum Index
NuSphere Forums
Reply to topic


Joined: 21 Oct 2004
Posts: 81
Location: UK
Reply with quote
This is really annoying me yet again. It can not be that complex to set up debug mapping when my project's top most directory is not the root URL. I'm getting the error "Project mapping URL is not specified. Please enter a valid Root URL that corresponds to the top most directory of the project". There is no such URL!! Does PHPed really demand that there is such a URL, that every file in the project has to be accessible via the web server? Surely 90% of complex sites avoid this security hole?

I've tried adding entries into mapping, as I mentioned before, so the mapping URL points to D:\Bravo\www and the project mapping is C:\Alpha\www, however it gives the same error and frequently removes my added mapping entry. Thanks a lot!

Please explain this too me. I know it can't be that complex but I can not figure it out. How do I get PHPed and the debugger to associate the testing URL with the web root, not the project root (the top most directory).

My project root:
C:\Alpha
In that project, the web root (i.e. index.php):
C:\Alpha\www\
My project's testing server path:
D:\Bravo\
The web root (where Apache looks for index.php):
D:\Bravo\www\
Testing URL (corresponds to the above path in Apache):
http://mywebserver/

I can't believe that this is either uncommon or unreasonable, but PHPed seems to insist that the web root is the same as the project root.
View user's profileFind all posts by QuboidSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
Quote:
It can not be that complex

You're right, absolutely. And that's why we put a good FAQ article dedicated to project mapping and added a sample-case when there is URL no url corresponding to the project root.
Don't hesitate to read this post:
howto-set-project-mapping-t2135.html

After that please let me know if there are any remained problems with understanding how it works and what you'd set in the properties.
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 21 Oct 2004
Posts: 81
Location: UK
Reply with quote
Thanks for the link, I really should have found this myself. I'm still not getting it. I'm basically using Example 4, correct?

I've set the mapping but PHPed insists on me having a URL entered - the message is "Project mapping URL is not specified. Please enter a valid "root URL" that corresponds to the topmost directory of the project." These images show my settings, sorry for bad censorship - each block is just the name of the project which is supposed to be classified for now - it's just 7 letters, nothing special. The 2 smarty mappings point to themselves (the libraries and the template cache), I presume this is the way to wire these up.

Project Properties
Project Mapping

(BTW, I thought I posted this as a reply. Was it moved to a new topic?)

EDIT: Some clarification. In the mapping tab, the URL has http:// at the start, altthough it's hidden in the screenshot.
View user's profileFind all posts by QuboidSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
Quote:
Please enter a valid "root URL"

probably you forgot to proceed with "Go to Project->Project Properties->Mapping tab"

I checked your screenshots Smile
actually, I'm not sure why would you need anything like that.

Seems you run Apache (or IIS) with DocumentRoot located somewhere under e:\server\web1\blah blah blah\www
If so, set it as the project root (both LOCAL and REMOTE). Add URL pointing to the server,
then add mapping entries for all that stuff like lib, tpl, Smarty and template_c, in them have both LOCAL and REMOTE pointing to the same physical directory.

2nd way to achive mostly the same:
have project root pointing to e:\server\web1\blah blah blah\ (a level higher than www), leave URL empty,
add www directory with LOCAL=REMOTE and URL for this line, then add smarty and templates_c with LOCAL=REMOTE and without URL Smile

that's all you'd need.
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 21 Oct 2004
Posts: 81
Location: UK
Reply with quote
You mean test and develop on the same copy? I rather have them seperate, to keep things like .svn directories from being all over the test install, not that this is a problem really. More importantly, I want to avoid having testing data from clogging the working copy and getting commited to Subversion by mistake. The project has things like config files that are installation specific and uploaded images, none of which should be in the repository. I could probably avoid this by using TortoiseSVN's ignore feature but it still feels dirty.

Mind you, it would solve a problem which I just encountered, which was why I tried to debug anyway! I was including a file at it's old path, I forgot to change the require() path when I moved it and because it got deleted on the working copy and not the testing copy, I didn't notice the mistake and I was left wondering why my changes to this file (in it's new location) weren't having any effect. Duh!
View user's profileFind all posts by QuboidSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
Quote:
You mean test and develop on the same copy?

No, I meant develop and develop on the same copy Smile
Tests are somewhat different and can be done on a different server or in a different project etc.
Anyway, while you're working with debugger, you're developing and therefore the copy can be the same Smile
It's much easier to maintain.
Tests can be done on the files exported from SVN (or whatsoever source control) and they can be done on another server or at least another apache virtual host that will have different DocumentRoot.
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 21 Oct 2004
Posts: 81
Location: UK
Reply with quote
Well, I mean in-development testing, not full unit testing.

I've got it working anyway - I didn't have the debugger running in that PHP installation Embarassed Embarassed I did need help with the mapping anyway, this thread isn't a waste, I just messed up the most blindingly obvious step.

For some reason it always goes into debug mode when I go to the set URL or any files/subdirectories off it, even if I just navigate there in Firefox with no parameters such as the debug session info, I'm sure it didn't do this in the past.
View user's profileFind all posts by QuboidSend private message
project mapping
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