Fatal Error Migrating existing forum to PHP 7 host

Get help with installation and running phpBB 3.2.x here. Please do not post bug reports, feature requests, or extension related questions here.
UXgizmo
Registered User
Posts: 57
Joined: Wed Jan 17, 2018 9:36 pm

Fatal Error Migrating existing forum to PHP 7 host

Post by UXgizmo » Thu Jan 18, 2018 1:03 am

Hi all hope this is the right channel to ask for help on data migration issues. I recently moved my forum into a new host running php 7. I was able to successfully transfer all the backfiles into the new directory, connect config file, and import the backup sql file into the new database. I was able to successfully connect to the database however when I go to the site live I received a 500 error. After speaking with the hosting company they pointed me to the Fatal Error seen below

PHP Fatal error: Uncaught Error: Call to undefined function mysql_connect() ...

What's the best way to go about fixing this issue? It seems to be in few places so are there any specific files that I need to replace or modify?

or Should I just update to the latest phpbb 3.2? If so what's the best way to migrate the user content and data without bringing over all the files from the old phpbb forum? Any thoughts/recommendation/best practices would be greatly appreciated.

User avatar
kinerity
Community Team Member
Community Team Member
Posts: 1741
Joined: Mon Sep 01, 2014 1:00 am
Location: sudo rm -rf /
Name: Kailey Truscott
Contact:

Re: Fatal Error Migrating existing forum to PHP 7 host

Post by kinerity » Thu Jan 18, 2018 1:13 am

UXgizmo wrote:
Thu Jan 18, 2018 1:03 am
or Should I just update to the latest phpbb 3.2? If so what's the best way to migrate the user content and data without bringing over all the files from the old phpbb forum? Any thoughts/recommendation/best practices would be greatly appreciated.
Is this a 3.0 forum? Either way, it's always best to upgrade to the latest version (3.2 supports PHP 7). Follow the steps below.

Notes:
  • Your server must be running at least PHP 5.4 or higher.
  • phpBB 3.2 is not compatible with 3.0 and most of the previous files will need to be removed prior to upgrading.
  • Styles and MODs from 3.0 cannot be installed on phpBB 3.2. To upgrade, perform the following steps:
  1. Make a back-up of the original files and database
  2. Deactivate all styles except for prosilver
  3. Remove all MOD-related changes from the database. The Support Toolkit's Database Cleaner can be used for this.
  4. Ensure that the activated spambot countermeasure is one of the standard phpBB plugins (Simple image, GD image, GD 3D image, Q&A, reCaptacha).
  5. Set British English as the only language pack and delete all other language pack directories from your server
  6. Delete all of your phpBB 3.0.x files EXCEPT for the following:
    • The config.php file
    • The /images/ directory
    • The /files/ directory
    • The /store/ directory
  7. Upload the contents of the phpBB3 directory from the uncompressed 3.2.x Full Package (EXCEPT for config.php) into your forum's directory (Note: you don't want to overwrite your original config.php file)
  8. Browse to www.example.com/install/
  9. Click the Update tab
  10. Click the Update button
  11. Select "Update database only" and click Submit
  12. Wait for the progress bar to reach 100% and for a message indicating that the update has completed
  13. Delete or rename the /install/ directory
Kailey Truscott - Community Team

UXgizmo
Registered User
Posts: 57
Joined: Wed Jan 17, 2018 9:36 pm

Re: Fatal Error Migrating existing forum to PHP 7 host

Post by UXgizmo » Thu Jan 18, 2018 1:25 am

Hi Kinerity, thank you so much for the quick reply it's much appreciated.

One question around the sql backup file a generated from the old forum. Once I've installed the new 3.2 what's the next step to importing the back up sql file without errors to the newly created database? Once I run the new installation then try to import the old sql backup I get ton of errors? Thoughts suggestion what step did I miss?
Last edited by UXgizmo on Thu Jan 18, 2018 1:27 am, edited 1 time in total.

User avatar
david63
Jr. Extension Validator
Posts: 14554
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: Fatal Error Migrating existing forum to PHP 7 host

Post by david63 » Thu Jan 18, 2018 1:27 am

That error is sometimes caused by having an invalid database type in your config.php file. If you have mysql as the database type then that has been removed from PHP7 and you need to change it to mysqli.
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored

UXgizmo
Registered User
Posts: 57
Joined: Wed Jan 17, 2018 9:36 pm

Re: Fatal Error Migrating existing forum to PHP 7 host

Post by UXgizmo » Thu Jan 18, 2018 1:52 am

Wow! @david63 great suggestion for the quick fix. That worked instantly! I've been struggling with this for days! Thanks for the quick reply. So glad I decided to join the community forum.

@kinerity and @david63 I'd still like to update to the 3.2 per Kinerity's suggestion as a next step what's the best way to update the forum now that I have a working original instance running in php 7?

One issue to note I had to rename from ".htaccess" file to ".htaccess_old" just to preview and test any page in the directory from the live site it seemed to just want to download the page it was just very strange.

User avatar
kinerity
Community Team Member
Community Team Member
Posts: 1741
Joined: Mon Sep 01, 2014 1:00 am
Location: sudo rm -rf /
Name: Kailey Truscott
Contact:

Re: Fatal Error Migrating existing forum to PHP 7 host

Post by kinerity » Thu Jan 18, 2018 2:02 am

The instructions I gave will get you up to the latest version.
UXgizmo wrote:
Thu Jan 18, 2018 1:25 am
One question around the sql backup file a generated from the old forum. Once I've installed the new 3.2 what's the next step to importing the back up sql file without errors to the newly created database? Once I run the new installation then try to import the old sql backup I get ton of errors? Thoughts suggestion what step did I miss?
Did you update the database as mentioned in step 11? I should note that the back-up is just in case something goes wrong. You shouldn't be deleting any database information. Let us know where you got stuck at and we can help you through. :)
Kailey Truscott - Community Team

UXgizmo
Registered User
Posts: 57
Joined: Wed Jan 17, 2018 9:36 pm

Re: Fatal Error Migrating existing forum to PHP 7 host

Post by UXgizmo » Thu Jan 18, 2018 2:06 am

Now that the migrated forum is running I'm getting a few warning messages (doh):

[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead

[phpBB Debug] PHP Warning: in file /includes/functions.php on line 4586: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3765)


Are there any known quick fixes?

User avatar
kinerity
Community Team Member
Community Team Member
Posts: 1741
Joined: Mon Sep 01, 2014 1:00 am
Location: sudo rm -rf /
Name: Kailey Truscott
Contact:

Re: Fatal Error Migrating existing forum to PHP 7 host

Post by kinerity » Thu Jan 18, 2018 2:09 am

Unfortunately no. phpBB 3.2 is the only version that is officially supported on PHP 7 installations.
Kailey Truscott - Community Team

UXgizmo
Registered User
Posts: 57
Joined: Wed Jan 17, 2018 9:36 pm

Re: Fatal Error Migrating existing forum to PHP 7 host

Post by UXgizmo » Thu Jan 18, 2018 2:23 am

@Kinerity Yes that's the step I was confused because in this video it was replacing the sql file through the php admin https://youtu.be/ZF0F1ZAIsz8 right round 2:25 seconds. Per your Step 11 I'd be uploading the backup sql via the phpbb setup or admin/panel correct?

As a quick fix I went with the recommendations from David63 just to get it working which it is but now I have a few warning errors so assume I'll need to get a proper installation per your list of steps so that I'm running the latest and greatest? Do you think that would fix the warning messages?

User avatar
kinerity
Community Team Member
Community Team Member
Posts: 1741
Joined: Mon Sep 01, 2014 1:00 am
Location: sudo rm -rf /
Name: Kailey Truscott
Contact:

Re: Fatal Error Migrating existing forum to PHP 7 host

Post by kinerity » Thu Jan 18, 2018 2:36 am

UXgizmo wrote:
Thu Jan 18, 2018 2:23 am
@Kinerity Yes that's the step I was confused because in this video it was replacing the sql file through the php admin https://youtu.be/ZF0F1ZAIsz8 right round 2:25 seconds.
We can't verify the authenticity of other groups videos for the soaftware.
UXgizmo wrote:
Thu Jan 18, 2018 2:23 am
Per your Step 11 I'd be uploading the backup sql via the phpbb setup or admin/panel correct?
I think we might have a miscommunication here. If you are already on your new host with a (somewhat) working phpBB installation, you shouldn't need to upload your database backup unless something goes wrong. If you follow the steps outlined, you shouldn't run into any problems.
UXgizmo wrote:
Thu Jan 18, 2018 2:23 am
As a quick fix I went with the recommendations from David63 just to get it working which it is but now I have a few warning errors so assume I'll need to get a proper installation per your list of steps so that I'm running the latest and greatest? Do you think that would fix the warning messages?
Yes, phpBB 3.2 runs fine on PHP 7 installations.

Are you able to provide a link to your site?
Kailey Truscott - Community Team

UXgizmo
Registered User
Posts: 57
Joined: Wed Jan 17, 2018 9:36 pm

Re: Fatal Error Migrating existing forum to PHP 7 host

Post by UXgizmo » Thu Jan 18, 2018 3:23 am

@Kinerity to clarify I have both host going right now I'm trying to move all data, content, and user login to the new host. I did some what of a crude migration by taking all the files from the old host and moved them to the new host. I created a database through the php admin per the video steps and then imported the backup sql file from the old forum. My first attempt to access the site I had the issue with .htaccess so I renamed it which then lead me to the 504 error. Checking the error logs I discovered the "Fatal Error" issue. Per david63 quick fix I udpated the config.php file from "mysql" to "mysqli" I was able to crudely get it to work with all the files from the orginal server and the sql database backup imported via php admin. It's currently working just with warnings.

I'd prefer to have the latest and greatest running I just need to move all the user info and content over to the new installation of phpbb 3.2.x

So what I think I'm understanding is that I can install the new forum on the new hosting account based on your steps and I only really need the files listed below from the old host/forum and I don't really need the to backup the sql file correct? All the user info content and files are located in the directories listed below?

The config.php file
The /images/ directory
The /files/ directory
The /store/ directory

Should I skip to step 7 since I'll be running the new version already? So after bringing over just the old files you listed and replacing the 3.2.x config.php will that bring over the current board data/content and users info?

I sorry I'm a bit on the slow side I'm more visual when it comes to direction/installation I need pretty pictures lol. Wish there was a call in line for this kinda stuff.

User avatar
kinerity
Community Team Member
Community Team Member
Posts: 1741
Joined: Mon Sep 01, 2014 1:00 am
Location: sudo rm -rf /
Name: Kailey Truscott
Contact:

Re: Fatal Error Migrating existing forum to PHP 7 host

Post by kinerity » Thu Jan 18, 2018 3:35 am

Let's start from the beginning then. Follow the steps in Knowledge Base - Transferring Your Board to a New Host or Domain to backup your database. Once you have finished with that KB article, then follow the instructions I gave in my first reply.
Kailey Truscott - Community Team

UXgizmo
Registered User
Posts: 57
Joined: Wed Jan 17, 2018 9:36 pm

Re: Fatal Error Migrating existing forum to PHP 7 host

Post by UXgizmo » Thu Jan 18, 2018 4:15 am

Ok this might take me into tomorrow evening to follow those steps. I'll check back in on my status.

User avatar
Lumpy Burgertushie
Registered User
Posts: 64664
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Fatal Error Migrating existing forum to PHP 7 host

Post by Lumpy Burgertushie » Thu Jan 18, 2018 4:36 am

and just to be clear, the answer to your question above is NO. the users/forums etc. etc. are not in any of the files. they are all in the database.

also, you can not just transfer the users /forums etc. from one database to another because all of the database tables are interconnected.




robert
I am available for custom work on a donation basis. Please send me a PM with your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

OK, so what's the speed of dark?

UXgizmo
Registered User
Posts: 57
Joined: Wed Jan 17, 2018 9:36 pm

Re: Fatal Error Migrating existing forum to PHP 7 host

Post by UXgizmo » Fri Jan 19, 2018 5:36 am

Ok now I'm getting the error below when i go to update database via the install/directory

General Error:SQL ERROR [ mysqli ]Unknown column 'style_path'...

It seems to happen each time I get to this step

Click the Update button
Select "Update database only" and click Submit
Wait for the progress bar to reach 100% and for a message indicating that the update has completed (errors out at 47%)

Post Reply

Return to “[3.2.x] Support Forum”

Who is online

Users browsing this forum: Beakster, canonknipser, HamiltonDev and 41 guests