Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: 1.4.18 --> 1.5.16 fatal error  (Read 7033 times)

0 Members and 1 Guest are viewing this topic.

wardsweb

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 21
1.4.18 --> 1.5.16 fatal error
« on: December 26, 2011, 07:08:45 pm »

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.
Logged

wardsweb

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 21
Re: 1.4.18 --> 1.5.16 fatal error
« Reply #1 on: December 26, 2011, 11:33:40 pm »

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
Logged

wardsweb

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 21
Re: 1.4.18 --> 1.5.16 fatal error
« Reply #2 on: December 27, 2011, 05:32:15 am »

Here is the actual code that is referenced

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

Joe Carver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1504
  • aka 'i-imagine'
    • Home Page
Re: 1.4.18 --> 1.5.16 fatal error
« Reply #3 on: December 29, 2011, 12:14:34 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é

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: 1.4.18 --> 1.5.16 fatal error
« Reply #4 on: January 10, 2012, 02:50:06 pm »

Try to replace
Code: [Select]
$this->sessionstable =  '`' . $this->db['name'] . '`.' . $this->db['prefix'] . $this->table['sessions'];with
Code: [Select]
$this->sessionstable =  $this->db['name'] . $this->db['prefix'] . $this->table['sessions'];or
Code: [Select]
$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.
Logged

wardsweb

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 21
Re: Re: 1.4.18 --> 1.5.16 fatal error
« Reply #5 on: April 29, 2012, 06:35:03 am »

Try to replace
Code: [Select]
$this->sessionstable =  '`' . $this->db['name'] . '`.' . $this->db['prefix'] . $this->table['sessions'];with
Code: [Select]
$this->sessionstable =  $this->db['name'] . $this->db['prefix'] . $this->table['sessions'];or
Code: [Select]
$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.
Logged

wardsweb

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 21
Re: 1.4.18 --> 1.5.16 fatal error
« Reply #6 on: April 29, 2012, 06:45:16 am »

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.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: 1.4.18 --> 1.5.16 fatal error
« Reply #7 on: April 29, 2012, 09:01:31 am »

Either post the extended error message or enable debug mode for guests, as I just see
Quote
Fatal 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.
Logged
Pages: [1]   Go Up
 

Page created in 0.02 seconds with 19 queries.