News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Is PHP 7.4.3 ok?

Started by Cloudmaster, February 26, 2020, 05:31:27 AM

Previous topic - Next topic

Cloudmaster

I've done a clean install of SMF 2.0.17, which runs in a subdirectory of a main site which is working fine under PHP 7.4.3, but I'm getting a 500 internal server error when trying to access the forum.  Is SMF to blame or should I look elsewhere?

Thanks for looking

SychO

PHP 7.4 is currently not supported in 2.0
Checkout My Themes:
-

Potato  •  Ackerman  •  SunRise  •  NightBreeze

d3vcho

"Greeting Death as an old friend, they departed this life as equals"

Sir Osis of Liver

FYI, 2.0.17 is not fully compatible with php 7.2, it will work but log tons of errors. :P
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Kindred

It only logs errors if your system is weirdly configured
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Sir Osis of Liver

Server is logging the same errors that are being suppressed in 2.0.17.  As per another topic, it's a workaround to avoid removing the many create_function() calls in core code.  The errors still occur, they're just hidden from forum error log.  This, of course, has no effect on server log.  Dropping back to php 7.1 stops the errors.

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Chen Zhen

Quote from: Cloudmaster on February 26, 2020, 05:31:27 AM
I've done a clean install of SMF 2.0.17, which runs in a subdirectory of a main site which is working fine under PHP 7.4.3, but I'm getting a 500 internal server error when trying to access the forum.  Is SMF to blame or should I look elsewhere?

Thanks for looking

If the main site in the parent path is working properly then you should be able to run a secondary installation in a child path without any problem.
Ensure the path has proper owership & permissions for your web server platform (ie. Apache).
Also you may need to run repair_settings.php in the child path and set up a new dataabase if that is your intention.

Quote from: Sir Osis of Liver
Server is logging the same errors that are being suppressed in 2.0.17.  As per another topic, it's a workaround to avoid removing the many create_function() calls in core code.  The errors still occur, they're just hidden from forum error log.  This, of course, has no effect on server log.  Dropping back to php 7.1 stops the errors.

I updated the PHP 7 compatibility tool for SMF 2.0.17 which also makes the suppression of create_function() warnings optional within core feature settings (ie. for mod debugging).
You can install it if you find that those errors are still showing up in your PHP error log.
ref. https://web-develop.ca/index.php?action=downloads;area=stable_smf_modifications;file=48

My SMF Mods & Plug-Ins

WebDev

"Either you repeat the same conventional doctrines everybody is saying, or else you say something true, and it will sound like it's from Neptune." - Noam Chomsky

Sir Osis of Liver

Methinks we're flogging the wrong end of the horse.  The errors occur because .17 contains code that's deprecated in php 7.2.  Hiding the errors doesn't change the fact that .17 is not fully compatible with php 7.2, as advertised.  It's a kluge. 
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Kindred

deprecated does not mean "not working" -- it's a warning that things need to be changed soon, else, in the next version they may not work
--    so 2.0.17 is indeed compatible with 7.2
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

a10

#9
Spent some time testing 2.0.17 + 7.4.3, "seems" ok, loads fine, no blank pages, the basics works, login\out, browsing, posting, pm, emails, attachments, search etc. Some errors in log (ManageErrors.php, Search).
Applies to more or less stock 2.0.17. Some mods\themes may or will be affected\produce errors.
Could probably run a basic forum ok enough on 7.4 if nothing else existed, but as 7.2 & 3 are there, zero reason to.

ps, maybe time to update > https://download.simplemachines.org/requirements.php
A page many will read if downloading smf. Says "PHP 5.4.0 or higher" ...need to add "but not too high" :O)
2.0.19, php 8.0.23, MariaDB 10.5.15. Mods: Contact Page, Like Posts, Responsive Curve, Search Focus Dropdown, Add Join Date to Post.

Illori

we are trying to get that updated. in the mean time the requirements page on the wiki is more updated.

Sir Osis of Liver

Quote from: Kindred on February 28, 2020, 12:59:03 PM
deprecated does not mean "not working" -- it's a warning that things need to be changed soon, else, in the next version they may not work
--    so 2.0.17 is indeed compatible with 7.2

Quote from: Sir Osis of Liver on February 23, 2020, 11:56:53 PM
From php.net -

Warning This function has been DEPRECATED as of PHP 7.2.0. Relying on this function is highly discouraged.

We both know that using deprecated code is poor practice.

Quote from: Sir Osis of Liver on February 26, 2020, 10:03:12 PM
Server has logged just over 180 mb of 'Function create_function() is deprecated' errors from 25-Feb-2020 18:09:21 to 26-Feb-2020 21:36:25.  Forum is no longer logging them.

And if server is logging approx. 6.5 mb of errors every hour, the typical basic host account will exceed allocated disk space in 2 months or so (I have 10 gb), and bad things will happen to the forum.

I appreciate the difficulty of rooting out all the deprecated code, and the obvious fact that 2.0 branch has outlived it's expected lifespan, but it's disingenuous to claim it's ok just to protect the brand.

(IMHO)
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Advertisement: