1.4.18 --> 1.5.16 fatal error 1.4.18 --> 1.5.16 fatal error
 

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

1.4.18 --> 1.5.16 fatal error

Started by wardsweb, December 26, 2011, 07:08:45 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

wardsweb

Before I build a new gallery from sratch I thought I would see if anyone here can help. My original gallery (http://914electric.com/gallery/) was giving me a page that just says "Fatal error :". I found it was created from the functions.inc.php file. So I decided to upgrade to the latest CPG. I uploaded all the files leaving the albums, config and anycontent files alone. I ran the update.php and it verified the database had been updated successfully. When I tried to do the old vs new files comparison, I got the same Fatal error page.

Next I did a complete new install that can be found here: http://914electric.com/showcase/. This one works fine.

So do you think it is possible to fix the original gallery or is there a way to import to the new database from the old database via myPHPadmin? The albums can be uploaded via FTP, as I have a full backup of the original site.

wardsweb

After reading some other threads on fatal error, I did enable debug. I get this message on the fatal error screen now.

While executing query 'DELETE FROM `k14el0_914electric`.914ev_sessions WHERE time < 1324934862 AND remember = 0' in bridge/coppermine.inc.php on line 248

mySQL 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 '.914ev_sessions WHERE time < 1324934862 AND remember = 0' at line 1

wardsweb

Here is the actual code that is referenced

  // Delete old sessions
                    $sql = "DELETE FROM {$this->sessionstable} WHERE time < $session_life_time AND remember = 0";
                    cpg_db_query($sql, $this->link_id);

Joe Carver

Quote from: wardsweb on December 26, 2011, 07:08:45 PM
My original gallery (http://914electric.com/gallery/) was giving me a page that just says "Fatal error :"

Upgrading alone will not fix a broken / damaged database.

You could try to repair your old db and / or try to manipulate / import the sessions table from your new db into the old one.

Hopefully your site was not compromised, leading to the original fatal error.

Αndré

Try to replace
$this->sessionstable =  '`' . $this->db['name'] . '`.' . $this->db['prefix'] . $this->table['sessions'];
with
$this->sessionstable =  $this->db['name'] . $this->db['prefix'] . $this->table['sessions'];
or
$this->sessionstable =  $this->db['prefix'] . $this->table['sessions'];
in bridge/coppermine.inc.php, maybe the database name causes your issue. Additionally, make sure the database details are correct and/or try to run that query with PHPMyAdmin.

wardsweb

Quote from: Αndré on January 10, 2012, 02:50:06 PM
Try to replace
$this->sessionstable =  '`' . $this->db['name'] . '`.' . $this->db['prefix'] . $this->table['sessions'];
with
$this->sessionstable =  $this->db['name'] . $this->db['prefix'] . $this->table['sessions'];
or
$this->sessionstable =  $this->db['prefix'] . $this->table['sessions'];
in bridge/coppermine.inc.php, maybe the database name causes your issue. Additionally, make sure the database details are correct and/or try to run that query with PHPMyAdmin.
Thank you Andre'. The second code option worked.

wardsweb

I spoke to soon. While changing the code did allow the main gallery page to load, when I click on any of the album, I get the fatal error page again.

Would it be better to just do a clean install of Coppermine and then import all the data from the old database? I have the original database backed up both in SQL and CSV. If this is a good option, how do I go about getting the old database info into the new database? I ran a check and repair on the original database from phpAdmin and it says the database if fine.

Αndré

Either post the extended error message or enable debug mode for guests, as I just see
QuoteFatal error :
which makes it impossible to fix the error.

I doubt that a clean install will fix the issue for you.

Which of the suggested changes fixed your first issue? Does only one of them work, or both?


By the way, the current stable release is cpg1.5.20, so you should upgrade to that version, maybe that issue has already been fixed.