Announcement

#1 2019-06-08 17:33:47

laerpel
Member
Vienna
2019-06-04
4

My site is broken after transfer to new host

Hello!

I'm rather new to Piwigo, but I'm accustomed to CMS like Joomla, Wordpress and some more.

Recently I set up my own Website using Piwigo and everything worked fine. Some days ago I moved it to a new host (webgo.de) and my site is broken since then.

I followed these instructions to move my site: https://piwigo.org/forum/viewtopic.php?id=29175

Searching the forum I found out that there have been several problems with 'reserved name' and 'rank', but I could figure out a solution for my problem.

Any help is really appreciated!

Here are the details:

Server Environment
* Piwigo 2.9.5
* OS: Linux
* PHP: 7.1.26-2+0~20190216175340.13+stretch~1.gbpc20626 [2019-06-08 11:53:09]
* MySQL: 8.0.15 [2019-06-08 11:53:09]
* Graphics library: ImageMagick 6.9.7-4

URL https://baerbel.at/index.php (Please don't forget to include index.php at the end, otherwise you only see my "Under construction" message)

Warning:  [mysql error 1064] 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 '' at line 16

SELECT
    c.*,
    user_representative_picture_id,
    nb_images,
    date_last,
    max_date_last,
    count_images,
    nb_categories,
    count_categories
  FROM piwigo_categories c
    INNER JOIN piwigo_user_cache_categories ucc
    ON id = cat_id
    AND user_id = 1
  WHERE id_uppercat is NULL
     
  ORDER BY rank in /home/www/baerbel.at/include/dblayer/functions_mysqli.inc.php on line 845

Fatal error: Uncaught Error: Call to a member function fetch_assoc() on boolean in /home/www/baerbel.at/include/dblayer/functions_mysqli.inc.php:226 Stack trace: #0 /home/www/baerbel.at/include/category_cats.inc.php(76): pwg_db_fetch_assoc(false) #1 /home/www/baerbel.at/index.php(318): include('/home/www/baerb...') #2 {main} thrown in /home/www/baerbel.at/include/dblayer/functions_mysqli.inc.php on line 226

PHP Info
https://baerbel.at/phpinfo.php

Thank you!

Barbara (Bärbel)

Offline

 

#2 2019-06-08 19:27:18

erAck
Only trying to help
2015-09-06
1417

Re: My site is broken after transfer to new host

The problem is that rank is a reserved keyword in MySQL 8. Downgrade to MySQL 5.7 (and recreate the Piwigo database using that), otherwise you'll run into troubles left and right. See also [Forum, topic 28980] Error after upgrading to Fedora 29


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

Offline

 

#3 2019-06-09 00:14:34

laerpel
Member
Vienna
2019-06-04
4

Re: My site is broken after transfer to new host

Thank you erAck! I will try that!

Offline

 

#4 2019-06-09 16:39:57

laerpel
Member
Vienna
2019-06-04
4

Re: My site is broken after transfer to new host

So, that's it. My host does not support MySQL 5 anymore. Looks like I have to find another CMS.

When do the Piwigo developers intend to update the system to the newest version of MySQL or, even better, to MaiaDB?

Last edited by laerpel (2019-06-09 16:41:10)

Offline

 

#5 2019-06-09 17:47:56

erAck
Only trying to help
2015-09-06
1417

Re: My site is broken after transfer to new host

Odd, you're at webgo.de and so am I and I have MySQL 5.7, but maybe that's only available in the old cheapest legacy plans.. Anyway, MariaDB may work, see https://piwigo.org/doc/doku.php?id=user … all:before


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

Offline

 

#6 2019-06-09 18:48:40

laerpel
Member
Vienna
2019-06-04
4

Re: My site is broken after transfer to new host

erAck, you are a genius! :-D
With MariaDB it worked! I'm really happy! Thank you!

Offline

 

#7 2021-01-22 00:46:56

Humblewizard
Member
2019-02-09
8

Re: My site is broken after transfer to new host

I went through the source files and replaced rank with `rank` in all queries. There were 3 or 4 files that I found it. That fixed my issue with the MySQL 8 upgrade.


if ('recent_cats' != $page['section'])
{
    $query.= '
    ORDER BY `rank`';
}

Offline

 

Board footer

Powered by FluxBB

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