PHP newbie - function.require error

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
ibjulb
Forum Newbie
Posts: 1
Joined: Sun Jun 18, 2006 3:49 pm

PHP newbie - function.require error

Post 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.
User avatar
tecktalkcm0391
DevNet Resident
Posts: 1030
Joined: Fri May 26, 2006 9:25 am
Location: Florida

Post 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?
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post 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';
Post Reply