Hello/Hi/Greetings,
I have a local installation of piwigo. When I try to download pictures from it, they are corrupted because they have an sql error message at the beginning of the jpg file.
The error is:
<pre><br />
<b>Warning</b>: [mysql error 1048] Column 'section' cannot be null
INSERT INTO piwigo_history
(
date,
time,
user_id,
IP,
section,
category_id,
image_id,
image_type,
format_id,
auth_key_id,
tag_ids
)
VALUES
(
CURRENT_DATE,
CURRENT_TIME,
2,
'192.168.1.11',
NULL,
NULL,
618,
'high',
NULL,
NULL,
NULL
)
; in <b>/var/www/douglassfamily/piwigo/include/dblayer/functions_mysqli.inc.php</b> on line <b>845</b><br />
Piwigo version: 2.9.5
PHP version: PHP 7.2.19-0ubuntu0.19.04.2 (cli) (built: Aug 13 2019 11:45:23) ( NTS )
MySQL version: mysql Ver 14.14 Distrib 5.7.27, for Linux (x86_64) using EditLine wrapper
Piwigo URL: http://douglassfamily.org/piwigo
Offline
Seriously? No one can help with this? Not even to suggest debugging steps?
Offline
Maybe because nobody can reproduce?
Downloaded an image from http://douglassfamily.org/piwigo/pictur … ategory/20 and it comes perfectly fine as a valid JPEG file. Check if and how your local installation differs, i.e. Piwigo version, database used, plugins installed.
The only inserting command to the ..._history table is INSERT INTO '.$opt{prefix}.'history I find in Piwigo core source is in tools/fill_history.pl which in this case doesn't make much sense to me.
If you want to debug start at the indicated place in include/dblayer/functions_mysqli.inc.php line 845 and find out from where the SQL error is trapped.
Offline
Thank you for noticing! After a week with no responses I finally deleted and rebuilt my installation to get it to work.
Offline