pjc2003 Posted February 26, 2007 Share Posted February 26, 2007 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. Link to comment https://forums.phpfreaks.com/topic/40186-setting-up-local-file-for-connecting-to-database-website/ Share on other sites More sharing options...
monk.e.boy Posted February 26, 2007 Share Posted February 26, 2007 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 Link to comment https://forums.phpfreaks.com/topic/40186-setting-up-local-file-for-connecting-to-database-website/#findComment-194433 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.