mdennis83 Posted July 24, 2008 Share Posted July 24, 2008 Hi everyone, I am trying to help a client/friend with a website move from a buddy who no longer is going to be in hosting to Go Daddy hosting. It's a php website, I have copied the entire thing and uploaded it to the new server. I get the index.php file (http://maxus.net.previewdns.com/) to show but once I click on a link i get the following errors: Path to PHPLib is Farked. Warning: main(prepend.php): failed to open stream: No such file or directory in /home/content/m/a/x/maxusgroup/html/main.php on line 41 Warning: main(prepend.php): failed to open stream: No such file or directory in /home/content/m/a/x/maxusgroup/html/main.php on line 41 Fatal error: main(): Failed opening required 'prepend.php' (include_path='.:/usr/local/lib/php') in /home/content/m/a/x/maxusgroup/html/main.php on line 41 Now I haven't changed any directory structure at all. I have a feeling it has to do with this string of code in the main.php file: ## ## Load PHPLib ## $_PHPLIB = array(); if (file_exists("/home/chris/maxus.net/phplib-7.4-pre2/php/prepend.php")) { // Moria: Linux/Apache $_PHPLIB["libdir"] = "/home/chris/maxus.net/phplib-7.4-pre2/php/"; $editorPath = "http://www.maxus.net/classes/htmlarea/"; } elseif (file_exists("f:\htdocs\maxus.net\phplib-7.4-pre2\php\prepend.php")) { // Prospero: Win2k/Apache OR Miranda: Win2k/IIS $_PHPLIB["libdir"] = "f:\htdocs\maxus.net\phplib-7.4-pre2\php/"; $editorPath = "http://127.0.0.1/maxus.net/classes/htmlarea/"; } else { echo "Path to PHPLib is Farked."; } require($_PHPLIB["libdir"] . "prepend.php"); Any incite or help from anyone who knows why I'm getting this error and how to fix it? I emailed godaddy and they said it was a scripting issue... Thanks in advance Quote Link to comment Share on other sites More sharing options...
JonnyThunder Posted July 24, 2008 Share Posted July 24, 2008 You may not have changed the directory structure, but your new host may have a different web root from the previous one. That would cause you issues as far as your paths go. Quote Link to comment Share on other sites More sharing options...
mdennis83 Posted July 24, 2008 Author Share Posted July 24, 2008 Any idea how to get Go Daddy's web root info, or what to change it to? Their answer to me thus far is sorry our code is working, its a scripting issue. would it be as simple as taking :$_PHPLIB["libdir"] = "/home/chris/maxus.net/phplib-7.4-pre2/php/ and changing it to :$_PHPLIB["libdir"] = "/phplib-7.4-pre2/php/ like an html link? Or do i need to have a web root ? Quote Link to comment Share on other sites More sharing options...
JonnyThunder Posted July 24, 2008 Share Posted July 24, 2008 I think this will show it.... <?php print $_SERVER['DOCUMENT_ROOT']; ?> Quote Link to comment Share on other sites More sharing options...
mdennis83 Posted July 24, 2008 Author Share Posted July 24, 2008 Got past the original error, thanks. Now I have a brand new error Warning: mysql_connect(): Can't connect to local MySQL server through socket '/usr/local/mysql-5.0/data/mysql.sock' (2) in /home/content/m/a/x/maxusgroup/html/phplib-7.4-pre2/php/db_mysql.inc on line 75 Database error: connect(localhost, chris, $Password) failed. MySQL Error: () Session halted. you can see it here: http://maxus.net.previewdns.com/main.php?obj=news&action=VIEW&id=Executive%20Search Quote Link to comment Share on other sites More sharing options...
JonnyThunder Posted July 24, 2008 Share Posted July 24, 2008 Looks like you're using your localhost details to login to the mySQL server. You need to put in the username / password / hostname for the new hosts mySQL server (I assume you did copy the mySQL database too?) Quote Link to comment Share on other sites More sharing options...
mdennis83 Posted July 24, 2008 Author Share Posted July 24, 2008 I have a localized copy the owner gave to me, that probably doesn't have the db. what would the file ext. be? Quote Link to comment Share on other sites More sharing options...
JonnyThunder Posted July 24, 2008 Share Posted July 24, 2008 The database in this case isn't a file. It's a mySQL database, usually a different server. You'll need to use something like PHPMyAdmin and get connected to it, to make a backup. or use SSL to get connected and take a backup. Either way, you're gonna need that database! Quote Link to comment Share on other sites More sharing options...
mdennis83 Posted July 24, 2008 Author Share Posted July 24, 2008 I'm getting ahold of the original host to get a copy. In what file would I add the host/ user/pass? db_mysql.inc or local4.inc? cause local 4 has the info filled out but the db_ one has just ""; Quote Link to comment Share on other sites More sharing options...
jibster Posted July 24, 2008 Share Posted July 24, 2008 To expand on JonnyThunder above use PHPMyAdmin or another front-end like SQLYog (i use this) to connect to the database that has the data you want to move in. Export it was an 'SQL Dump' which will land on your desktop as a .sql file. Next, connect to your new server's MySQL (you'll need the server address/username etc from them). Import the dump (!) from your desktop and you should be sorted. Quote Link to comment Share on other sites More sharing options...
mdennis83 Posted July 24, 2008 Author Share Posted July 24, 2008 Ahh, okay. I'll update as soon as i get the old db, and we'll see what happens Quote Link to comment Share on other sites More sharing options...
mdennis83 Posted July 24, 2008 Author Share Posted July 24, 2008 Okay, i've imported the db, into go daddys sql server, now how do i make it look for that one instead of the old one? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.