NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
"HOWTO: Set project mapping" : update requested


Joined: 28 Sep 2013
Posts: 20
Location: Pantin, IDF, France
Reply with quote
Hello.

I would like to use PhpED with the following configuration :

Multiple Projects (on a remote server) with separation of Web Root and libraries.

There is a page here, named HOWTO: Set project mapping, that pretends giving an answer to this question under the "Example #3" subsection.

Unfortunately this page is dated from June 2006 and it looks like completely obsolete now.

Especially, there is nothing looking like a "Mapping" tab under "Project Properties", even if I set the run mode to "HTTP (web server)".

The local PhpED Manual included with PhpED gives exactly the same obsolete information so it cannot helps better.

So my question is:

How can I configure multiple projects on the same remote server, whereas most of these projects (but not necessarily all) shares the same library directories (plural because likely more than one), accessible by 'include' or 'require' statements inside my PHP scripts?

Obviously these directories are not visible from the web pages, so they can't be mapped to any URL.
They are not located under my local projects directory trees either.

They can be accessed by private FTP, SFTP, SSH or RSYNC accounts, and these accounts are expected to not be the same as the ones used to access the projects root pages.

Most of these projects are running under HTTP web server, but I also have at least one running as a CLI console which needs to include the same libraries.

I tried several ways for configuring this by my own means, but too often I runs into difficult to understand (and even to describe) mapping errors.

I am currently using PhpED personal edition version 15.0 (Build 15036, 64bit).

Regards,

Gingko
View user's profileFind all posts by GingkoSend private message
Guru master

Joined: 24 Jul 2009
Posts: 717
Reply with quote
I have a single common project that is shared by all the web sites on a remote server.

That project is accessible through a local directory on the PhpED computer using w:\common and on the remote web server it just so happens it is accessible through the same drive letter but has a different directory w:\apache_htdocs\common

So if I want to debug or edit the common library, my projects have two debugger mappings, the first common one being my additional one and the second one being the automatic one created by PhpED for the project:

Code:
Local directory     Remote directory                    URL
w:\common           w:\apache_htdocs\common
w:\myproject.com    w:\apache_htdocs\myproject.com      http://myproject.local


This configuration allows the local myproject to open/edit files from w:\common and set breakpoints in them; debugging works as normal.

Without the mapping for common, PhpED is still capable of doing some debugging (eg DebugBreak) but it would have to receive a copy of the common file via the debugger which means it is read only and I cannot edit it.
View user's profileFind all posts by plugnplaySend private message


Joined: 28 Sep 2013
Posts: 20
Location: Pantin, IDF, France
Reply with quote
plugnplay wrote:
I have a single common project that is shared by all the web sites on a remote server.

That project is accessible through a local directory on the PhpED computer using w:\common and on the remote web server it just so happens it is accessible through the same drive letter but has a different directory w:\apache_htdocs\common

So if I want to debug or edit the common library, my projects have two debugger mappings, the first common one being my additional one and the second one being the automatic one created by PhpED for the project:

Code:
Local directory     Remote directory                    URL
w:\common           w:\apache_htdocs\common
w:\myproject.com    w:\apache_htdocs\myproject.com      http://myproject.local


This configuration allows the local myproject to open/edit files from w:\common and set breakpoints in them; debugging works as normal.

Without the mapping for common, PhpED is still capable of doing some debugging (eg DebugBreak) but it would have to receive a copy of the common file via the debugger which means it is read only and I cannot edit it.

Hello,

Thank you very much for your answer.

I'm not very sure, however, if it is what I want to do or not. Especially because you don't explain how you precisely did these mappings.

Do you mean that you have to edit the w:\common files from this project but to debug from the w:\myproject.com one?

If it is the case, I'm afraid this is more a workaround than the solution, as it seems that, according to the HOWTO, legacy 2006 versions of PhpED didn't need to create two projects for that purpose.

Isn't it really possible to have the HOWTO updated ?

Regards,

Gingko
View user's profileFind all posts by GingkoSend private message
Guru master

Joined: 24 Jul 2009
Posts: 717
Reply with quote
Sorry, I'm very busy, I don't have time for a complete howto Smile I just pop into the forum every so often to see if there is anything I can answer.

With PhpED you can have multiple projects open from the same workspace, so yes, you can have your common project and your myproject open at the same time and edit both of them, but still debug them together.

In my case, I do not create or open an extra project. Whilst I have myproject open, I simply open my common library files with PhpED (File Open or drag & drop from Windows Explorer) and that is how I edit them, set breakpoints, etc.

The mapping means that when you want to debug the common library from within the context of the running myproject, it knows where to find the files.

With the mapping in-place if the debugger is allowed to catch an error or breakpoint in the library file, it will also automatically open that file and allow you to edit it.

To change the mappings, go into Project > Project Properties > Run & Debug > Run Target then click on the Mapping for debugger tab.

In there you can add a new mapping which is simply identifying a path that is accessible from PhpED and what the corresponding path would be as seen from the remote server. These two paths can either reference the same physical file (if you using local drives mapped to the remote server), or can be totally separate storage locations, but must of course have the same files (if you are editing locally then uploading to the server).

The additional mapped directories do not require a URL. Your default project mapping is shown in bold.
View user's profileFind all posts by plugnplaySend private message
"HOWTO: Set project mapping" : update requested
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