News:

Join the Facebook Fan Page.

Main Menu

2.0.14 error

Started by Rogerd, May 15, 2017, 03:43:23 AM

Previous topic - Next topic

Rogerd

After patching from 2.0.13 to 2.0.14 I get this error  "Fatal error: Function name must be a string in /home/************/public_html/Sources/Load.php on line 142" my forum is now unusable, any help please.

Line 142:    $request = $smcFunc['db_query']('', '

PS:  I downloaded the patch from this site and uploaded using the package manager.

Arantor


Rogerd

Looking in phpmyadmin it says 5.6.30, sorry I'm hopeless at this stuff.

gorbi


Yarik1980

PHP Warning:  mysqli_select_db() expects parameter 1 to be mysqli, resource given in /Sources/Subs-Db-mysql.php on line 826
public function select($database, $connection = null)
{
global $db_connection;

==> return mysqli_select_db($connection === null ? $db_connection : $connection, $database);
}

vbgamer45

Quote from: Rogerd on May 15, 2017, 03:55:57 AM
Looking in phpmyadmin it says 5.6.30, sorry I'm hopeless at this stuff.
Please attach your Sources/Load.php file.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Rogerd

Here's my sources/load.php file, thank's

vbgamer45

Hmm file looks ok did you have any errors when installing the patch?

Do you know your php version along with if you mysqli installed or not?
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Rogerd

I've put this in the hands of the hosts as i've no idea what I'm doing, they have asked the following questions, could anyone please confirm using any of the following is ok: PHP 5.4 up to 7.0 or does the 1.0.14 definately need PHP version 7.0
Also is apache 2.4 compatible with my SMF website.

Below is how the host put the questions

"get it confirmed if your websites will be compatible with PHP version 5.4 and above
It appears your application required PHP 7.0 version. Can you please confirm the same ?
Please get it confirmed with your Developer if Apache version 2.4 does not create any compatibility issues with the websites."

   Many thank's in advance.

Illori

we do not require php 7. php 5.4.* should be fine.

Rogerd

#10
Quote from: Illori on May 15, 2017, 11:00:45 AM
we do not require php 7. php 5.4.* should be fine.

Thank's Illori, and would apache 2.4 be ok, and I take it if I upgraded to PHP 7.0 it wouldn't be a problem, thank's

What I'm trying to say is PHP 7.0 and apache 2.4 would be ok to use without problems.

gorbi

Quote from: Illori on May 15, 2017, 11:00:45 AM
we do not require php 7. php 5.4.* should be fine.
5.4 or 5.3?

sawz

Quote from: Illori on May 15, 2017, 11:00:45 AM
we do not require php 7. php 5.4.* should be fine.

how about 5.3? i experienced the same problem on an upgrade.
keep smiling, they'll always wonder what your up too.....

nazerine

Quote from: Illori on May 15, 2017, 11:00:45 AM
we do not require php 7. php 5.4.* should be fine.

From my experience this morning, 5.3 is not compatible. Moving to 5.6 fixed error "./Sources/Load.php on line 142"

Now I encounter this error: "The database value you're trying to insert does not exist: theme_guests"

Rolled back to previous version of "./Sources/Load.php" and my forum is now loading again

vbgamer45

saws I would really recommend upgrading php version it is pretty easy for a hosting provider to do. 5.3 came out of service on 14 Aug 2014
Try to go up to 5.6 your forum will get speed improvements too the higher you go up in your php version
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Illori

the readme says SMF 2.0.14 requires php 5.3 or higher, it does not state which exactly version of php 5.3.

Arantor

Quote from: Illori on May 15, 2017, 11:17:07 AM
the readme says SMF 2.0.14 requires php 5.3 or higher, it does not state which exactly version of php 5.3.

5.3.0 through 5.3.29 are bug fixes, it shouldn't matter.

Saftek

Yeah, I upgraded to php 5.4 (from 5.3) and it appears to have resolved my issue.

vbgamer45

Good to know.  Now time to wonder what change caused that issue to work.

If one reads this upgrade up from PHP 5.3
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Saftek

Quote from: vbgamer45 on May 15, 2017, 12:10:24 PM
Good to know.  Now time to wonder what change caused that issue to work.

If one reads this upgrade up from PHP 5.3

don't know but that was the only change I made.

Rogerd

Quote from: Rogerd on May 15, 2017, 11:03:08 AM
Quote from: Illori on May 15, 2017, 11:00:45 AM
we do not require php 7. php 5.4.* should be fine.

Thank's Illori, and would apache 2.4 be ok, and I take it if I upgraded to PHP 7.0 it wouldn't be a problem, thank's

What I'm trying to say is PHP 7.0 and apache 2.4 would be ok to use without problems.

I got the host to upgrade to PHP 7.0 and apache 2.4 and all is now well, thank's for the help.

Yarik1980

Quote from: Yariksat on May 15, 2017, 04:57:16 AM
PHP Warning:  mysqli_select_db() expects parameter 1 to be mysqli, resource given in /Sources/Subs-Db-mysql.php on line 826
public function select($database, $connection = null)
{
global $db_connection;

==> return mysqli_select_db($connection === null ? $db_connection : $connection, $database);
}

I do not know if it's right.
public function select($database, $connection = null)
{
global $db_connection;

        mysqli_connect($db_server,$db_user,$db_passwd,$db_name);
return mysqli_select_db($connection === null ? $db_connection : $connection, $database);
}


Arantor

No, it isn't going to be right.

emanuele

Code (SMF 2.0.13) Select

'db_query' => 'smf_db_query',


Code (SMF 2.0.14) Select

'db_query'                  => array($this, 'query'),

an array is not a string?


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

Yarik1980

Quote from: Arantor on May 15, 2017, 12:44:18 PM
No, it isn't going to be right.
Yes, I already tried
I'm trying to find a solution

Arantor

Quotean array is not a string?

Indeed it is not, and some versions of PHP do not like that being passed in for a variable function.

What I don't get is why the contents of smf_db_query weren't replaced outright which would have avoided this change.

Yarik1980

Quote from: Yariksat on May 15, 2017, 04:57:16 AM
PHP Warning:  mysqli_select_db() expects parameter 1 to be mysqli, resource given in /Sources/Subs-Db-mysql.php on line 826
public function select($database, $connection = null)
{
global $db_connection;

==> return mysqli_select_db($connection === null ? $db_connection : $connection, $database);
}

I disabled the output of errors in this file because they really annoy
I will wait for the decision of this error

bob42

Similar issue and similar solution using IIS 7.0.  Moved from PHP 5.3  to PHP 5.4 and our forum stated working again.   

vbgamer45

I would try to go 5.6 bob if you can if you nothing other than SMF.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

4Kstore

I have the same error.

[15-May-2017 17:21:10 America/New_York] PHP Fatal error:  Function name must be a string in /home/X/Sources/Load.php on line 133

PHP Version 5.3.29




¡¡NEW MOD: Sparkles User Names!!!

Arantor

You really should update to something that isn't several years out of date.

4Kstore

Sure, in the meanwhile I just rolled back all changes in Subs-Db-mysql.php and then I uninstalled the 2.0.14 update.

¡¡NEW MOD: Sparkles User Names!!!

jmille44

Same problem here:  Fatal error: Function name must be a string in ............Sources\Load.php on line 142

Any ideas on how to fix this without upgrading PHP?

How do you upgrade PHP from 5.3 to 5.4 on Windows Server 2003 Enterprise Edition?

Thanks for any help on this.

vbgamer45

Get 5.6 http://windows.php.net/download/  Install the runtimes in the sidebar based on the VC version used for PHP
Make sure you get thread safe for windows IIS 6.0
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

jmille44

Does the above apply for Apache?

vbgamer45

Quote from: jmille44 on May 15, 2017, 10:41:27 PM
Does the above apply for Apache?
I have done both For apache on windows you can go two ways either fastcgi or the module based. I prefer to go the fast cgi route vs the module.  If doing fast cgi you want thread safely off. If module for apache then thread safely is on.  If you are on windows 2003 make sure you have all the windows updates asap. There is nasty worm going around. Microsoft did release a patch.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Advertisement: