EditWrx Knowledge Base Home
 Search       Login   Register   Members   Help   Home 
Search by username


parent child error
 Moderated by: Keith  
 New Topic   Reply   Print 
AuthorPost
tjordan
Member
 

Joined: Mon Oct 8th, 2007
Location:  
Posts: 6
 Posted: Mon Oct 8th, 2007 07:45 pm
 Quote  Reply 
We are a web host for multiple clients and domains. I installed editwrx on one domain and got it working. Used the parent-child install instructions to put editwrx on another domain. When I attempt to access editwrx/wrx.cgi on the second domain I get:

Your server does not have a usable environment variable for determining your site's root path
c:/Inetpub/vhosts/nmiserver/httpdocs/editwrx/library/routines.txt does not exist

nmiserver is the first domain.

I saw the entry from FrameGuy and tried changing the path without the c: and '\ ' instead of '/'.

Or is this a script permission issue on my main domain?

Thanks

 

Keith
Moderator
 

Joined: Fri Apr 8th, 2005
Location:  
Posts: 578
 Posted: Mon Oct 8th, 2007 08:18 pm
 Quote  Reply 
First of all, is

/Inetpub/vhosts/nmiserver/httpdocs/editwrx/library/routines.txt

a correct path - does routines.txt actually exist at that path?

A perl script never needs the drive letter in a path if the script is on the same drive as the file in the path. The path needs to start with a slash and use only slashes instead of back-slashes.

Your parent subroutine in the child's wrx.cgi should contain

$path_to_library = "/Inetpub/vhosts/nmiserver/httpdocs/editwrx/library";

While Unix/Apache has permissions problems (at the Inetpub/vhosts/nmiserver/httpdocs folder) I don't know of any permission problems Windows/IIS would have. IIS may have a setting I'm unaware of though.

The "httpdocs" is an unusual domain home folder name for Windows servers. Are you using Plesk Control Panel (which does default to httpdocs for a domain's home folder)? If so, the Plesk Control Panel File Manager for the domain looks like it could cause a problem for a child installation. Plesk's demo for Plesk 7.5 for Windows looks like it needs to have permissions set there for the httpdocs folder.

tjordan
Member
 

Joined: Mon Oct 8th, 2007
Location:  
Posts: 6
 Posted: Tue Oct 9th, 2007 10:46 am
 Quote  Reply 
Yes, I verified the path and the file does exist in the path. I changed the statement to co drive letter, starts with a slash and uses only slashes.

Yes, this is a plesk installation on a W2003 server. Not sure what permissions need to be set to on the second domain. I've compared the permission on the domain and the editwrx folder in IIS with those of the main domain and they look the same. Of course the difference is the IUSR names are unique to the respective domain.

I have a trial version of editwrx on another domain on the server. (From before I purchased the developer key). I know it works. I tried pointing the second domain over to it and got the same environment error.

Do I need to change IIS permissions on the second domain to allow scripts? Or is the primary domain not allowing the second domain to run the script called by the second domain? Or is it a more fundmental issue of file permissions?

Keith
Moderator
 

Joined: Fri Apr 8th, 2005
Location:  
Posts: 578
 Posted: Tue Oct 9th, 2007 03:39 pm
 Quote  Reply 
A parent-child installation has a cgi process in the child domain that reads it's library files from the parent domain. Your problem is that Plesk is preventing the reading of the library files in the parent domain.

Windows and Unix servers have built-in native features that prevent a cgi process in one domain from reading files in another domain. That's a native security feature.

Consider why it exists: if a domain uses access to the sql server the domain's password to login to the sql server must be stored in plain text in a file somewhere in the domain - if a cgi process in another domain can read files in that domain, the sql password is then available for any user on the system and they could login to that domain's sql account.

With Unix there is an easy way to get around this limitation, but doing so opens the domain's files to reading by everybody on the server. That is why we recommend putting the parent files in a subdomain that contains only the editwrx library, or installing the library entirely outside of the webserver path structure.

From what I see on the Plesk for Windows demo, it appears that there is no way to open up a domain so other domains can read that domain's files. I can see no way to grant read access to other IUSRs at the httpdocs level.

If you are the administrator on the server you could try installing the editwrx library outside of the Inetpub path and see if you can then access those files. It looks like the barricade at httpdocs is only an "in" barricade, not an "out" barricade. Create a file C:/test.txt with only the word HELLO in it. Then create a test.cgi in the child domain with the following code:

print "Content-type: text/html\n\n";
print "File contains ";
open(FILE,"C:/test.txt");
while(<FILE>){print}
 

Then run test.cgi in the browser, it will display "File contains HELLO" if test.cgi can read the test.txt file. If it can, then you can create C:/editwrx/library and put the library files & folders there and use that path in the child's $path_to_library.


 

tjordan
Member
 

Joined: Mon Oct 8th, 2007
Location:  
Posts: 6
 Posted: Wed Oct 10th, 2007 04:43 pm
 Quote  Reply 
I'll have a shot at this late today or tomorrow.

How is it that we get this level of support for a $90 program and SWsoft takes days to respond if at all. You are the man.

tjordan
Member
 

Joined: Mon Oct 8th, 2007
Location:  
Posts: 6
 Posted: Fri Oct 12th, 2007 07:18 pm
 Quote  Reply 
I put the test.txt into a folder on the server and created the test.cgi in the child domain. It worked and displayed the expected output.
So I added the entire library folder to the same folder as test.txt. I got the login page. But when I tried to login as admin:start I get a windows error 'SESSION FAILURE'.
Changed the permissions on the editwrx folder in the child domain and it all started working.

Nice solution. Thanks for your help.


 Current time is 05:14 pm




Powered by WowBB 1.62 - Copyright © 2003-2004 Aycan Gulez