I have a seemingly weird problem with the image gallery on my old Tiki 220.127.116.11. I am aware that I need to update this to a current level (and shift from image to file galleries), but I think it would be a good idea to ask for some advice from friendly users/admins/developers to find the right strategy:
a) Fix the DB problem and perform the upgrade
b) Upgrade first
c) Which path to upgrade:
c1) Upgrade directly to the current LTS or
c2) Upgrade in steps, and if so: Which versions?
c3) Migrate images from image gallery to file galery when?
Since I only admin this Tiki as a hobby, but am otherwise quite experienced in other IT areas, I would be very grateful for help from more experienced Tiki users/admins/developers. First, let me describe the problem (long!).
I started this Tiki with Polaris, upgraded to Sirius, and the last upgrade I installed was 18.104.22.168. With that upgrade, the image upload behaviour changed. Sometimes large images would not upload correctly. Back then I thought this would be due to the CPU time limitation that my ISP has on using PHP and MySQL, and that the new version would simply consume more CPU.
Now after running the Tiki for a couple of years I have to find that also some older images that had successfully uploaded became corrupted. There are entries in the image gallery that have no thumbnail and no image, and some do have a thumbnail, but no image behind that. The Tiki is set to store images in the DB.
When calling on a broken image, there is no error message, just the image (or the thumbnail) are missing in action. When calling the image by entering the URL I get a 500 Internal Server Error followed by a 404 for a missing error handler page. This happens both with calling by ID and with calling by image name.
A 500 is also thrown when hitting the edit image property link (tiki-edit_image.php).
When uploading images, there is a difference depending on whether I use the solitary entry field for uploading from disk, or one of the six that are grouped together. In the first case I get
In the second case I get a bogus success message, with no image in it, and an entry in the gallery with no thumbnail and no image.
When I navigate to the System Gallery and use the "All images" dialog, I get an unformatted text page with a drop down list. Selecting a gallery and hitting View results in
Warning: Cannot modify header information - headers already sent by (output started at account data deleted/htdocs/tiki/tiki-show_all_images.php:80) in account data deleted/htdocs/tiki/tiki-show_all_images.php on line 109
Warning: Cannot modify header information - headers already sent by (output started at account data deleted/htdocs/tiki/tiki-show_all_images.php:80) in account data deleted/htdocs/tiki/tiki-show_all_images.php on line 110
followed by pure binary data which might be the image, it contains the string JFIF...
Some gallerys however show something different with View. The show a formatted page that is prepended by a PHP error
Warning: mysql error: Duplicate entry '0-80-80-t' for key 1 in query:
insert into `tiki_images_data`(`imageId`,`xsize`,`ysize`,
in account data deleted/htdocs/tiki/lib/tikidblib.php on line 134
followed by a small table and another error message, this time by Tiki:
Fehler beim Zugriff auf die Datenbank! Error accessing the DB
insert into `tiki_images_data`(`imageId`,`xsize`,`ysize`, `type`,`filesize`,`filetype`,`filename`,`data`) values (?,?,?,?,?,?,?,?)
7 ....JFIF..>CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), default quality...binary stuff
Error Message Duplicate entry '0-80-80-t' for key 1
There are no other DB problems so far. The Tiki mostly contains lots and lots of very very long text pages, which are seemingly intact.
And just a little side-note: I could never activate the .htaccess file or implement the tip documented here on tiki.org to increase size limits in .htaccess to override php.ini when having upload problems. This always results in a completely disfunct Tiki that always throws 500s, so I left that out.
Again, thanks for anyone who took the time to read this lengthy problem description and who is kind enough to write me some remarks or even tips how to sort this out and help me upgrade to current LTS, if possible with a clean DB and all images of my users... I do have backups from the internal Tiki backup and from MySQL Admin and I found copies of the damaged images in Tikis temp directory, but users tell me these would not be the very latest versions of the images.