Announcement

#1 2019-09-08 19:26:09

SerialHobbyist
Member
2019-09-08
3

Photo Download Corrupt (sql error)

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

 

#2 2019-09-12 17:58:46

SerialHobbyist
Member
2019-09-08
3

Re: Photo Download Corrupt (sql error)

Seriously?  No one can help with this?  Not even to suggest debugging steps?

Offline

 

#3 2019-09-25 20:19:17

erAck
Only trying to help
2015-09-06
2031

Re: Photo Download Corrupt (sql error)

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.


Running Piwigo at https://erack.net/gallery/

Offline

 

#4 2019-09-25 21:13:52

SerialHobbyist
Member
2019-09-08
3

Re: Photo Download Corrupt (sql error)

Thank you for noticing!  After a week with no responses I finally deleted and rebuilt my installation to get it to work.

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact