Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: Testers needed: PHP 8 compatibility
Because the new 4.8.5 version seems to be imminent, here is the error messages I got after an upgrade to the dev version (https://github.com/textpattern/textpattern/tree/5b579f7aa1589b12573d542e44e30309ace8f42e) with PHP 8 on a server in production:
Fatal error: Uncaught Error: Undefined constant "MYSQLI_CLIENT_FOUND_ROWS" in /home/{hidden}/public_html/textpattern/lib/txplib_db.php:169 Stack trace: #0 /home/{hidden}/public_html/textpattern/lib/txplib_db.php(283): DB->__construct() #1 /home/{hidden}/public_html/textpattern/index.php(63): include('/home/{hidden}/...') #2 {main} thrown in /home/{hidden}/public_html/textpattern/lib/txplib_db.php on line 169
Patrick.
Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.
Offline
Re: Testers needed: PHP 8 compatibility
Pat64 wrote #327906:
Undefined constant “MYSQLI_CLIENT_FOUND_ROWS”
Weird. According to the docs on mysql_real_connect that constant is still valid as far as PHP 7 is concerned. No idea about PHP 8, but it’d be odd for them to axe it without at least mentioning it’s been deprecated in the PHP 7 docs.
What does your PHP info report? If you can’t get into Admin>Diagnostics>PHP Configuration then perhaps write an executable test file in the root of your server:
<?php
echo phpinfo();
and run that in your browser. Post anything relevant please (PM me if you don’t want to post it publicly). I’m just looking for anything mysqli-related that may indicate what’s going on here. Thanks.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Offline
Re: Testers needed: PHP 8 compatibility
Further reading: p319953
Could be a hosting-side issue based on that link above.
Offline
Re: Testers needed: PHP 8 compatibility
Nice catch thanks. I thought this smelled familiar.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Offline
Re: Testers needed: PHP 8 compatibility
Thank you Stef. E-mail send.
Patrick.
Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.
Offline
Re: Testers needed: PHP 8 compatibility
Follow-up. From the output of phpinfo() it appears mysqli is not installed on Pat64’s hosting instance. That would certainly knacker things up!
I wonder if this is commonplace on some hosts or if it’s the start of a general trend?
Last edited by Bloke (2020-12-31 12:48:48)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Offline
Re: Testers needed: PHP 8 compatibility
Assuming Diagnostics still shows in some capacity, perhaps 1309 might be worth further investigation. An upfront “system requirements check”, either as part of the pre-flight and/or included with the diagnostic info, with current status for each thing would be a sensible move.
Offline
Re: Testers needed: PHP 8 compatibility
gaekwad wrote #327932:
Assuming Diagnostics still shows in some capacity
Sadly it doesn’t. If mysqli isn’t installed, we can’t even make the connection to the database and it bails really ungracefully. Not really sure how to detect this, bar something called really really really high up in the stack to check system requirements: like maybe where we check the PHP version which I believe is in janitor(). Would have to check.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Offline
Re: Testers needed: PHP 8 compatibility
Bloke wrote #327933:
Sadly it doesn’t. If mysqli isn’t installed, we can’t even make the connection to the database.
Oh yeah, of course! Off to dunce jail for me.
Offline
Re: Testers needed: PHP 8 compatibility
I suspect Pat64’s host will have to recompile their PHP 8.0 as our friends at Wordpress need mysqli too (see make.wordpress.org/hosting/handbook/handbook/server-environment/#php-extensions) and if that doesn’t work, they have a way bigger issue. That said, Wordpress isn’t fully PHP 8.0-ready just yet, so not a deal breaker.
Offline
Re: Testers needed: PHP 8 compatibility
gaekwad wrote #327935:
I suspect Pat64’s host will have to recompile their PHP 8.0
What’s odd is that the cPanel has checkboxes for which extensions to load, and mysqli is ticked there. But somewhere along the line that’s not getting pushed to the actual LAMP stack in production. Might be as simple as it not restarting the deamon properly, or it could be affecting a different (non-production) php.ini or something is overriding the version in use.
Patrick’s doing some digging.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Offline
Re: Testers needed: PHP 8 compatibility
Pat64: is there a php.ini file in the root directory? If there is, can you post the contents here, please?
Offline