XF 1.5 Migrating from PHP 5 to PHP 7


Good morning,

XenForo is running fine on a Debian 8 system with PHP 5.

I think of switching to Debian 9 with PHP 7.

To prepare this step, I've set up a test installation on one of my local Linux boxes, made sure that the installed PHP extensions match and copied the files (along with the database content) over to the Linux box.

XenForo itself doesn't show up. I can start the admin panel which is working fine, and I can make a clean install (after deleting the lock file). After the clean install, XenForo runs fine (but without users and content).

When I restore the database, XenForo again gives me a blank page.

I've checked the Apache2 error log, but couldn't find any hard errors.

I am certain that a lot of people made such a migration, and I assume it should work flawlessly. But I am running out of ideas right now ...



Hello, Brogan -

sorry, it looks like I haven't described it clear enough (my fault).

I took the complete structure from the running system (/var/www with all subfolders) and put it on the Linux machine, to the folder that is the document root for Apache2 (also /var/www). This should have all the installed add-ons from the file point of view.

Then I created a database that matches the one on the current server and restored a dump I created using mysqldump.

As a last step I checked the config.ph to make sure username, database name, password, etc. match.

As far as I understand it, doing it this way should have everything again in place. I've done this once or twice in the past when switching the server, and it always worked.



XenForo moderator
Staff member
You said a clean install works fine and the ACP works on the restored forum, but the front end does not, which is why I suspect an add-on may be involved.

A blank page is sometimes due to a suppressed error. Edit the library/config.php file and add the following:
ini_set('display_errors', true);

Or if you are on an Apache server, add this to the .htaccess file:
php_value display_errors 1


Hello, Brogan -

it's astonishing, but it looks like working now, but ...

The normal index page shows up, but when I do something (log in, take a look at an open forum) I get a "Not Found" "The requested URL /posts/123/ was not found on this server"

As there is also a switch from Apache 2.2 to 2.4, I think I know where to look next.

Thank you for your help!


Good morning from Germany -

I've taken a deeper look and found the following: an out-of-the-box installation works fine. As soon as I switch to "friendly URL", any link from the forum only gives a "not found" error (on the out-of-the-box installation).

I renamed the existing .htaccess file, and created a new one by copying the htaccess.txt file. Same result.

I checked the apache2.conf and change the "AllowOverride None" to "AllowOverrid All" in the directory section for the document root folder, and did an Apache2 restart. Still a not found is the result of using any link on the index page.

Any idea where to look now?