NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Project mapping -> Nothing to map :)


Joined: 21 Oct 2004
Posts: 81
Location: UK
Reply with quote
OK, this is driving me crazy! I have a project in 4.5.1 residing in C:\Alpha\ with the actual web root being in a subdirectory called www (eg. the site's home index page is developed at C:\Alpha\www\index.php), so I can have other files outside the web root for security reasons, such as C:\Alpha\lib\ containing require()ed libraries and database settings. I run my server (Apache 1.3, PHP4) so the web root is, say, D:\Bravo\www\ and that resolving to mywebserver

How do I map this so I can do things like profiling, debugging etc? At present, It looks for the site index in mywebserver/www/ and promptly 404s - how do I get rid of the www? I presume it's happening because the index file is in the www/ directory within my project root but surely I'm not the only person who does this very basic security technique? Surely there is a way to tell PHPed to look in the right place? I've tried every combination of settings in the project mapping tab I can think of and it's royally cheesing me off now.
View user's profileFind all posts by QuboidSend private message
Veteran

Joined: 24 Jan 2006
Posts: 311
Reply with quote
What is set for your URL in Mapping section? It should be mywebserver
View user's profileFind all posts by yfaktorSend private message


Joined: 21 Oct 2004
Posts: 81
Location: UK
Reply with quote
It is that, yes.

As far as PHPed is concerned, the file is in the www/ subdirectory, so I can see why it adds it on. However, of course Apache already takes the www/ into consideration. I don't want to reconfigure Apache to just point to D:\Bravo as, although this may work, it's a hack and it's a security issue even if it is just a development server.
View user's profileFind all posts by QuboidSend private message
Veteran

Joined: 24 Jan 2006
Posts: 311
Reply with quote
Hi there, may I suggest looking at this post: failed-to-map-remote-file-for-adodb-mysql-driver-t1487.html?highlight=libraries - not exactly your subject but very close, I wonder if it can help. What do you think?
View user's profileFind all posts by yfaktorSend private message


Joined: 21 Oct 2004
Posts: 81
Location: UK
Reply with quote
Well, fingers crossed, I appear to have got it sorted out. I removed the Root URL, which I thought would give an error but as I added another mapping entry to the mapping tab, it was fine. This new entry could be configured to pair the www/ directories correctly and tie them in with mywebserver/ - all seems well.

Under mapping, what is the publishing directory entry?
View user's profileFind all posts by QuboidSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8340
Reply with quote
If you work with web server running locally on your workstation or if web server content is accessible with a networking disk, you don't need to synchronize your local project files with web's tree just because in these cases you can work with them directly by pointing project to the directory. For the really remote web sites, you'd need publishing account to synchronize the content. Some people are using SFTP for this, some other WEBDAV/ssl etc and there is nothing new that these services can have their directory roots in a non-root physical directory. That's why you'd need to point to proper directory when setting mappings.
For example if your web site is in /var/www/html/, libraries are in /var/lib/php/mylibs/, ftp root is in /home/myacc/ and both html and mylibs are symlinked into it, you'd set mapping like this:
1. entry (bolded)
remote root=
localpath=c:\myproject
url=
publishing=
2nd entry
remote root=/var/www/html
local path=c:\myproject\html
url=http://mywebserver/
publishing=html
3rd entry
remote root=/var/lib/php/mylibs
local path=c:\myproject\libs
url=
publishing=mylibs


With your example, if D:\ is local or networking disk, I'd put libraries into D:\Bravo\lib and would set D:\Bravo\ as project root.
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 11 May 2006
Posts: 2
Reply with quote
I currently have one project I work on where I have two directories outside the project root . The directory layout can't be changed and I can't
get it to map correctly. I have been through these forums in an unsuccessful attempt to find a clear explanation of how to do this mapping.

I have set up:
the Project root directory as V:\vsource\gca\trunk

Mapping. run mode is HTTP mode (3rd Party WEB server) - server DocumentRoot v:/vsource/gca/trunk/docroot
Root URL http://localhost
Remote root directory. I have tried sharing v:/vsource/gca/trunk/docroot and mapping it to y:. then using y:\


that gives me 'failed to start debug session. Page "http://localhost/docroot/indexs.php" was not found on the web server.


if I change the Project root directory to V:\vsource\gca\trunk\docroot the debugger starts but I get a Dbg message:
"Dbg mapping", "Failed to find a way to load "V:\vsource\gca\trunk\docroot\index.php" remote file. Opening it using debugger protocol", "12:01:38 AM", "" and my index.php file is called [unmapped remote file] index.php in the IDE tab.

I also lose access to my include and bin directories that are at the same level as the docroot. They are no longer visible in the workspace browser.
If I map V:\vsource\gca\trunk\docroot as the remote root directory I get the same mapping errors as above as well as:

"Dbg mapping", "Failed to map "v:\vsource\gca\trunk\include\gca_url.php" remote file to local file system. Check mapping settings for the project", "12:13:08 AM", ""
"Dbg mapping", "Failed to map "v:\vsource\gca\trunk\include\gca_url.php" remote file to publishing account. Check mapping settings for the project", "12:13:08 AM", ""
"Dbg mapping", "Failed to find a way to load "v:\vsource\gca\trunk\include\gca_url.php" remote file. Opening it using debugger protocol", "12:13:08 AM", ""
"Dbg mapping", "Failed to map "v:\vsource\gca\trunk\include\gca_url.php" remote file to publishing account. Check mapping settings for the project", "12:13:15 AM", ""

I'm not interested in WEBDAV, ftp, scp, etc. All I want to do is ba able to set the project root to V:\vsource\gca\trunk\
so I can access all the files in the project and have the document root set at V:\vsource\gca\trunk\docroot so http://localhost/ serves V:\vsource\gca\trunk\docroot\index.html.

Is this at all possible?
View user's profileFind all posts by simketSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8340
Reply with quote
Of course its possible. Moreover, once you work with local web server you do not need those ftp/sftp/dav etc.

Well, regarding mapping. Once everything is on the local disk, all mapping entries should have Local Path == Remote Path.

Project settings:
Project's Root Directory -> V:\vsource\gca\trunk
Run mode -> HTTP/3rd party web server
Remote Root -> V:\vsource\gca\trunk
Root URL -> nothing, leave it empty.

them add an entry on the mapping tab
and have there
Local directory -> V:\vsource\gca\trunk\docroot
Remote directory -> V:\vsource\gca\trunk\docroot
URL -> http://localhost/

That's all tricks and actually very close scenario is described there:
http://forum.nusphere.com/howto-setup-project-with-scripts-located-out-of-web-tree-t646.html
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 11 May 2006
Posts: 2
Reply with quote
Thanks for that. I'll give it a go.
View user's profileFind all posts by simketSend private message


Joined: 13 Sep 2006
Posts: 3
Reply with quote
Hi Dmitri,

You might consider adding this, the most simple setup in the world, to the help. It took me hours to find this information and I was ready to ininstall phped because of it. Not the first time I might add.


Terry
View user's profileFind all posts by TerryCSend private message
Project mapping -> Nothing to map :)
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