Re: Re: IIS/ISAPI require suddenly stops working
| From: | Brian 'Bex' Huff | Date: | Fri, 13 Dec 2002 15:35:49 +0000 |
| Subject: | Re: Re: IIS/ISAPI require suddenly stops working | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-17400@lists.php.net to get a copy of this message | ||
ahh yes... this strange behavior is due to security tests for 'include_path' and 'open_basedir' in PHP.
It tries to be secure, but its a bit overzealous in denying access to files, IMHO... although most web site hosting companies probably love that fact ;)
I think this file is not allowed because its in a subfolder of the current directory, and you neglected to reference it relatively, like this:
include(".\smarty\Smarty.class.php");
Or perhaps you are referencing it properly, but you have slashes instead of backslashes. If all else fails, try setting this in your php.ini file:
include_path=".;C:\Inetpub\public_html\smarty"
Be sure to use backslashes, and put the value in quotes, otherwise is might not work on all platforms / web servers.
--
Brian 'Bex' Huff
bex@stellent.com
Phone: 952-903-2023
Fax: 952-829-5424
>
> Hello,
>
> I'm using PHP 4.2.3 on IIS as an ISAPI module (for testing only). So
> today I'm using my scripts just fine and then all of a sudden, require
> stops working. It returns
>
> Fatal error: Failed opening required
> 'C:/Inetpub/public_html/smarty/Smarty.class.php'
> (include_path='.;c:\php4\pear') in C:\Inetpub\public_html\index.php on
> line 27
>
> Everytime I try to require or include something it gives me the same
> error. And it only gives it to me with that file. The same exact file
> includes perfectly on Apache/Linux and other files include just fine. I
> tried deleting the contents of the file and leaving only a <?php ?> and
> it fails. I tried renaming the file and it fails. Like I said, all other
> files work, but this one file doesn't, no matter what it's contents or
> what it's name or where it's located in the directory tree or how many
> times I recreate it in different places. I am stumped.
>
> ~Paul
>