Jump to content

[SOLVED] PHP Website move, getting errors


mdennis83

Recommended Posts

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

Link to comment
Share on other sites

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 ?

Link to comment
Share on other sites

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

 

 

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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.

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.