Advertisement:

Author Topic: Error log on subs.php  (Read 186 times)

Offline koyinpyone

  • Newbie
  • *
  • Posts: 4
Error log on subs.php
« on: October 23, 2019, 02:42:26 PM »
my new installed SMF forum got lots of errors like " 8192: Function create_function() is deprecated " on  Sources/Subs.php.
please advise me how to solve. error like that

1210:            array(
1211:               'tag' => 'ftp',
1212:               'type' => 'unparsed_content',
1213:               'content' => '<a href="$1" class="bbc_ftp new_win" target="_blank">$1</a>',
==>1214:               'validate' => create_function('&$tag, &$data, $disabled', '
1215:                  $data = strtr($data, array(\'<br />\' => \'\'));
1216:                  if (strpos($data, \'ftp://\') !== 0 && strpos($data, \'ftps://\') !== 0)
1217:                     $data = \'ftp://\' . $data;
1218:               '),
1219:            ),

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,982
    • StoryBB/StoryBB on GitHub
Re: Error log on subs.php
« Reply #1 on: October 23, 2019, 02:48:15 PM »
You need to set your hosting to PHP 7.1 or lower, you're using 7.2 or 7.3 which doesn't work properly with SMF 2.0.15 - the next version will fix this.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline Looking

  • SMF Hero
  • ******
  • Posts: 2,381
  • SMF Customization
    • jeanborde on Facebook
    • SMF Custom Themes & Custom Coding
Re: Error log on subs.php
« Reply #2 on: October 23, 2019, 03:12:54 PM »
There is a Github patch that can assist with this so you do not have to downgrade PHP.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,982
    • StoryBB/StoryBB on GitHub
Re: Error log on subs.php
« Reply #3 on: October 23, 2019, 03:25:32 PM »
There is a Github patch that can assist with this so you do not have to downgrade PHP.

It relies on having no mods, though. Better to wait for 2.0.16 than apply patches like that.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline koyinpyone

  • Newbie
  • *
  • Posts: 4
Re: Error log on subs.php
« Reply #4 on: October 23, 2019, 03:32:22 PM »
Thank you guys . I try to downgrade PHP to 7.0 than error issue solved.

Thanks alots


Offline Looking

  • SMF Hero
  • ******
  • Posts: 2,381
  • SMF Customization
    • jeanborde on Facebook
    • SMF Custom Themes & Custom Coding
Re: Error log on subs.php
« Reply #5 on: October 23, 2019, 03:36:22 PM »
@Arantor, I've used it on sites with mods and custom mods with no issues *shrug*.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,982
    • StoryBB/StoryBB on GitHub
Re: Error log on subs.php
« Reply #6 on: October 23, 2019, 03:39:15 PM »
Sure, you know better than me about what's changed in 7.2 and what mods are affected and exactly how it will be affected (or prevent 2.0.16 being installed, for that matter).
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.