Textpattern CMS support forum

You are not logged in. Register | Login | Help

#11 2019-11-06 15:24:47

hilaryaq
Plugin Author
Registered: 2006-08-20
Posts: 209
Website

Re: Request for testers: PHP 7.3 compatibility

Hi guys I have found an incompatibility with php 7.3 on a live site, it works with 7.2 with no issues. Upgrade to Txp 4.7.3 that I tested, errors below just removed the domain info, fatal error just gives error and white page:

Warning: Use of undefined constant MYSQLI_CLIENT_FOUND_ROWS – assumed ‘MYSQLI_CLIENT_FOUND_ROWS’ (this will throw an Error in a future version of PHP) in /home/user/public_html/textpattern/lib/txplib_db.php on line 194

Fatal error: Uncaught Error: Call to undefined function mysqli_init() in /home/user/public_html/textpattern/lib/txplib_db.php:201 Stack trace: #0 /home/user/public_html/textpattern/lib/txplib_db.php(245): DB->__construct() #1 /home/user/public_html/textpattern/publish.php(45): include_once(‘/home/user/…’) #2 /home/user/public_html/index.php(107): include(‘/home/user/…’) #3 {main} thrown in /home/user/public_html/textpattern/lib/txplib_db.php on line 201


…………………
I <3 txp
…………………

Offline

#12 2019-11-06 15:31:32

gaekwad
Admin
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 2,633

Re: Request for testers: PHP 7.3 compatibility

hilaryaq wrote #319953:

Fatal error: Uncaught Error: Call to undefined function mysqli_init() in

[…]

My money is on mysqli (required) being disabled / not present.

If you call phpinfo(), does mysqli show itself? Make a file called hilaryiscool.php, upload to site, view in browser:

<?php phpinfo(); ?>

Last edited by gaekwad (2019-11-06 15:33:27)

Offline

#13 2019-11-06 16:11:02

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,842
Website

Re: Request for testers: PHP 7.3 compatibility

First time I’ve heard of mysqli being disabled or missing, but as it’s an extension, there’s very little we can do in Txp (besides put defensive conditionals around every DB call in our library). But as it’s a required component for the CMS it seems overkill. No database driver = no database access = no website.

FWIW, even when we (eventually) move to PDO, that’s an extension as well, so there’s still a slim chance some hosting environments might not have it available.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#14 2019-11-06 16:52:43

hilaryaq
Plugin Author
Registered: 2006-08-20
Posts: 209
Website

Re: Request for testers: PHP 7.3 compatibility

gaekwad wrote #319954:

My money is on mysqli (required) being disabled / not present.

If you call phpinfo(), does mysqli show itself? Make a file called hilaryiscool.php, upload to site, view in browser:

<?php phpinfo(); ?>...

I’m cool yay! :D

Looks like it is there, details from info page below:

mysqli
MysqlI Support enabled
Client API library version mysqlnd 5.0.11-dev – 20120503 – $Id: 76b08b24596e12d4553bd41fc93cccd5bac2fe7a $
Active Persistent Links 0
Inactive Persistent Links 0
Active Links 0
Directive Local Value Master Value
mysqli.allow_local_infile On On
mysqli.allow_persistent On On
mysqli.default_host no value no value
mysqli.default_port 3306 3306
mysqli.default_pw no value no value
mysqli.default_socket /var/lib/mysql/mysql.sock /var/lib/mysql/mysql.sock
mysqli.default_user no value no value
mysqli.max_links Unlimited Unlimited
mysqli.max_persistent Unlimited Unlimited
mysqli.reconnect Off Off
mysqli.rollback_on_cached_plink Off Off


…………………
I <3 txp
…………………

Offline

#15 2019-11-06 17:04:47

hilaryaq
Plugin Author
Registered: 2006-08-20
Posts: 209
Website

Re: Request for testers: PHP 7.3 compatibility

No wait, I haven’t tested this but realised I’m an idiot as there’s a php.ini file in there that’s possibly misconfigured, I’ll report back.


…………………
I <3 txp
…………………

Offline

#16 2019-11-06 17:35:42

hilaryaq
Plugin Author
Registered: 2006-08-20
Posts: 209
Website

Re: Request for testers: PHP 7.3 compatibility

Nope.. so mysqli is enabled, with normal php.ini it breaks on php7.3, with extension=mysqli.so inserted (redundant since it’s on but worth a try), it still breaks..

I’ll send it onto my hosting company and see if they have any insight..

Errors from another site below:

Warning: Use of undefined constant JSON_UNESCAPED_UNICODE – assumed ‘JSON_UNESCAPED_UNICODE’ (this will throw an Error in a future version of PHP) in /home/user/public_html/textpattern/lib/constants.php on line 922

Warning: Use of undefined constant JSON_UNESCAPED_SLASHES – assumed ‘JSON_UNESCAPED_SLASHES’ (this will throw an Error in a future version of PHP) in /home/user/public_html/textpattern/lib/constants.php on line 922

Fatal error: Uncaught Error: Call to undefined function mysqli_init() in /home/user/public_html/textpattern/lib/txplib_db.php:201 Stack trace: #0 /home/user/public_html/textpattern/lib/txplib_db.php(245): DB->__construct() #1 /home/user/public_html/textpattern/publish.php(45): include_once(‘/home/user/…’) #2 /home/user/public_html/index.php(107): include(‘/home/user/…’) #3 {main} thrown in /home/user/public_html/textpattern/lib/txplib_db.php on line 201

Last edited by hilaryaq (2019-11-06 17:39:36)


…………………
I <3 txp
…………………

Offline

#17 2019-11-06 17:39:46

gaekwad
Admin
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 2,633

Re: Request for testers: PHP 7.3 compatibility

I’ll bite – what’s in php.ini locally? Does it work without the php.ini in place?

Offline

#18 2019-11-06 17:41:04

gaekwad
Admin
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 2,633

Re: Request for testers: PHP 7.3 compatibility

Similar error here – double check PHP versions.

Offline

#19 2019-11-06 17:46:21

hilaryaq
Plugin Author
Registered: 2006-08-20
Posts: 209
Website

Re: Request for testers: PHP 7.3 compatibility

gaekwad wrote #319961:

Similar error here – double check PHP versions.

I’m using the multi-site php feature so it seems pretty instant when it’s clicked in, not sure what that second setting is.. I know this must be a hosting setting as it works on my local server which is 7.3.10

uughhhh


…………………
I <3 txp
…………………

Offline

#20 2019-11-06 17:57:20

hilaryaq
Plugin Author
Registered: 2006-08-20
Posts: 209
Website

Re: Request for testers: PHP 7.3 compatibility

gaekwad wrote #319960:

I’ll bite – what’s in php.ini locally? Does it work without the php.ini in place?

Same error with no php.ini


…………………
I <3 txp
…………………

Offline

Board footer

Powered by FluxBB