[CWB] Is someone else running cqpweb under Ubuntu 18.04 LTS?

Hardie, Andrew a.hardie at lancaster.ac.uk
Tue Apr 30 15:07:38 CEST 2019


Aha - on that PHP documentation page, it says 

>> mysqli.allow_local_infile	"0"	PHP_INI_SYSTEM Available since PHP 5.2.4. Before PHP 7.2.16 and 7.3.3 the default was "1".

And here,

http://changelogs.ubuntu.com/changelogs/pool/main/p/php7.2/php7.2_7.2.17-0ubuntu0.18.04.1/changelog

it shows that the Ubuntu PHP package went from PHP 7.2.15 to PHP 7.2.17 on 18th April. 

And as for the upstream source .... see here:

https://www.php.net/ChangeLog-7.php#7.2.16

=================================
MySQL:
Disabled LOCAL INFILE by default, can be enabled using php.ini directive mysqli.allow_local_infile for mysqli, or PDO::MYSQL_ATTR_LOCAL_INFILE attribute for pdo_mysql.
=================================

So that is the culprit. Well, culpritS: PHP for making this change with no fanfare, and Ubuntu for pushing it out with no fanfare to an LTS release (to be fair Debian-testing got it too a week earlier... but NOT Derbian-stable!!). 

There are, incidentally, 3 solutions - one is changing the setting & restarting Apache,  as Stefan says, the others are to tell CQPweb to avoid use of LOCAL INFILE by either ...

- setting $mysql_local_infile_disabled to true
- setting $mysql_has_file_access to true (if the preconditions are met, which they usually are)


I'll extend the docs suitably when I get a moment.

Andrew.


-----Original Message-----
From: cwb-bounces at sslmit.unibo.it <cwb-bounces at sslmit.unibo.it> On Behalf Of Stefan Evert
Sent: 30 April 2019 13:44
To: CWBdev Mailing List <cwb at sslmit.unibo.it>
Subject: Re: [CWB] Is someone else running cqpweb under Ubuntu 18.04 LTS?

TL;DR: Ubuntu sucks.

In the file

	/etc/php/7.2/apache2/php.ini

uncomment the setting for mysqli.allow_local_infile:

	; http://php.net/mysqli.allow_local_infile
	mysqli.allow_local_infile = On

I suspect that PHP's internal default has changed with the latest update, because I didn't need to set this before.

@Andrew: shouldn't hurt in older PHP versions, so you may want to add it to the admin manual.  Feel free to quote me on "Ubuntu sucks".

Best,
Stefan

_______________________________________________
CWB mailing list
CWB at sslmit.unibo.it
http://liste.sslmit.unibo.it/mailman/listinfo/cwb


More information about the CWB mailing list