Warning: require_once error - newbie needing help

Hi all,

This is my first post so please be gentle! :wink:

I have very limited experience with php. I was handed the maintenance responsibility of a site a few years back and its been fine until now. Basically the hosting was terminated through an error in non payment. (not by me!). The hosting company deleted the hosting account and all its content. I now have the job of trying to recover the site.

Whilst I have a backup of most of the files and have uploaded them to the new hosting account (with the same host) the site refuses to work. The backend is controlled thorough phpmyadmin and I’ve checked the database over and everything including recent posts all appear to be there. The trouble is getting them onto the frontend.

The issue must be to do with the connection between the Database and the frontend.

If you go to www.keithamor.com/index.php (to bypass the temp maintenance page) you get the following message:

[i]Warning: require_once(…/private/psd_conn.inc) [function.require-once]: failed to open stream: No such file or directory in /home/fhlinux207/k/keithamor.com/user/htdocs/requires.php on line 4

Fatal error: require_once() [function.require]: Failed opening required ‘…/private/psd_conn.inc’ (include_path=’.:/usr/share/pear-php5’) in home/fhlinux207/k/keithamor.com/user/htdocs/requires.php on line 4[/i]

If I look at requires.php in the root, the file contains the following code:

[php]<?php
$abs_root = ‘…/private’;

require_once($abs_root . ‘/psd_conn.inc’);
require_once($abs_root . ‘/psd_functions.inc’);
require_once($abs_root . ‘/variables.inc’);
require_once($abs_root . ‘/psd_queries.inc’);

?>[/php]

I have no idea what this is. Can’t find anything in Google either.

If I delete the following lines from the index.php home page, then the site page loads but reports an error getting the news feed.
[php]<?php
require_once(‘requires.php’);
require_once(“functions.php”);

?>[/php]

Does anyone out there have any ideas as to how to fix this ??

Any help would be greatly appreciated.

Cheers

Mac

Have you tried setting $abs_root to your directory path?

This would be an example out of your ‘www’ directory:
[php]$abs_root = ‘/home/username/private’;[/php]

This would be an example inside your ‘www’ directory:
[php]$abs_root = ‘/home/username/public_html/private’;[/php]

Yes, it looks like there is wrong path. Whare is your file requires.php located? The realtive path …/private means that if you go outside of directory where requires.php is located, there is another directory named “private” and there are all the included files located (such as psd_conn.inc, etc.) Check if this directory and files are located like this, otherwise correct the path.

Sponsor our Newsletter | Privacy Policy | Terms of Service