Page 1 of 1

PHP newbie - function.require error

Posted: Sun Jun 18, 2006 3:57 pm
by ibjulb
Hi,

I know a little about computers and my friend has a website that he wants to show clients offline. So the company who put it together zipped it up and sent it to him.

I installed xampp and put the website directory in the htdocs folder. I can view any html files from the website in the webserver (apache) but when I try to view index.php I get the following error.


Warning: require_once(/hsphere/local/home/bluepage/website_name.ie/includes/version.php) [function.require-once]: failed to open stream: No such file or directory in C:\Program Files\xampp\htdocs\website_name\includes\mambo.php on line 41

Fatal error: require_once() [function.require]: Failed opening required '/hsphere/local/home/bluepage/website_name.ie/includes/version.php' (include_path='.;C:\Program Files\xampp\php\pear\') in C:\Program Files\xampp\htdocs\website_name\includes\mambo.php on line 41



Sorry...I've changed the name of the website...

I'd really appreciate any help in this matter. I'd like to help get my friend set up so that he can show clients of his when he can't get online....

Cheers,

Ian.

Posted: Sun Jun 18, 2006 11:16 pm
by tecktalkcm0391
Post the code. Its the best way we can help you.


What is the absolute location of the file you want to include?

Posted: Sun Jun 18, 2006 11:26 pm
by RobertGonzalez
You are getting this because the script is trying to require a file that is not on the server (your local server that you set up in XAMPP). Try changing the path information from what is in the current code to what is actually described by your server folder path arrangement and it should fire up without a hitch.

What I mean by this is, on line 41 of the mambo.php, find this line...

Code: Select all

require_once(/hsphere/local/home/bluepage/website_name.ie/includes/version.php);
And change it to something like this

Code: Select all

require_once '/current/path/to/version.php';