IIS 7 and Above
Php does not open files that are absolute
Last post Jun 04, 2009 06:17 AM by andrewkillen
Apr 22, 2009 09:16 AM|andrewkillen|LINK
I really need some help getting to the bottom of this problem. I've used the MS beta web installer to get FastCGI PHP 5.2.9 onto my new Vista home premium machine. And since installing I've had many problems with php scripts that I have created and have out
in the wild.
Basically it seems to be a directory/file IO issue.
1. require once
If I use requre_once in any other way than "file.php" or "./file.php", ie "/include/stuff/file.php" or ($docroot."/include/stuff/file.php), Require_once cannot open the file or directory
here is the error detail
PHP Warning: require_once(/dieet/include/php/basepage.php) [<a href='function.require-once'>function.require-once</a>]: failed to open stream: No such file or directory in C:\Users\Andy\sites\dieet-4u\dieet\index.php on line 10PHP Fatal error: require_once() [<a href='function.require'>function.require</a>]: Failed opening required '/dieet/include/php/basepage.php' (include_path='.;C:\php5\pear') in C:\Users\Andy\sites\dieet-4u\dieet\index.php on line 10
Please help! I need to get to the bottom of this... so any advice will be very greatfully recieved
thanks in advance
IIS7 fastCGI Installation
IIS7 fastcgi Installation vista SP1 PHP
fastCGI php mysql
IUSR IIS_USR permission php FASTCGI
php fastcgi php.ini
Apr 25, 2009 11:20 AM|ma_khan|LINK
how about $_SERVER['DOCUMENT_ROOT'] . "/yourdirectory/yourfile.php"
$_SERVER['DOCUMENT_ROOT'] . "/yourdirectory/yourfile.php"
the above works for me.. include_once takes relative or absolute paths... so that should work... let me know...
Jun 04, 2009 06:17 AM|andrewkillen|LINK
many thanks, you were right. appologies for the late reply, over-active spam filter..