<?xml version="1.0"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>CRIN Trac: Ticket #93: Piwik 2.17.1</title>
    <link>https://trac.crin.org/trac/ticket/93</link>
    <description>&lt;p&gt;
Not urgent, no security updates, see &lt;a class="ext-link" href="https://piwik.org/changelog/piwik-2-17-1/"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;https://piwik.org/changelog/piwik-2-17-1/&lt;/a&gt;
&lt;/p&gt;
</description>
    <language>en-us</language>
    <image>
      <title>CRIN Trac</title>
      <url>https://trac.crin.org/trac/chrome/site/logo.gif</url>
      <link>https://trac.crin.org/trac/ticket/93</link>
    </image>
    <generator>Trac 1.0.2</generator>
    <item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Wed, 14 Dec 2016 11:59:56 GMT</pubDate>
      <title>hours changed; totalhours set</title>
      <link>https://trac.crin.org/trac/ticket/93#comment:1</link>
      <guid isPermaLink="false">https://trac.crin.org/trac/ticket/93#comment:1</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;hours&lt;/strong&gt;
                changed from &lt;em&gt;0&lt;/em&gt; to &lt;em&gt;0.75&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;totalhours&lt;/strong&gt;
                set to &lt;em&gt;0.75&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
Following the notes at &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Piwik#Upgrades"&gt;Piwik#Upgrades&lt;/a&gt;:
&lt;/p&gt;
&lt;pre class="wiki"&gt;sudo -i
cd /var/www
vi piwik/config/config.ini.php
export PIWIK="2.13.0"
wget "https://builds.piwik.org/piwik-$PIWIK.tar.gz"
wget "https://builds.piwik.org/piwik-$PIWIK.tar.gz.asc"
gpg --verify piwik-$PIWIK.tar.gz.asc
cp piwik/config/config.ini.php .
tar -zxvf piwik-$PIWIK.tar.gz
cp config.ini.php piwik/config/
chown -R piwik:piwik /var/www/piwik/
php /var/www/piwik/console core:update
vi piwik/config/config.ini.php
&lt;/pre&gt;&lt;p&gt;
Checking the web interface there was this issue:
&lt;/p&gt;
&lt;blockquote class="citation"&gt;
&lt;blockquote&gt;
&lt;p&gt;
LOAD DATA INFILE
&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;
Using LOAD DATA INFILE will greatly speed Piwik's archiving process up. To make it available to Piwik, try updating your PHP &amp;amp; MySQL software and make sure your database user has the FILE privilege.
If your Piwik server tracks high traffic websites (eg. &amp;gt; 100,000 pages per month), we recommend to try fix this problem.
Error: LOAD DATA INFILE failed... Error was:
Try &lt;a class="closed ticket" href="https://trac.crin.org/trac/ticket/1" title="task: Trac initial install and configuration (closed: fixed)"&gt;#1&lt;/a&gt;: LOAD DATA INFILE : SQLSTATE[HY000]: General error: 1290 The MySQL server is running with the --secure-file-priv option so it cannot execute this statement
Troubleshooting: &lt;a class="ext-link" href="https://stats.crin.org/index.php?module=Proxy&amp;amp;action=redirect&amp;amp;url=http://piwik.org/faq/troubleshooting/%23faq_194"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;FAQ on piwik.org&lt;/a&gt;
&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;
There isn't a perms issue, Apache runs as &lt;tt&gt;piwik&lt;/tt&gt; and we have:
&lt;/p&gt;
&lt;pre class="wiki"&gt;ls -lah piwik/tmp/ | grep assets
drwxr-xr-x  2 piwik piwik 4.0K Dec 14 11:34 assets
&lt;/pre&gt;&lt;p&gt;
The MySQL command was run:
&lt;/p&gt;
&lt;pre class="wiki"&gt;mysql
mysql&amp;gt; GRANT FILE on *.* to "piwik@localhost";
Query OK, 0 rows affected (0.00 sec)
mysql&amp;gt; FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.17 sec)
&lt;/pre&gt;&lt;p&gt;
But that didn't help so these config options were added to &lt;tt&gt;/etc/mysql/my.cnf&lt;/tt&gt;:
&lt;/p&gt;
&lt;pre class="wiki"&gt;[mysqld]
local-infile    = 1
[mysql]
local-infile    = 1
&lt;/pre&gt;&lt;p&gt;
And MySQL was restarted, but that didn't solve it, the next suggestion, adding the following to &lt;tt&gt;piwik/config/config.ini.php&lt;/tt&gt;:
&lt;/p&gt;
&lt;pre class="wiki"&gt;adapter = MYSQLI
&lt;/pre&gt;&lt;p&gt;
Resulted in this error:
&lt;/p&gt;
&lt;blockquote class="citation"&gt;
&lt;p&gt;
Error: Mysqli prepare error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'option
(option_name,option_value)
VALUES (?,?)' at line 1
&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;
In terms of the PHP settings in the &lt;tt&gt;/etc/apache2/sites-enabled/10-piwik.conf&lt;/tt&gt; file we have:
&lt;/p&gt;
&lt;pre class="wiki"&gt;        &amp;lt;IfModule mod_php5.c&amp;gt;
                php_admin_value open_basedir /var/www/piwik
                php_admin_value upload_tmp_dir /var/www/piwik/tmp
                php_admin_value session.save_path /var/www/piwik/tmp
                php_admin_value file_uploads 1
                php_admin_value geoip.custom_directory /var/www/piwik/misc
        &amp;lt;/IfModule&amp;gt;
&lt;/pre&gt;&lt;p&gt;
And I don't think these should be changed, the other suggestion:
&lt;/p&gt;
&lt;blockquote class="citation"&gt;
&lt;p&gt;
on Ubuntu / Debian servers, you may try to uninstall &lt;tt&gt;php5-mysql&lt;/tt&gt; package and install instead php5-mysqlnd: &lt;tt&gt;sudo apt-get install php5-mysqlnd&lt;/tt&gt;
&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;
Isn't really something I want to do during the day as this is a production server, so I think I'll look at this again one evening and in the mean time this has been added to &lt;tt&gt;/etc/mysql/my.cnf&lt;/tt&gt;:
&lt;/p&gt;
&lt;pre class="wiki"&gt;[general]
enable_load_data_infile =       0
&lt;/pre&gt;
      </description>
      <category>Ticket</category>
    </item>
 </channel>
</rss>