View Full Version : Moving to PHP5
skywalker2208
05-18-2008, 01:59 AM
My site is currently running on PHP4 and MYSQL4 and I wanted to move my site to PHP5 and to MYSQL5. For the move to PHP5 do I need to do anything with the site? Will everything still work fine from moving from 4 to 5?
On regards to mysql, can I just take a mysql dump of mysql4 and import that dump in the new mysql 5 database?
iogames
05-18-2008, 04:38 AM
request to your hosting service the migration, on my case just 2 external scripts, non-vBulletin stopped working, but I fixed them...
So don't hesitate and take the step ;)
Maybe a backup will give you peace
skywalker2208
05-19-2008, 01:06 AM
request to your hosting service the migration, on my case just 2 external scripts, non-vBulletin stopped working, but I fixed them...
So don't hesitate and take the step ;)
Maybe a backup will give you peace
Request what? Migrating the mysql4 to the mysql 5 database? I was planning on exporting the database and importing it into the new one.
I then plan to download a copy of the whole site just in case. Upgrade to mysql5 and change the script to point to the new database.
Once everything checks out I plan to switch to php5 and also backing up the database again. The hosting company will make the switch to php5 I just have to make sure everything that I am running can run on php5.
Is there anything wrong with the process I plan on doing?
mikesz
05-19-2008, 01:26 AM
You should be fine. Your plan is correct. Be sure to do a full back up of everything before you start the switch. I use the system backup provided in my cpanel. It gets everything and is accessible if something doesn't go right.
HTH, mikesz
skywalker2208
05-19-2008, 01:44 AM
Thanks mike, but I should have no problem switching from php4 to php5 because I see that it the recommended version to use.
Dismounted
05-19-2008, 06:23 AM
You may have small compatibility issues from modifications (most common is the array_merge() error, but can be easily fixed).
skywalker2208
05-23-2008, 12:25 PM
I just tried to do the switch from mysql4 to mysql5 and it couldn't connect to the database. Here is the process I did.
1. Create another database
2. import the database
3. changed my config.php file in the includes directory to point to the new database
4. after import was complete it said that it could not connect to the database.
Is there somewhere else I need to make the change?
Marco van Herwaarden
05-23-2008, 12:26 PM
What is the exact error message?
skywalker2208
05-23-2008, 01:27 PM
Doesn't give any specifics. Just a standard message. I attached a screenshot.
Database error
The database has encountered a problem.
Marco van Herwaarden
05-23-2008, 01:31 PM
Either check the error message in your technical email, or right-click on the error page, select "View Source" and you will also get the full error message.
skywalker2208
05-23-2008, 02:01 PM
Database error in vBulletin :
Cannot use database databasename1
MySQL Error : Access denied for user 'usernamefordb2'@'%' to database 'databasename1'
Error Number : 1044
That is the error I am getting, but I changed the username and database. So it looks like it is using the wrong db name.
This is where I made my changes in the config.php
$config['MasterServer']['servername'] = 'pathtodatabase';
$config['MasterServer']['port'] = XXXX;
// ****** MASTER DATABASE USERNAME & PASSWORD ******
// This is the username and password you use to access MySQL.
// These must be obtained through your webhost.
$config['MasterServer']['username'] = 'dbusername2';
$config['MasterServer']['password'] = 'dbuserpass';
snakes1100
05-23-2008, 02:05 PM
servername should NOT be a path, it should be a name like "localhost", or an IP address or even a server name like databaseserver.myhost.com.
please recheck your old config file for the correct hostname value
skywalker2208
05-23-2008, 02:18 PM
I know the hostname value is correct it is the same as the old one. I just didn't want to post it on here.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.