Problem with upgrade and SQL restore same returning error Problem with upgrade and SQL restore same returning 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

Problem with upgrade and SQL restore same returning error

Started by lextech, October 05, 2009, 06:48:48 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

lextech

I've searched and found tons of info, just nothing about the fix in the php file when getting the error via fantastico so please see my issue as I know when the upgrade went wrong.

First the error:

QuoteWarning: Cannot modify header information - headers already sent by (output started at /home/XXXXXXXX/public_html/gallery/index.php:751) in /home/XXXXXXXX/public_html/gallery/themes/eyeball/theme.php on line 839

Warning: Cannot modify header information - headers already sent by (output started at /home/XXXXXXXX/public_html/gallery/index.php:751) in /home/XXXXXXXX/public_html/gallery/themes/eyeball/theme.php on line 840

Warning: Cannot modify header information - headers already sent by (output started at /home/XXXXXXXX/public_html/gallery/index.php:751) in /home/XXXXXXXX/public_html/gallery/include/functions.inc.php on line 51

Secondly, the things that have been done to try and remedy this........

~since the auto upgrade failed through fantastico when it hung on an error (this one: http://grab.by/7BO), I installed a second instance of coppermine and it was fine. Then I dropped the tables in myphpadmin and restored the second SQL from backup and it ended up having the same error on the second gallery as well so it is in my SQL backup now.

~ now I have two galleries, one upgraded, one clean install, both with the same error after restoring the SQL on gallery 2 with gallery 1.

I'm good with editing php if someone can help me pinpoint hat needs to be done, there's no use in doing the full upgrade with it already upgraded now, just have a little problem if anyone would please give me some advice. :)

THANKS!!

lextech

This should be line 51 in the php. Looks ok to me?


(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fi32.photobucket.com%2Falbums%2Fd5%2Faudiogodz1%2FScreenshot2009-10-05at125747AM.jpg&hash=de4d863eddda863eb1b662a480108f0e11cf73a9)

Joachim Müller


  • Installing via Fantastico or any other aut-installer crap goes unsupported (as in "no support"). Ask Fantastico or use the install/upgrade exactly as suggested in our docs. Link to the docs can be found at the top of this screen
  • Respect board rules in the future:
    You did the opposite of everything you should have done

lextech

Always nice to get a warm welcome. We'll see if my menalto gallery install goes smoother.

lextech

Proper answer for others needing help, remove this from the bottom of the index/php file.

// Speed-up the random image query by 'keying' the image table

    if (time() - $CONFIG['randpos_interval'] > 86400) {

        $result = db_query("SELECT count(*) FROM {$CONFIG['TABLE_PICTURES']} WHERE 1");

        $nbEnr = mysql_fetch_array($result);

        mysql_free_result($result);

        $pic_count = $nbEnr[0];

        $granularity = floor($pic_count / RANDPOS_MAX_PIC);

        $result = db_query("UPDATE {$CONFIG['TABLE_PICTURES']} SET randpos = ROUND(RAND()*$granularity) WHERE 1");

        $result = db_query("UPDATE {$CONFIG['TABLE_CONFIG']} SET value = '" . time() . "' WHERE name = 'randpos_interval'");

}




Nibbler

Looks like you're running Coppermine 1.3, which has not been supported for quite some time now. Update to the current release.