SMF 2.0.11 and php 7

Started by spiros, October 28, 2015, 09:45:20 AM

Previous topic - Next topic

spiros

Has anyone tested SMF 2.0.11 with php 7?

Illori

i really doubt it. i bet SMF 2.0 does not work well with it out of the box since it does not come with mysqli support.

Kindred

it was checked by one person that I know of...   and - as noted, has issues.

It is unlikely that 2.0.x will support php7 any time soon (if ever)
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

spiros

Would the same go for SMF 2.1?

Illori

SMF 2.1 does support mysqli, but there have not been detailed tests on php 7 to know how much does or does not work.

margarett

Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Roph

PHP 7.0.0 dropped today, hold off upgrading then? :)

vbgamer45

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

MatrixCrawler

I just tested it with SMF 2.0.11 and db_type mysqli in settings.php

this is the server-error i get
mod_fcgid: stderr: PHP Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /[...]/Sources/Subs-Db-mysql.php:58, referer: https://www.mydomain.de/index.php [nofollow]

mysql_connect was deprecated in php5.5 and removed in php7 (see http://php.net/manual/en/function.mysql-connect.php [nofollow])

So no PHP7 Support in SMF 2.0.x


MatrixCrawler

God dammit i should read thoroughly and drink more coffee in the afternoon.

nevermind.

Steve

Easy on the language please. It's a family friendly place here. ;) :)
DO NOT pm me for support!

CaptainKirk


Actually, no it doesn't help at all because of the differences in mysql and mysqli calling formats as well as specific references to mysql throughout.

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

AndrzejL

Arch Linux added php 7.0 as a default php in their repos today. I bit the bullet. Part of the services went down. Piwigo / SMF (with the error mentioned above) and few others.

Downgraded to previous version of the php-* packages, added php-* to the ignorepkg list for now. Installed the mysqli mod and changed Settings.php as mentioned above, restarted the mysqld, php-fpm and nginx. Everything is back up. At least next time I will upgrade the php-* packages I will be able to test the mysqli mod at work.

Cheers.

Andrzej

Antes

Mods can be incompatible with PHP7 but after adding MySQLi mod core forum working pretty well.

Daniel15

SMF should really be upgraded to use PDO, or at least MySQLi. The old MySQL extension has been deprecated for many many years now... MySQLi was released in 2004 and PDO was released in 2005. There's no reason to continue using the old extension. The entire database abstraction layer in SMF should probably be replaced with PDO at some point.

For now I'm running both PHP 5 and PHP 7 on my server. I've moved most sites over to PHP 7, but legacy software such as SMF is currently still on PHP 5.
Daniel15, former Customisation team member, resigned due to lack of time. I still love everyone here :D.
Go to smfshop.com for SMFshop support, do NOT email or PM me!

Kindred

smf 2.1 will work just fine with php7 and mySQLi commands
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Suki

Quote from: Daniel15 on January 19, 2016, 01:30:40 AM
SMF should really be upgraded to use PDO, or at least MySQLi. The old MySQL extension has been deprecated for many many years now... MySQLi was released in 2004 and PDO was released in 2005. There's no reason to continue using the old extension. The entire database abstraction layer in SMF should probably be replaced with PDO at some point.

For now I'm running both PHP 5 and PHP 7 on my server. I've moved most sites over to PHP 7, but legacy software such as SMF is currently still on PHP 5.

I'm glad that you are already running php7, however please do note that not everyone (and by everyone I mean Linux distros and big hosting companies) is a fan of running the shiniest php versions out there (even if they are already marked as stable) come on! you should know this.

Making SMF 2.0.x compatible with PHP7 isn't as easy as you think it is, we still support pretty old PHP versions (and yes, people STILL use PHP 4). We just can't happily jump into the php7 wagon without making sure everyone will still be able to use SMF on whatever server configurations we told them SMF can work on.

SMF 2.1 is already using mysqli and it will be compatible with PHP7  the reason behind not going with PDO is simple, compatibility with SMF 2.0.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Daniel15

Quoteand yes, people STILL use PHP 4
Is it worth keeping the legacy code  just for the very very few people that use PHP 4 though? I used to be on the customization team and work on the SMF code a lot (around the days of SMF 1.0 and 1.1 Beta) and there's a huge amount of technical debt in the older SMF code. It's baggage that doesn't belong in a modern application. PHP 4 is long gone now. In fact anything older than PHP 5.5 is not even supported by the PHP project any more. At some point you need to let go of the past and move on :)

Quoteplease do note that not everyone (and by everyone I mean Linux distros and big hosting companies) is a fan of running the shiniest php versions out there

Lots of people are upgrading to PHP 7, almost all major frameworks and quite a few major applications run out-of-the-box. All of the things that were removed in PHP 7 have been obsolete/deprecated for many years now, and any code that has been actively maintained during that time runs fine on PHP 7 with no modifications. None of it should be a surprise :) Examples include the POSIX regex functions (ereg) which have been deprecated since PHP 5.3 (2009), and the old MySQL extension which has been deprecated since the release of MySQLi with MySQL 4.1 (2004) and PDO (2005). People aren't going to hold off upgrading just because SMF doesn't support it, especially when all other software on their server runs on PHP 7 with no issues.

Back in the SMF 1.0 era it made sense to use PHP 4 compatible code, but today I doubt you'll find anyone in the wild still running PHP 4.
Daniel15, former Customisation team member, resigned due to lack of time. I still love everyone here :D.
Go to smfshop.com for SMFshop support, do NOT email or PM me!

Advertisement: