NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Running files located outside of web root


Joined: 10 May 2006
Posts: 6
Reply with quote
I have my project mapping set up as follows:

Root directory: C:\wamp\discovery
Run Mode: 3rd Party Web Server
Remote Root Direcotry: C:\wamp\discovery
[Mapping Tab]
c:\wamp\www\discovery\www mapped to http://mywebserver

I was wondering if it's possible to run scripts that are above the web root simply by having them open and clicking run from the menu.

I have the following directory structure:
  • c:\wamp\www\discovery
    • lib
      • classes
      • unit_tests
    • www (document root)
      • graphics
      • css
What i'd like to be able to do is to select a file in the discovery/lib/unit_tests directory and run it, but i keep on getting the error "Project mapping URL is not specified. Please enter a valid "root url" that corresponds to the topmost directory of the project." I'm assuming this is happening because its trying to run a script from a location that is not accessible or visible to apache? Do i need to add another entry in the Mapping tab so that i can open a file in the editor thats in discovery/lib/unit_tests directory and run it?

Thanks
View user's profileFind all posts by boboboSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8342
Reply with quote
Quote:
I was wondering if it's possible to run scripts that are above the web root simply by having them open and clicking run from the menu.

When you work with a WEB server and target script is located out of the web tree you can not run this script, right? So the IDE can't.

Quote:
What i'd like to be able to do is to select a file in the discovery/lib/unit_tests directory and run it

probably, you do not need those files to be run in 3rd party HTTP mode. If those files are supposed for being run by php directly, feel free to do so with either SRV or LocalCGI mores.
You can create a new project in the same workspace and have its root directory pointing to discovery/lib/unit_tests.
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 10 May 2006
Posts: 6
Reply with quote
Hi

I know this post is a few months old, but i'm in a situation again where it's posing a problem.

I got around the original problem by simply running the unit tests from the windows run prompt, and typing the full path to the file. The problem with doing that though, is that it registers the document root as c:\wamp\www, whereas i have a virtual host in apache (and an IDE mapping) that configures the document root for the above project as c:\wamp\www\discovery\www. Now i need manipulation of the document root, i was wondering how to properly implement your solution.

I created another project, with the project root set to c:\wamp\www\discovery\lib\unittests. Run mode is HTTP (SRV local sever), with code insight includes set to c:\wamp\php4\pear. When i run a unit test, i get the following error:
Quote:
Fatal error: main(): Failed opening required 'simpletest/unit_tester.php' (include_path='.;C:\Program Files\nusphere\phped\php\..\include_lib;C:\Program Files\nusphere\phped\php\PEAR') in C:\wamp\www\discovery\lib\tests\ArticleMapperUnitTests.php on line 2

... so i look at project properties->includes tab, thinking i might need to add a mapping or something, and theres hundreds of entries there! I'm not sure if they're supposed to be there or not, but i was hoping of adding a mapping to my local PEAR installation at c:\wamp\php4\PEAR and my overall projects (Workspace is it?) document root to .... unsure what. In fact i'm unsure how to proceed, so any advice would be appreciated.

Thanks.
View user's profileFind all posts by boboboSend private message
Running files located outside of web root
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