Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

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

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,447
Website GitHub

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

Online

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

hilaryaq
Plugin Author
Registered: 2006-08-20
Posts: 335
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: 335
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: 335
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
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,259
GitHub

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
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,259
GitHub

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: 335
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: 335
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

#21 2019-11-06 17:59:56

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,726
Website

Re: Request for testers: PHP 7.3 compatibility

Do you perhaps have anything like AddHandler in your .htaccess file of the site that might be switching back to an earlier version of php even though something else is set in your host?


TXP Builders – finely-crafted code, design and txp

Offline

#22 2019-11-06 18:09:09

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

Re: Request for testers: PHP 7.3 compatibility

jakob wrote #319965:

Do you perhaps have anything like AddHandler in your .htaccess file of the site that might be switching back to an earlier version of php even though something else is set in your host?

The way the handler works it just edits the htaccess itself, so once I see the error I know php7.3 is enabled, when I switch back to 7.2 using the handler it’s perfect again..


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

Offline

#23 2019-11-06 20:03:19

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

Re: Request for testers: PHP 7.3 compatibility

It is something on the hosting side they are fixing something now, if anyone else gets an issue like this and is dealing with a hosting company, I found the below code so handy to replicate the problem for them, create a new empty database with user (full permissions), then create a test php page to do a simple connection. If they have mis-configured 7.3 they will see ‘Connected’ under 7.2, and after switching to 7.3 the error will display.

<?php
$mysqli_connection = new MySQLi('localhost', 'user', 'password', 'database');
if ($mysqli_connection->connect_error) {
   echo "Not connected, error: " . $mysqli_connection->connect_error;
}
else {
   echo "Connected.";
}
?>

Thanks for the replies all :)


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

Offline

#24 2019-11-07 10:57:32

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

Re: Request for testers: PHP 7.3 compatibility

It works! I don’t know why but somehow when they switched to 7.3 it worked but when I did it didn’t, after clearing caches etc. So yay for hosting that works eventually :D


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

Offline

Board footer

Powered by FluxBB