Jump to content

Relative paths in virtual directory not working.


Octo

Recommended Posts

Using IIS 6, PHP is working in the virtual directory, except relative paths for things like file_exists.

 

if (file_exists('another/file.php')) {echo "success";}

require 'another/file.php';

echo $required_variable; // success

 

From the test file above, include 'another/file.php' and require 'another/file.php' type statements will work fine in the v-dir, but not is_readable('another/file.php') or file exists('another/file.php) et al. These non-working paths will work if made absolute (C:/some/folders/another/file.php) though. The relative paths work fine in the main directory (all works as expected there).

 

What's also unusual is that if I open a working mirror in the main directory (though in a different sub-directory), the broken one will start working as it borrows everything from the working one, even though it's set up site.com->test (v-dir) and site.com->live

 

doc_root is empty, setting include_path seems to make no difference, putting './' at the front doesn't work. Have tried all the settings I can on the v-dir. Have checked MS documentation on how to set it up.

 

Kind of at a loss here and any help would be appreciated.

Link to comment
Share on other sites

Yeah, works fine on IIS7 (my test server is 7.5, the live server for the client is IIS6).

 

As for FastCGI - I'm not a server admin, so while I have an idea what that is I'm not sure about how to set it up/check it's working right etc. However, I'll look into that since you mention it. (Note, the reason I'm doing the admin stuff is because they don't have one. I wrote the program and so am helping them set stuff up while I'm at it.)

Link to comment
Share on other sites

No errors on the page, just typical PHP errors "class not found on....". When I fix the classes, it doesn't find my 'view' files, so I just get a blank page with no errors on it, even with E_ALL on. Should probably set it to write some to an error.log actually.

 

Enable parent paths didn't work I'm afraid, either on or off.

 

Not had a chance to look into FastCGI yet. How do I find out whether it's using it or not.

 

Thanks.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.