News:

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

Main Menu

2.0.14 error

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

Previous topic - Next topic

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: