MyBB Community Forums

Full Version: PHP version used in MyBB forum
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
On my Ubuntu 18.04 server, I have one MyBB forum. Today I want to add another one, but I failed when Installation wizard checks requirements. It says that PHP XML Extension "Not installed". Hm, the first forum works!

But then I found something interesting - both forums (one which works and the new one which failed in the wizard) shows that I use PHP 7.2...
On the server, I have PHP 7.4 (also with all usual extensions). How to force MyBB to use 7.4.

Any idea?
You don't force MyBB to use a specific php version - your web server handles this.  Check phpinfo in the ACP of the working MyBB copy.  Can you find SimpleXML listed? It's a required extension.

Do you have multiple versions of php installed on the host, along with the version specific extensions?  Can the versions be switched - i.e. sudo update-alternatives --config php?

If you have multiple versions, still have to enable the desired version in your web server.  The php version currently enabled in your config will be listed in the MyBB ACP.  On Ubuntu with Apache2, you'll need to a2dismod [old version], a2enmod [new version], then restart Apache to change the version.

Finally, I wouldn't run php 7.4 with MyBB - but 7.2 should be fine.  MyBB recommends 7.3.

cheers...
As nixer said, 7.3 is recommended by MyBB. Check MyBB requirements page for all requirements
https://docs.mybb.com/1.8/install/requirements/
(2020-06-11, 02:57 PM)nixer55 Wrote: [ -> ]You don't force MyBB to use a specific php version - your web server handles this.  Check phpinfo in the ACP of the working MyBB copy.  Can you find SimpleXML listed? It's a required extension.

Do you have multiple versions of php installed on the host, along with the version specific extensions?  Can the versions be switched - i.e. sudo update-alternatives --config php?

If you have multiple versions, still have to enable the desired version in your web server.  The php version currently enabled in your config will be listed in the MyBB ACP.  On Ubuntu with Apache2, you'll need to a2dismod [old version], a2enmod [new version], then restart Apache to change the version.

Finally, I wouldn't run php 7.4 with MyBB - but 7.2 should be fine.  MyBB recommends 7.3.

cheers...

Tnx. I will go step by step.
I opened PHP info for the working forum. It shows: PHP version 7.2.31-1 and SimpleXML is listed only in one line where authors are listed. Is this ok or it should be something more?

I can find many PHP installed on my server. Maybe the best solution will be to remove all installed versions and install only suggested 7.3?
(2020-06-12, 03:11 AM)kacnje Wrote: [ -> ]
(2020-06-11, 02:57 PM)nixer55 Wrote: [ -> ]You don't force MyBB to use a specific php version - your web server handles this.  Check phpinfo in the ACP of the working MyBB copy.  Can you find SimpleXML listed? It's a required extension.

Do you have multiple versions of php installed on the host, along with the version specific extensions?  Can the versions be switched - i.e. sudo update-alternatives --config php?

If you have multiple versions, still have to enable the desired version in your web server.  The php version currently enabled in your config will be listed in the MyBB ACP.  On Ubuntu with Apache2, you'll need to a2dismod [old version], a2enmod [new version], then restart Apache to change the version.

Finally, I wouldn't run php 7.4 with MyBB - but 7.2 should be fine.  MyBB recommends 7.3.

cheers...

Tnx. I will go step by step.
I opened PHP info for the working forum. It shows: PHP version 7.2.31-1 and SimpleXML is listed only in one line where authors are listed. Is this ok or it should be something more?

I can find many PHP installed on my server. Maybe the best solution will be to remove all installed versions and install only suggested 7.3?
That should be the quickest solution for sure though I believe 7.2.31 should be fine and the weird thing is the error. Can you share the screenshot of the error?
(2020-06-12, 03:11 AM)kacnje Wrote: [ -> ]Tnx. I will go step by step.
I opened PHP info for the working forum. It shows: PHP version 7.2.31-1 and SimpleXML is listed only in one line where authors are listed. Is this ok or it should be something more?

I can find many PHP installed on my server. Maybe the best solution will be to remove all installed versions and install only suggested 7.3?

I have a Ubuntu-like distro running the test instance of our live forum - which runs on Centos.  In both cases, searching for 'simplexml' in phpinfo gives me the credits you mention, but also includes lines  'SimpleXML support -- enabled'.  As well as the ini file used.  I'd followup with @WallBB, and take it from there.

cheers...