Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: chamacao on January 28, 2019, 12:06:18 AM

Title: php 7.2
Post by: chamacao on January 28, 2019, 12:06:18 AM
Hi all

Hope this is the right place to post a php problem.
Do not know a thing or have an idea about fixing this and my IP will not help, they just want to sell extended support.

I have being requested to upgrade the board to php 7.2 when I do. I get the following errors as shown on the images.


Deprecated: Function create_function() is deprecated in /homepages/19/d282217206/htdocs/csa/Sources/Load.php on line 178
Deprecated: Function create_function() is deprecated in /homepages/19/d282217206/htdocs/csa/Sources/Load.php on line 183
Deprecated: Function create_function() is deprecated in /homepages/19/d282217206/htdocs/csa/Sources/Load.php on line 184
Deprecated: Function create_function() is deprecated in /homepages/19/d282217206/htdocs/csa/Sources/Load.php on line 220
Deprecated: Function create_function() is deprecated in /homepages/19/d282217206/htdocs/csa/Sources/Load.php on line 223
Deprecated: Function create_function() is deprecated in /homepages/19/d282217206/htdocs/csa/Sources/Load.php on line 235
Deprecated: Function create_function() is deprecated in /homepages/19/d282217206/htdocs/csa/Sources/Load.php on line 250
Deprecated: Function create_function() is deprecated in /homepages/19/d282217206/htdocs/csa/Sources/Load.php on line 252
Deprecated: Function create_function() is deprecated in /homepages/19/d282217206/htdocs/csa/Sources/Load.php on line 257
Deprecated: Function create_function() is deprecated in /homepages/19/d282217206/htdocs/csa/Sources/Load.php on line 268
Deprecated: Function create_function() is deprecated in /homepages/19/d282217206/htdocs/csa/Sources/Load.php on line 270
Deprecated: Function create_function() is deprecated in /homepages/19/d282217206/htdocs/csa/Sources/Load.php on line 273


Thank you, and be easy on my on the explanation. Thanks.
Also uploaded my load file.

Regards
Title: Re: PHP 7.2
Post by: drewactual on January 28, 2019, 12:09:15 AM
Smf isnt built for 7.2.... However, search the mod section as someone has graciously scripted and donated a mod to make it work. 
Title: Re: php 7.2
Post by: live627 on January 28, 2019, 12:24:16 AM
Can you try PHP 7.1?
Title: Re: php 7.2
Post by: vbgamer45 on January 28, 2019, 08:45:00 AM
php 7.1 works the best for SMF 2.0.x
If you need 7.2 support try this mod https://www.smfhacks.com/index.php?action=downloads;sa=view;id=215
Title: Re: php 7.2
Post by: chamacao on January 28, 2019, 12:37:18 PM
Thank you all.

It is working just fine with 7.1...The IP recommended 7.2 but that will definitively will not work. Hope that get solve in the future. Will give the mod a try.

Thanks  all.
Title: Re: php 7.2
Post by: jstop on January 29, 2019, 05:43:06 PM
Thanks for the info... Just found out my host is upgrading all servers to PHP 7.2 in March.

Should I wait until they update to 7.2, or should I install the MOD now?

https://www.smfhacks.com/index.php?action=downloads;sa=view;id=215
Title: Re: php 7.2
Post by: vbgamer45 on January 29, 2019, 05:59:02 PM
either way natbe smf 2.0 will do an update
php 7.2 just adds warning messages
Title: Re: php 7.2
Post by: delta5 on January 30, 2019, 12:08:50 PM
I just spoke to godaddy tech support about this. 7.2 and soon 7.3 will be installed on their servers, but they will keep the older versions available in cPanel so I'm safe for now.
Title: Re: php 7.2
Post by: jstop on February 13, 2019, 07:40:17 PM
Has anyone successfully tested this mod in PHP 7.2 yet?
Title: Re: php 7.2
Post by: landyvlad on February 13, 2019, 07:47:37 PM
chamacao -  going back to 7.1 is your best option.

And get a new ISP.


Title: Re: php 7.2
Post by: Shambles on February 14, 2019, 03:22:01 AM
Quote from: landyvlad on February 13, 2019, 07:47:37 PM
And get a new ISP.

How will that help with his hosting issues?
Title: Re: php 7.2
Post by: spiros on February 14, 2019, 04:43:47 PM
I tested the mod https://www.smfhacks.com/index.php?action=downloads;sa=view;id=215
I saw this:

Apply Filter: Only show the error messages of this URL
forum/index.php?action=admin;area=logs;sa=errorlog;descApply Filter: Only show the errors with the same message
8192: Function create_function() is deprecatedApply Filter: Only show the errors from this file File: Sources/SimpleSEF.php
Line: 427


Funnily enough, I checked, and SimpleSEF is not activated. I even deleted its files from Package Manager.
Title: Re: php 7.2
Post by: Kindred on February 14, 2019, 05:47:12 PM
but you still have the file there, and I would guess a hook or another file which calls that file.
Title: Re: php 7.2
Post by: spiros on February 14, 2019, 05:55:42 PM
When I deleted that file then the errors stopped... Strange that uninstalling the mod does not delete the files...
Title: Re: php 7.2
Post by: vbgamer45 on February 14, 2019, 06:04:24 PM
Some older mods don't delete the files.
Title: Re: php 7.2
Post by: spiros on February 14, 2019, 06:20:49 PM
By the way, thanks for the mod vbgamer45, works great in php 7.2. Curious to test it on 7.3 when Cpanel supports it.
Title: Re: php 7.2
Post by: Kindred on February 15, 2019, 08:13:52 AM
however....   that file would only have been CALLED if something else is asking for it to be loaded....  which means that deleting the file was only half of the solution
Title: Re: php 7.2
Post by: spiros on February 15, 2019, 08:23:58 AM
Well, SimpleSEF.php looks dead so I cannot even check the code changes on a package parser.
https://www.simplemachines.org/community/index.php?topic=352351.0
Title: Re: php 7.2
Post by: Arantor on February 15, 2019, 08:28:49 AM
Fairly sure it only used hooks anyway.
Title: Re: php 7.2
Post by: spiros on March 08, 2019, 01:56:14 PM
Testing php 7.3 with the mod mentioned by vbgamer45 and it works just fine, no error messages in error log :)