Announcement

#1 2024-02-29 02:25:47

shami
Member
Dubai
2016-06-28
15

error message when i open any gallery

Hello/Hi/Greetings,

when i open gallery photos, this fatal error shows. plz help to resolve this. Thanks

Fatal error: Uncaught mysqli_sql_exception: 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 'ASC' at line 7 in /home/bestphot/public_html/include/dblayer/functions_mysqli.inc.php:132 Stack trace: #0

(Piwigo 14.2.0 Check for upgrade
Installed on 30 November -0001, 2024 years 2 months 4 weeks 1 day ago
Operating system: Linux
PHP: 8.1.27 (Show info) [2024-02-29 05:24:11]
MySQL: 8.0.36-cll-lve [2024-02-28 20:24:11]
Graphics Library: GD bundled (2.1.0 compatible)
Cache size 0 Mo   calculated 1 hour ago Refresh)

Piwigo URL: https://bestphotographer.ae

Offline

 

#2 2024-02-29 07:56:11

ddtddt
Piwigo Team
Quetigny - France
2007-07-27
7215

Re: error message when i open any gallery

Hi :-)


I don't see this error

Only for admin error message ?


You love Piwigo so don't hesitate to participate, learn more on the "Contribute to Piwigo" page. If you don't have much time for contribution, you can also help the project with a donation.

Offline

 

#3 2024-02-29 11:53:45

erAck
Only trying to help
2015-09-06
2075

Re: error message when i open any gallery

Unfortunately you omitted part of the error message that states the actual SQL query that fails. The "syntax to use near 'ASC'" though tells it is some sort order related so I presume it might be the dreaded "rank" vs "`rank`" problem mentioned several times in the forum. However, please provide the full message including the failing SQL statement.


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

Offline

 

#4 2024-02-29 12:34:49

shami
Member
Dubai
2016-06-28
15

Re: error message when i open any gallery

Fatal error: Uncaught mysqli_sql_exception: 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 'ASC' at line 7 in /home/bestphot/public_html/include/dblayer/functions_mysqli.inc.php:132 Stack trace: #0 /home/bestphot/public_html/include/dblayer/functions_mysqli.inc.php(132): mysqli->query('\nSELECT DISTINC...') #1 /home/bestphot/public_html/include/dblayer/functions_mysqli.inc.php(888): pwg_query('\nSELECT DISTINC...') #2 /home/bestphot/public_html/include/section_init.inc.php(317): query2array('\nSELECT DISTINC...', NULL, 'image_id') #3 /home/bestphot/public_html/index.php(12): include('/home/bestphot/...') #4 {main} thrown in /home/bestphot/public_html/include/dblayer/functions_mysqli.inc.php on line 132

Offline

 

#5 2024-02-29 12:37:30

shami
Member
Dubai
2016-06-28
15

Re: error message when i open any gallery

It is not admin error. This error on most of gallery categories. While few are working fine.

Offline

 

#7 2024-02-29 18:39:06

erAck
Only trying to help
2015-09-06
2075

Re: error message when i open any gallery

Odd that the actual SQL query is not partially output in the message. Anyway, are those albums sorted by ranking? Then switch them to any other sorting order and then back to ranking.
See also [Forum, topic 33397] Piwigo 2.8.2 database error and many others.


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

Offline

 

#8 2024-03-01 01:00:47

shami
Member
Dubai
2016-06-28
15

Re: error message when i open any gallery

Thanks for your kind reply
@erAck
@OHappyDay
@ddtddt

Actually I am not much familiar with coding and database. But from all your discussions , I conclude there may b something wrong with apparent setting of the galleries, like some title missing or some record missing. So I just swapped the sorting order of pictures in each gallery and submit , the problem is resolved.

Thank you guys :)

Offline

 

#9 2024-05-17 17:16:26

dewluca
Member
2015-05-26
13

Re: error message when i open any gallery

I was having a similar problem.  I discovered the problem was with albums that had a manual sort. (Unfortunately this is most of my albums :()
After trying some other sort options, I discovered that all I needed to do to fix the problem was go into the album's Photos sort order, and just hit Submit at the top by the manual sort pictures.
Apparently this resubmitted my original manually chosen sort order and in doing so fixed whatever was off in the sql.

I hope this might help other folks.

And thanks for the above replies that got me this far!

BTW, my original fatal error message was:
Fatal error: Uncaught mysqli_sql_exception: 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 'ASC' at line 7 in /home/ladewitt/natomabaycve62.org/photogallery/include/dblayer/functions_mysqli.inc.php:132 Stack trace: #0 /home/ladewitt/natomabaycve62.org/photogallery/include/dblayer/functions_mysqli.inc.php(132): mysqli->query('\nSELECT DISTINC...') #1 /home/ladewitt/natomabaycve62.org/photogallery/include/dblayer/functions_mysqli.inc.php(888): pwg_query('\nSELECT DISTINC...') #2 /home/ladewitt/natomabaycve62.org/photogallery/include/section_init.inc.php(317): query2array('\nSELECT DISTINC...', NULL, 'image_id') #3 /home/ladewitt/natomabaycve62.org/photogallery/index.php(12): include('/home/ladewitt/...') #4 {main} thrown in /home/ladewitt/natomabaycve62.org/photogallery/include/dblayer/functions_mysqli.inc.php on line 132

(If there was more to the error message I can't see it . . . but since the above seems to fix things, I'll be working on the fix rather than trying to recreate the errors :)

Offline

 

Board footer

Powered by FluxBB

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