Moving a phorum to a new web server
Posted by Jan-Willem Stekelenburg
Moving a phorum to a new web server February 09, 2023 10:24AM |
Registered: 17 years ago Posts: 9 |
Hello,
I am trying to move my old (20 years, but updated to the latest version, 200 users, 20.000 messages, lots of attachments) phorum installation over to a new, custom built webserver (debian, mariadb, apache2, PHP 7) to preserve it. I exported the phorum database from the old server, but it is apparently too big to import in a new database on the new server (almost 2 GB). I have tried to adjust php.ini to compensate but have been unsuccesfull sofar.
Is there anyone with advice how I can move the phorum?
- shoud I do a fresh installation and then import the old database? (tried it, no joy sofar)
- should I just copy all the files from the old server? (no joy sofar)
Thank you for any help!
Jan-Willem Stekelenburg
Edited 1 time(s). Last edit at 02/09/2023 10:25AM by Jan-Willem Stekelenburg.
I am trying to move my old (20 years, but updated to the latest version, 200 users, 20.000 messages, lots of attachments) phorum installation over to a new, custom built webserver (debian, mariadb, apache2, PHP 7) to preserve it. I exported the phorum database from the old server, but it is apparently too big to import in a new database on the new server (almost 2 GB). I have tried to adjust php.ini to compensate but have been unsuccesfull sofar.
Is there anyone with advice how I can move the phorum?
- shoud I do a fresh installation and then import the old database? (tried it, no joy sofar)
- should I just copy all the files from the old server? (no joy sofar)
Thank you for any help!
Jan-Willem Stekelenburg
Edited 1 time(s). Last edit at 02/09/2023 10:25AM by Jan-Willem Stekelenburg.
Re: Moving a phorum to a new web server February 10, 2023 01:33AM |
Admin Registered: 19 years ago Posts: 575 |
First, Phorum has not been tested with php7. Some have had a few issues, other have different more major issues.
There are several threads here about php7, and some fixes.
_Please get error logging enabled. _ mysql/mariadb and php
Moving the database.
Do not move any table _data_ which Phorum can recreate from scratch (search), or is empty.
PHP uses php.ini
mysql uses my.ini (windows), my.cnf (nix) which may need its own settings.
In my.ini "STRICT_TRANS_TABLESt" needs to be set properly or import will fail.
>>>>>>>>>>>
I have seen issues (missing parts of page in the admin) with php7.2 on linux (not my site), yet it appears to work on my local windows machine.
To test, install an all new Phorum 5.2.23 in a different directory, just change the prefix for the phorum tables in the config.
You may also have issues due to engine type when loading from a Dump file, due to 'TYPE=MyISAM' being replaced with 'ENGINE=MyISAM'
Problems with importing the data only to newer versions of mysql (and mariaDB), may be caused by NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES being on by default. sql mode
>>>>>>>>>>>
More here>[www.phorum.org]
Generically ...
Install mysql
create a database
create a user (not root) and password
grant the user rights needed to create, read, update, delete tables (there may be more rights required)
upload/extract phorum to some directory.
modify the phorum config.php (username, password, and prefix)
Go to the admin.php and follow prompts.
If you missed one of the above, fix it.
MySQL has made changes over the years to some commands, deprecated some, removed others.
Enable the log file, and find the location for troubleshooting.
MySql has some sql-modes that could prevent older scripts from running as expected.
See [dev.mysql.com] and my.cnf or my.ini
Later versions of MySQL use innodb tables by default, the myisam engine may need to be specifically enabled
Only the search table must be myisam, however later versions of MySQL may prevent this...
[dev.mysql.com]
There are several threads here about php7, and some fixes.
_Please get error logging enabled. _ mysql/mariadb and php
Moving the database.
Do not move any table _data_ which Phorum can recreate from scratch (search), or is empty.
PHP uses php.ini
mysql uses my.ini (windows), my.cnf (nix) which may need its own settings.
In my.ini "STRICT_TRANS_TABLESt" needs to be set properly or import will fail.
>>>>>>>>>>>
I have seen issues (missing parts of page in the admin) with php7.2 on linux (not my site), yet it appears to work on my local windows machine.
To test, install an all new Phorum 5.2.23 in a different directory, just change the prefix for the phorum tables in the config.
You may also have issues due to engine type when loading from a Dump file, due to 'TYPE=MyISAM' being replaced with 'ENGINE=MyISAM'
Problems with importing the data only to newer versions of mysql (and mariaDB), may be caused by NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES being on by default. sql mode
>>>>>>>>>>>
More here>[www.phorum.org]
Generically ...
Install mysql
create a database
create a user (not root) and password
grant the user rights needed to create, read, update, delete tables (there may be more rights required)
upload/extract phorum to some directory.
modify the phorum config.php (username, password, and prefix)
Go to the admin.php and follow prompts.
If you missed one of the above, fix it.
MySQL has made changes over the years to some commands, deprecated some, removed others.
Enable the log file, and find the location for troubleshooting.
MySql has some sql-modes that could prevent older scripts from running as expected.
See [dev.mysql.com] and my.cnf or my.ini
Later versions of MySQL use innodb tables by default, the myisam engine may need to be specifically enabled
Only the search table must be myisam, however later versions of MySQL may prevent this...
[dev.mysql.com]
Re: Moving a phorum to a new web server February 11, 2023 04:38PM |
Registered: 17 years ago Posts: 9 |
Thankyou Scott. So should I install another version of PHP for best results? The whole idea is to create a new server exclusively for the phorum. So I can do anything necessary.. The question is then:
- what are the best circumstances for phorum to function optimally? PHP version? MariaDB? Ubuntu / Debian / ?
Thanks for the advice.
Jan-Willem
- what are the best circumstances for phorum to function optimally? PHP version? MariaDB? Ubuntu / Debian / ?
Thanks for the advice.
Jan-Willem
Re: Moving a phorum to a new web server February 12, 2023 11:42PM |
Admin Registered: 19 years ago Posts: 575 |
You need to enable the server logs, mysql logs, php logs, check for errors as you go.
I usually create a new install using a different prefix, empty the tables of the dummy data, then Import the existing phorum data. Test test test
I guess if you control the server, go with php 5.6
There are several threads with various fixes/hacks for 7.x. Depending on which mods you use you may have other issues.
mysql or MariaDb I do not know if there are versions that are incompatible with php 5.6.
So far I have never had an issue with either installation.
Just so you know, the "Phorum.org" Host switched the php version from 5.x I selected at migration back to 7.2.x.
Result is that most stuff works, more notices and errors in the phorum event log.
Some installs may not work at all with > 7.x
https://www.google.com/search?q=mysqldump+alternatives
I usually create a new install using a different prefix, empty the tables of the dummy data, then Import the existing phorum data. Test test test
I guess if you control the server, go with php 5.6
There are several threads with various fixes/hacks for 7.x. Depending on which mods you use you may have other issues.
mysql or MariaDb I do not know if there are versions that are incompatible with php 5.6.
So far I have never had an issue with either installation.
Just so you know, the "Phorum.org" Host switched the php version from 5.x I selected at migration back to 7.2.x.
Result is that most stuff works, more notices and errors in the phorum event log.
Some installs may not work at all with > 7.x
https://www.google.com/search?q=mysqldump+alternatives
Re: Moving a phorum to a new web server February 18, 2023 11:16PM |
Admin Registered: 19 years ago Posts: 575 |
If you are still having import issues... Many replies
[stackoverflow.com]
One of the replies includes...
>>
Regarding the time taken for importing huge files: most importantly, it takes more time because the default setting of MySQL is autocommit = true. You must set that off before importing your file and then check how import works like a gem.
You just need to do the following thing:
mysql> use db_name;
mysql> SET autocommit=0 ; source the_sql_file.sql ; COMMIT ;
<<
[stackoverflow.com]
One of the replies includes...
>>
Regarding the time taken for importing huge files: most importantly, it takes more time because the default setting of MySQL is autocommit = true. You must set that off before importing your file and then check how import works like a gem.
You just need to do the following thing:
mysql> use db_name;
mysql> SET autocommit=0 ; source the_sql_file.sql ; COMMIT ;
<<
Sorry, only registered users may post in this forum.