PDA

View Full Version : Changing URLs


Marks_Smoothie
3-5-06, 10:30 AM
Hi,
I'm trying to upload my message boards from one url to another.
When I access the site, I keep getting this error:

Warning: main(./db/mysql4.php): failed to open stream: No such file or directory in /www/w/wherewebelon/htdocs/includes/db.php on line 35

Warning: main(./db/mysql4.php): failed to open stream: No such file or directory in /www/w/wherewebelon/htdocs/includes/db.php on line 35

Warning: main(): Failed opening './db/mysql4.php' for inclusion (include_path='.:/usr/local/lib/php') in /www/w/wherewebelon/htdocs/includes/db.php on line 35

Fatal error: Cannot instantiate non-existent class: sql_db in /www/w/wherewebelon/htdocs/includes/db.php on line 60

Both my mysqls however are mysql4, so that can't be it.
The old was on mysql03.powweb.com and the new one is on mysql19.powweb.com. But I don't see how I can change that in this file.
Something about this file apparently needs to be changed, but I can't figure out what

YvetteKuhns
3-5-06, 12:12 PM
Make copies of your original db.php, then try to upload db.php in the includes folder in htdocs. It is possible that the file was corrupted during transfer.

Marks_Smoothie
3-5-06, 12:23 PM
I have actually already tried that but it doesn't work :S

YvetteKuhns
3-5-06, 01:18 PM
To be honest, I have many sites on many PowWeb servers. Only the database on mysql04 has been having problems since January. We are having similar problems to yours for a CMS site, but not a forum.

mitchind
3-6-06, 10:35 AM
It's got nothing to do with the mysql server you're on.

It's looking for the database setup file in htdocs/db/mysql4.php - which it can't find.

Check the case of the filename - or more likely you're including it from the wrong directory. Check for existence of file - I'd bet it's in "htdocs/includes" - not "htdocs/includes/db"

If you want more help - post the part of the affected code and let us know your website URL

Marks_Smoothie
3-6-06, 10:48 AM
Owwwwwwwwwww, I think I get what you mean.
He's looking for the folder db, which doesn't actually exist. It is directly in the folder htdocs/includes
I'm not home right now. But I'll try later

mitchind
3-6-06, 11:14 AM
He's looking for the folder db, which doesn't actually exist. It is directly in the folder htdocs/includes
Not sure what you mean - if it doesn't exist how can it be in the folder?

YvetteKuhns
3-6-06, 01:18 PM
Check for existence of file - I'd bet it's in "htdocs/includes" - not "htdocs/includes/db"

That is probably the case.

He's looking for the folder db, which doesn't actually exist. It is directly in the folder htdocs/includes

You have that backwards. The script is looking for db.php in the includes folder inside the htdocs folder. It is NOT looking it in a folder named db inside your includes folder, but maybe it should be. Do you have a folder named db? You should, because that is where mysql4.php is. Do you have db.php inside that folder?

Marks_Smoothie
3-6-06, 02:02 PM
Thanks a million!
Apparently, my db folder was empty :-s
Don't even know how that happened!!!

Now all I have to do, is make sure it stays at my URL. Everytime I log in, it switches back to my old URL