Jump to content

Archived

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

wjwolf79

require() fatal error

Recommended Posts

I have installed php on a Win2K3 server (IIS6) and it works fine until I try to use include() or require() (doesn't matter which one). I get the following errors:

Warning: require([i]my_function[/i]) [function.require]: failed to open stream: No such file or directory in [i]my_file_path[/i] on line 3

Fatal error: require() [function.require]: Failed opening required [i]my_function[/i]' (include_path='.;C:\php5\pear') in [i]my_file_path[/i] on line 3

I noticed what the second one said about my include path, but that's not what my php.ini says my include path is. Here's my include path directive from my php.ini:
include_path = ".;c:\php\includes"

I've been trying to figure this out for about a week now (I tink a little more than that, actually). I cannot figure it out. I'm using the ISAPI setup, since I cannot get the CGI setup to run at all.

Any assistence would be helpful, as I'm at my wit's end.

Share this post


Link to post
Share on other sites
include and require only include files, It doesnt include functions.

This is how you use the functions:
[code]<?php

include 'filename.php';

// OR

require 'filename.php';

?>[/code]

Share this post


Link to post
Share on other sites
well duh on that... my mistake typing that. I had the word function in my head because of that function.require line. They are .php files. They work fine on my local pc with IIS5, but not on the server with IIS6.

I have set up php several times on an xp box with IIS5 with no problems both with CGI and ISAPI. IIS6 is very different from IIS5 (thank you, Microsoft), and I cannot get it to recognize any included files (besides putting the file in the same directory as the same file that's trying to include it). Even the phpinfo() function shows that it's thinking my config file is located at C:\Windows (and actually putting it there doesn't solve the problem).

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.