Advertisement:

Author Topic: Fatal error: Function name must be a string  (Read 4949 times)

Offline serge06

  • Semi-Newbie
  • *
  • Posts: 33
Fatal error: Function name must be a string
« on: December 13, 2017, 10:56:20 AM »
Hi, I am trying to upgrade from a very old SMF 1.115 to the latest, followed the upgrade procedure, when trying to access the upgraded.php for the first time get: Fatal error: Function name must be a string in /upgrade.php on line 859

Line 859 is a "perfect string":
   // Load the modSettings data...
      $request = $smcFunc['db_query']('', '

Please help.

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 8,328
  • Riding the endless highway in the sky.
Re: Fatal error: Function name must be a string
« Reply #1 on: December 13, 2017, 11:51:38 AM »
Are you trying to upgrade directly from 1.1.15 to 2.0.15?  Which version of php is your server running?

Offline serge06

  • Semi-Newbie
  • *
  • Posts: 33
Re: Fatal error: Function name must be a string
« Reply #2 on: December 13, 2017, 12:55:41 PM »
Yes,
PHP Version   5.6.24

Online Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 57,225
  • Gender: Male
    • Kindred-999 on GitHub
Re: Fatal error: Function name must be a string
« Reply #3 on: December 13, 2017, 01:01:48 PM »
are you sure?  The error suggests otherwise.
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline serge06

  • Semi-Newbie
  • *
  • Posts: 33
Re: Fatal error: Function name must be a string
« Reply #4 on: December 13, 2017, 03:14:26 PM »
Yes, here's the copy from cpanel server info:

Apache Version   2.4.18
PHP Version   5.6.24
MySQL Version   10.1.29-MariaDB
Architecture   x86_64
Operating System   linux

What is the requirement?

Offline Illori

  • Project Manager
  • SMF Master
  • *
  • Posts: 49,983
Re: Fatal error: Function name must be a string
« Reply #5 on: December 13, 2017, 03:19:41 PM »
5.4 is the minimum currently. can you run a phpinfo page and verify that is what is actually being run on the server?

Offline serge06

  • Semi-Newbie
  • *
  • Posts: 33
Re: Fatal error: Function name must be a string
« Reply #6 on: December 13, 2017, 08:22:03 PM »
You guys were correct, even though PHP  version was appearing higher, it was actually below version 5.4 for this site on a shared host. I am now able to access the upgrade.php but get 530 Login authentication failed no matter what I try. I was definitely entering the correct credentials for the forum admin, then disabled the $disable_security = 1; Yet, I still get the same 530 Login authentication failed even after trying another browser, when accessing the upgrade.php

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 8,328
  • Riding the endless highway in the sky.
Re: Fatal error: Function name must be a string
« Reply #7 on: December 13, 2017, 09:02:30 PM »
530 is a server error, who is your host?  Is there an .htaccess in your root?

Offline serge06

  • Semi-Newbie
  • *
  • Posts: 33
Re: Fatal error: Function name must be a string
« Reply #8 on: December 13, 2017, 09:55:13 PM »
Hostdime
There is a htaccess

# Custom Legacy PHP 5.4 handler placed by host
AddType application/x-httpd-php54 .php5 .php4 .php .php3 .php2 .phtml
suPHP_ConfigPath /usr/local/lib/php54.ini
# End Custom Legacy PHP 5.4 handler placed by host

I guess theses how they overrode so that just this directory uses the php 5.4--is this login to work?

The rest of my site is built with Joomla 1.5-- pretty old and requires older PHP but it's working just fine so we never had the need to upgrade it.

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 8,328
  • Riding the endless highway in the sky.
Re: Fatal error: Function name must be a string
« Reply #9 on: December 13, 2017, 10:07:21 PM »
Can you revert to 1.1.15 and get the forum running?

Offline serge06

  • Semi-Newbie
  • *
  • Posts: 33
Re: Fatal error: Function name must be a string
« Reply #10 on: December 13, 2017, 10:52:36 PM »
Yes

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 8,328
  • Riding the endless highway in the sky.
Re: Fatal error: Function name must be a string
« Reply #11 on: December 14, 2017, 03:23:54 PM »
Rename the .htaccess file .htaccess_sav, revert to 1.1.15, upgrade to 1.1.21, see if you can get it working there, then try upgrading to 2.0.15.  Run phpinfo (file attached) to confirm php version.

Offline serge06

  • Semi-Newbie
  • *
  • Posts: 33
Re: Fatal error: Function name must be a string
« Reply #12 on: December 14, 2017, 08:38:56 PM »
OK, I will try that--it is turning into a project. BTW, one of the reasons I am trying to upgrade is because the forum is overwhelmed with spammers, does the new version offer more controls over spammers?

Online Irisado

  • A Light in the Darkness
  • Doc Coordinator
  • SMF Hero
  • *
  • Posts: 9,646
  • Soñando debajo del arco iris
Re: Fatal error: Function name must be a string
« Reply #13 on: December 15, 2017, 05:54:59 AM »
Soñando con una playa donde brilla el sol, un arco iris ilumina el cielo, y el mar espejea iridescentemente

Offline serge06

  • Semi-Newbie
  • *
  • Posts: 33
Re: Fatal error: Function name must be a string
« Reply #14 on: December 15, 2017, 03:33:02 PM »
I could only upgrade to 1.1.21. Is there any way to add the custom questions during the new member registration, in this version?

Offline Illori

  • Project Manager
  • SMF Master
  • *
  • Posts: 49,983
Re: Fatal error: Function name must be a string
« Reply #15 on: December 15, 2017, 03:51:33 PM »
you really need to upgrade to SMF 2.0 as SMF 1.1 is no longer getting security patches.

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 8,328
  • Riding the endless highway in the sky.
Re: Fatal error: Function name must be a string
« Reply #16 on: December 15, 2017, 09:42:29 PM »
Want went wrong?

Offline serge06

  • Semi-Newbie
  • *
  • Posts: 33
Re: Fatal error: Function name must be a string
« Reply #17 on: December 17, 2017, 12:49:33 PM »
Sorry for the delay, I got another php error, so I gave up with upgrading to 2.0. I cleaned the forum from spam, assigned moderators, and it is all working with 1.1.21. It is not a super popular forum, for a local residential community of about 6000. I also have a forest theme and a couple of packages installed, that would probably not be available on the 2.0 forum.
One question though, where could I insert the social media share buttons ( I have the code) so that they appear within each new post? Would it be inside Post.php, and if so, what's the line that I am looking for? I realize it's a hack, but since I will not be upgrading the forum this will suffice. Thanks for all your help.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 69,458
    • StoryBB/StoryBB on GitHub
Re: Fatal error: Function name must be a string
« Reply #18 on: December 17, 2017, 03:42:00 PM »
There are known security holes in 1.1.x that will not be fixed as it is no longer maintained. I'd also be surprised if there are many mods that aren't available in a 2.0 version at this point. Fairly sure the Forest theme was updated.
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 Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 8,328
  • Riding the endless highway in the sky.
Re: Fatal error: Function name must be a string
« Reply #19 on: December 17, 2017, 10:00:24 PM »
If you remain at 1.1.21, you're going to have problems once your host upgrades your account beyond php 5.4 (per this).  You'll be logging tons of errors and things will start breaking.  If you can pm admin and ftp access I'll see if I can determine why upgrade fails.

If you want to add things to posts, it would be in Display.template.php.