"Critical error, could not connet to database!" I have tired two different computer after upgraded 1520 to 1522.
Please check the details in your include/config.inc.php file are correct.
I have found them:
While executing query 'SELECT a.aid, a.title, a.description, a.thumb, a.keyword, category, visibility, filepath, filename, url_prefix, pwidth, pheight, a.owner FROM cpg15x_albums AS a LEFT JOIN cpg15x_pictures AS p ON a.thumb=p.pid WHERE a.category = 0 ORDER BY LIMIT 0,2' in index.php on line 795 the following error was encountered:
While executing query 'SELECT a.aid, count( p.pid ) AS pic_count, max( p.pid ) AS last_pid, max( p.ctime ) AS last_upload, a.keyword, a.alb_hits FROM cpg15x_albums AS a LEFT JOIN cpg15x_pictures AS p ON a.aid = p.aid AND p.approved = 'YES' WHERE a.category = 0 GROUP BY a.aid ORDER BY LIMIT 0,2' in index.php on line 805 the following error was encountered:
A sytactic error near 'LIMIT 0,2'
When I removed "ORDER BY $sort_order" from sql, CPG is runing.
I have not found, $CONFIG['album_sort_order'] variable.
$sort_order = $sort_array[$CONFIG['album_sort_order']]
So $sort_order is empty.
>:( My update.php was fault. I downloaded again, so cpg already run. :D
I close this topic.
I'm getting the same error after updating. What exactly did you do to fix this?
Got it. Ran "update database" and now it seems to work.
Everyone with the same issue: please read the upgrade docs (http://documentation.coppermine-gallery.net/en/upgrading.htm#upgrade_any) carefully:
Quote from: Run the update scriptTo run the PHP-file "update.php" (i.e. the update script), just enter the URL into the address bar of your browser. The file "update.php" resides in the coppermine directory, so to run it you will need to point your browser to http://yourdomain.tld/your_coppermine_folder/update.php (if you have installed Coppermine into the root of your web site, you will have to run http://yourdomain.tld/update.php accordingly). This will update your coppermine install by making all necessary changes in the database.
Marking thread as solved.