Upgrade caused error in index.php Upgrade caused error in index.php
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Upgrade caused error in index.php

Started by Bobbywires, January 22, 2019, 08:34:55 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Bobbywires

Jan 22, 2019 at 11:21 AM - While executing query 'SELECT aid, title, r.description, keyword, alb_hits, category, visibility, r.thumb, r.owner, depth AS level, lft, '0' AS pic_count
FROM categories AS c
INNER JOIN albums AS r ON r.category = c.cid
WHERE c.depth >= 0 + 1


ORDER BY ' in index.php on line 338 the following error was encountered:
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 7

I'm using: MySQL Version   5.6.42-84.2

code where error occured: 
    $sort_order = cpg_album_sort_order('r.');

    // collect album info and album counts
    $sql = "SELECT aid, title, r.description, keyword, alb_hits, category, visibility, r.thumb, r.owner, depth AS level, lft, '0' AS pic_count
        FROM {$CONFIG['TABLE_CATEGORIES']} AS c
        INNER JOIN {$CONFIG['TABLE_ALBUMS']} AS r ON r.category = c.cid
        WHERE c.depth >= $CURRENT_CAT_DEPTH + 1
        $forbidden_set
        $lft_rgt
        ORDER BY $sort_order";

phill104

It is probably theme or plugin related. A link to your site always helps diagnosis.
It is a mistake to think you can solve any major problems just with potatoes.

Bobbywires

Link is http://bobbywires.com/stockdale/
Not using any plugins or custom theme
After update I was logged in as admin not I can't log in at all


Bobbywires

So I cleared the install logs and ran cpg_installer_stub.php choosing fresh install in an other directory which failed. When trying to run the install the mysql option was not available only mysqli

ron4mac

You didn't fully complete the upgrade process. I was able to complete that for you. Your site seems to be functioning okay now.

Bobbywires

This morning 1/22/19 pst My site was not working and was displaying and error about "serious DB error".
I took the site back to the original 1.5.18 and set the PHP back to 5.6
I have until march of 2019 to figure this out.
How did you "complete the update"

Bobbywires

OK its now working
I created a duplicate directory for a test.
Recreated the the upgrade and it worked perfect.
Renamed the directories and all is good running php7.2
I think the problem was I tried to upgrade using the version in red at the bottom of the cpg_installer_stub.php (developers)
Thank you for the support