Member
Member
tw2003   2015-08-06, 11:42
#1

Hi,

I just did an upgrade and after finishing the setup I'm not able to see any images or subalbums within the main album. Debug.log notes the following error.

USER ERROR: MySQLi Error: ( SELECT * FROM `[prefix]imagesWHEREalbumid= 3 ORDER BY show ) failed. MySQLi returned the 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 'show' at line 1 in ...../paledog.de/www/zp-core/functions-db-MySQLi.php on line 78

trigger_error called from query (functions-db-MySQLi.php [78])

from AlbumBase->sortImageArray (class-album.php [1042])

from Album->getImages (class-album.php [1324])

from admin-edit.php [607]

Any idea what might have caused this? Actually i did not delete the zp-core folder but rather have overwritten it.

PHP version is 5.4.40
MySQLi version 5.5.38

Member
Member
tw2003   2015-08-06, 14:42
#2

The following function has been changed in functions-db-MySQLi.php for 1.4.9 (if that helps)

NEW:
function db_quote($string, $addquotes = true) {
global $_zp_DB_connection;
$escaped = $_zp_DB_connection->real_escape_string($string);
if ($addquotes) {
return "'" . $escaped . "'";
} else {
return $escaped;
}
}

OLD:
function db_quote($string) {
global $_zp_DB_connection;
return "'" . $_zp_DB_connection->real_escape_string($string) . "'";
}

I might try to use the old version of this file. However it works in my test environment with the new one. It appears that the MySQLi-version has to do something with it.
Test environment comes with 5.6.17

Administrator
Administrator
acrylian   2015-08-06, 16:00
#3

I believe that has been fixed in the support build.

Member
Member
tw2003   2015-08-07, 07:33
#4

Yes. It works now.

By the way, if you run the setup of the support build it complains about missing files:
themes/zenpage/contact_form
themes/zenpage/contact_form/form.php
themes/zenpage/test.php

This is not a problem for now but you might want to check it.

Administrator
Administrator
acrylian   2015-08-07, 08:23
#5

Thanks for the note. Accidentally test files sneaked into the file catalogue…

Junior Member
Junior Member
mr-gurke   2015-08-16, 18:39
#6

Hi Guys,

this already fixed bug took me some time to locate.

To upgrade my installation, I downloaded version 1.4.9 with the download link on the download page (https://github.com/zenphoto/zenphoto/archive/zenphoto-1.4.9.tar.gz) and got the buggy version. Downloading the zenphoto-master.zip worked

As this bug doesn't appear in any theme, only few installations might be affected.

Nevertheless updating the link/package would perserve other ones from struggeling with this issue too.

Regards
Markus

Administrator
Administrator
acrylian   2015-08-16, 18:49
#7

The bug actually only occurs on certain sorting settings which is why it took some time to reproduce it at all.

The link will be updated as soon as there is an official follow up release.

Member
Member
kalli   2015-09-21, 15:41
#8

Hello arylian,
i have the same problem.

USER ERROR: MySQLi Fehler: (SELECT folder, filename FROM [Vorsilbe]images, [Vorsilbe]albums WHERE [Vorsilbe]albums.folder!="" AND [Vorsilbe]images.albumid = [Vorsilbe]albums.id AND [Vorsilbe]albums.id IN) AND [Vorsilbe]images.show=1 ORDER BY RAND()) fehlgeschlagen. MySQLi gab den Fehler 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 ') AND _images.show=1 ORDER BY RAND()' at line 1 zurück in /mnt/webt/e3/26/56758126/htdocs/zp-core/functions-db-MySQLi.php in Zeile 78

trigger_error called from query (functions-db-MySQLi.php [78])

from getRandomImagesAlbum (template-functions.php [3332])

from printRandomImages (template-functions.php [3380])

from include (inc-sidebar.php [21])

from include (image.php [2])

from include (index.php [129])

from index.php [28]
happend, when i want go to the next site of the galery.
in adminmodus i have 12 album, official only 4

Administrator
Administrator
acrylian   2015-09-21, 17:52
#9

As mentioned it was fixed in the master already which is now the just released 1.4.10 update. Please try that.

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.