Jump to content


This topic is now archived and is closed to further replies.


FastCgi installed, file acces problems on root only

Recommended Posts

I use windows server 2003 +IIS+ php 4.3.1.
Since from times to times I got an annoying error/bug with my php scripts (the palliative was to restart VPS each times the problem occurs); I thought that using the FASTCGI dll would improve stability of the system.
So I've done my best to install FASTCGI. (By the way, why informations to install this dll are lacking on official website www.fastcgi.com ?)

Just after the install of my dll (i.e last install step was restarting the VPS),
I've checked some very basic script (i.e echo "hello world"; ) and they worked.
When I use php_info(), it shows : Server API: CGI/FastCGI ,
so I assume that FASTCGI is really installed.(I'm not dreaming...)

Now where I have a problem:
when I launch a php script from the ROOT directory,
the file_exists function fails to detect, truly existent files (I use relative paths)
Also file read/write operations fails (i.e fopen("example.htm", "w") )
When I launch a script from a subfolder (with correct permissions set)
everything seems to work fine: file_exist function work, and also read/write operations.

So I don't know why it doesn't work as expected in the Root directory.
This problem appeared after the installation of that FASTCGI dll (everything worked fine before,
if we ignore system instability problem).

Please Help me to fix this. I have a joomla based website that doesn't work because of this.
I don't want to move it in a subfolder.

Thanks in advance.

Share this post

Link to post
Share on other sites
The first thing that always springs to mind when using file functions is that it is a permissions problem.

This 9/10 is the cause of failing functions with IIS.

IIS by default uses the IUSR_SERVERNAME account to run processes under PHP.

Although overall its a security issue you have to take into consideration I find the simplest thing to do is enable higher access to the IUSR account on the root folder directly. These permissions should then propogate down to your sub folders and sites.

If its not a permission issue then please post the exact PHP fail messages here, I may have come across them before.

Share this post

Link to post
Share on other sites


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.