forum.coppermine-gallery.net

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Miscellaneous => Topic started by: fabiano werner on December 08, 2005, 12:24:03 am

Title: Critical error
Post by: fabiano werner on December 08, 2005, 12:24:03 am
my cpg 1.3.5 copy is at http://www.organizmo.com/galeria/ (http://www.organizmo.com/galeria/)

here is the error:
_________________________________________



Warning: Cannot modify header information - headers already sent by (output started at /home/organus/public_html/galeria/index.php:751) in /home/organus/public_html/galeria/themes/hardwired/theme.php on line 896

Warning: Cannot modify header information - headers already sent by (output started at /home/organus/public_html/galeria/index.php:751) in /home/organus/public_html/galeria/themes/hardwired/theme.php on line 897

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


________________________________________

after that, above this error msg, i get a new header and table with this error:

Critical error
There was an error while processing a database query


__

checked the whole forum, seems like everyone got the header error but i didnt find a solution for mine. HELP!
Title: Re: Critical error
Post by: Nibbler on December 08, 2005, 12:57:21 am
Enable debug mode in config and post the mysql error message you get (not the entire debug output). Have you made any changes to your gallery or server recently ?
Title: Re: Critical error
Post by: fabiano werner on December 08, 2005, 01:46:31 am
here u are:
__________________


While executing query "UPDATE cpg_pictures SET randpos = ROUND(RAND()*15) WHERE 1" on 0

mySQL error: Unknown column 'randpos' in 'field list'

_________________

i´m coming back from a whole system restore backup due to errors while upgrading my Mambo to JOOMLA ... with no success, then asked my webhost to come back to the latest backup.
Title: Re: Critical error
Post by: Nibbler on December 08, 2005, 01:55:55 am
Interesting. Look in your index.php, find

Code: [Select]
    // 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'");
    }

and delete it.
Title: Re: Critical error
Post by: fabiano werner on December 08, 2005, 04:29:09 am
thanks a lot Nibbler, you da man!!!!!!  ;D ;D ;D ;D ;D ;D
Title: Re: Critical error
Post by: asphyxiia on December 08, 2005, 11:43:21 pm
Thankyou Nibbler ;)

 appreciate your efforst :) /bow It fixed the double visiion /laugh

I'm beginning to learn quite a bit from you :) thankyou
Title: Re: Critical error
Post by: Omar on December 12, 2005, 07:46:03 pm
I deleted those codes as mentioned from index.php

but I am getting a new error..

Quote
Parse error: parse error, unexpected '.' in /home/mytrave/public_html/gallery/index.php on line 122
and nothing is showing up. www.mytraveltale.com/gallery (http://www.mytraveltale.com/gallery)

at the line 122 in index.php...  it is

Quote
$image_size = compute_img_size($picture['pwidth'], $picture['pheight'], $CONFIG['alb_list_thumb_size']);
                        $user_thumb = "<img src="../coppermine%20update/%22%22" . $pic_url . "\" class=\"image\" {$image_size['geom']} border=\"0\" alt=\"\">";
                        $user_thumb = "<a href=\"index.php?cat={$subcat['cid']}\">".$user_thumb."</a>";
                    }

please advice.
Title: Re: Critical error
Post by: Nibbler on December 12, 2005, 08:35:12 pm
Get a fresh version of index.php from the coppermine package and try again. You corrupted the file somehow.
Title: Re: Critical error
Post by: Nurples on December 22, 2005, 04:21:05 am
Worked for me!!!  Thanks Nibb!!!!

http://pp.nurples.com
Title: Re: Critical error
Post by: cornrolla on February 23, 2006, 03:58:47 am
worked perfectly!!!! :) AWESOMENESS!!!