Jump to content

setting up local file for connecting to database website


pjc2003

Recommended Posts

hey,

 

ive just moved my website to another server and am trying to set up my local.php page to connect to my database etc.. but having the following errors returned when i try to access my website..

 

 

Warning: main(DB/DataObject.php) [function.main]: failed to open stream: No such file or directory in /usr/home/mywebsite/public_html/fyp/local.php on line 4

 

Fatal error: main() [function.require]: Failed opening required 'DB/DataObject.php' (include_path='.:/usr/local/lib/php') in /usr/home/mywebsite/public_html/fyp/local.php on line 4

 

 

$options = array(

            'database'        => 'mysql://user:passwrd@localhost/mywebsite',

            'schema_location'  => '/home/mywebsite/public_html/fyp/DataObjects',

            'class_location'  => '/home/mywebsite/public_html/fyp/DataObjects',

            'require_prefix'  => 'DataObjects/',

            'class_prefix'    => 'DataObjects_',

        );

 

 

 

all folders seem to be in the right location on the server so im a bit confused!

 

Thanks,

 

Pjc.

 

try putting the full path of the include file.

 

If this works, put the include in an if statement, so on your local server it includes the file from the correct local path, and on the server it includes the file from the correct path on the server.

 

monk.e.boy

Archived

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

×
×
  • Create New...

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.