coppermine-gallery.com/forum

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Installation & Setup => Topic started by: Fullpupp on September 28, 2004, 09:42:28 AM

Title: Error, can not view pictures after upgrading
Post by: Fullpupp on September 28, 2004, 09:42:28 AM
After I upgraded from 1.2.0 to 1.3.2, i cannot view the pictures from the older version. When I try to view them, I get this message:

Fatal error: Maximum execution time of 30 seconds exceeded in /home/fullpupp/public_html/bilder/include/functions.inc.php on line 79

Other functions works fine, except "my gallery".

Some failure occured before upgrading to.. I mistakingly deleted some categories, and then I couldn't enter "my gallery". Anyone have any idea how I could fix this?
Title: Re: Error, can not view pictures after upgrading
Post by: Joachim Müller on September 28, 2004, 10:05:09 AM
post a link to your gallery, and a deep link to the page in question.

Joachim
Title: Re: Error, can not view pictures after upgrading
Post by: Fullpupp on September 28, 2004, 10:14:21 AM
The adress is

www.fullpupp.com/bilder/ (http://www.fullpupp.com/bilder/)

You can try to access any picture, and it would not respond. I've created a guest account:

Username: Guest
Password: 1234

Title: Re: Error, can not view pictures after upgrading
Post by: Casper on September 28, 2004, 07:05:35 PM
The pics are there ok.  Make sure your ftp program replaced ALL the files when you did the update.

It does not seem to want to display displayimage.php. 

I also suggest you put catlist and alblist in the 'contents of main page' in config.  Coppermine usually needs these.
Title: Re: Error, can not view pictures after upgrading
Post by: Tranz on September 28, 2004, 07:26:32 PM
As Casper stated, the pictures are OK. You can check by going to the direct address location of the photo files. While I checked, I noticed that you have your photos located in the userpics folder. With version 1.3+ you will no longer be able to batch upload files if you upload them into that folder.
Title: Re: Error, can not view pictures after upgrading
Post by: Fullpupp on September 29, 2004, 10:55:30 AM
Thanks for the tips! :)

I replaced all files except those stated in the readme-file. The displayimage.php is there..

I wonder, if I move them to the album folder, would the ratings, and comments follow them?
Title: Re: Error, can not view pictures after upgrading
Post by: Tranz on September 29, 2004, 10:59:33 AM
For the photos you currently have, do not move them while outside of CPG, unless you know how to manually edit the database to note their new locations. It's only with new uploads that you would be unable to use userpics because you're not going to be able to see the folder.


I got this error message when I clicked on one of the photo thumbnails:
Quote
Fatal error: Maximum execution time of 30 seconds exceeded in /home/fullpupp/public_html/bilder/include/functions.inc.php on line 79
Are you using an unmodified version of that functions file? If not would you be able to post for us line 79 (+/- few lines) of your copy of the file?
Title: Re: Error, can not view pictures after upgrading
Post by: Casper on September 29, 2004, 08:25:55 PM
Please send me, by pm, an admin login to your site.  There is something fishy with your install.
Title: Re: Error, can not view pictures after upgrading
Post by: Fullpupp on September 29, 2004, 09:41:05 PM
Quote<?php
// ------------------------------------------------------------------------- //
// Coppermine Photo Gallery 1.3.2                                            //
// ------------------------------------------------------------------------- //
// Copyright (C) 2002-2004 Gregory DEMAR                                     //
// http://www.chezgreg.net/coppermine/                                       //
// ------------------------------------------------------------------------- //
// Updated by the Coppermine Dev Team                                        //
// (http://coppermine.sf.net/team/)                                          //
// see /docs/credits.html for details                                        //
// ------------------------------------------------------------------------- //
// This program is free software; you can redistribute it and/or modify      //
// it under the terms of the GNU General Public License as published by      //
// the Free Software Foundation; either version 2 of the License, or         //
// (at your option) any later version.                                       //
// ------------------------------------------------------------------------- //
// CVS version: $Id: functions.inc.php,v 1.14 2004/08/14 17:30:15 gaugau Exp $
// ------------------------------------------------------------------------- //

/**************************************************************************
   Function for managing cookie saved user profile
**************************************************************************/

// Decode the user profile contained in a cookie
function user_get_profile()
{
        global $CONFIG, $USER, $HTTP_COOKIE_VARS;

        if (isset($HTTP_COOKIE_VARS[$CONFIG['cookie_name'].'_data'])) {
                $USER = @unserialize(@base64_decode($HTTP_COOKIE_VARS[$CONFIG['cookie_name'].'_data']));
        }

        if (!isset($USER['ID']) || strlen($USER['ID']) != 32) {
                list($usec, $sec) = explode(' ', microtime());
                $seed = (float) $sec + ((float) $usec * 100000);
                srand($seed);
                $USER=array('ID' => md5(uniqid(rand(),1)));
        } else {
                $USER['ID'] = addslashes($USER['ID']);
        }

        if (!isset($USER['am'])) $USER['am'] = 1;
}

// Save the user profile in a cookie
function user_save_profile()
{
        global $CONFIG, $USER, $HTTP_SERVER_VARS;

        $data = base64_encode(serialize($USER));
        setcookie($CONFIG['cookie_name'].'_data', $data, time()+86400*30, $CONFIG['cookie_path']);
}

/**************************************************************************
   Database functions
**************************************************************************/

// Connect to the database
function cpg_db_connect()
{
        global $CONFIG;
        $result = @mysql_connect($CONFIG['dbserver'], $CONFIG['dbuser'], $CONFIG['dbpass']);
        if (!$result)
                return false;
        if (!mysql_select_db($CONFIG['dbname']))
                return false;
        return $result;
}

// Perform a database query
function db_query($query, $link_id = 0)
{
        global $CONFIG, $query_stats, $queries;

        $query_start = cpgGetMicroTime();
        if (($link_id)) {
            $result = mysql_query($query, $link_id);
        } else {
                $result = mysql_query($query);      //Line 79
        }
        $query_end = cpgGetMicroTime();
        if (isset($CONFIG['debug_mode']) && (($CONFIG['debug_mode']==1) || ($CONFIG['debug_mode']==2) )) {
                $query_stats[] = $query_end - $query_start;
                $queries[] = $query;
        }
        if (!$result) db_error("While executing query \"$query\" on $link_id");

        return $result;
}

I only posted the first functions, including the one with line 79.

I have not modified this file in any way... :-\\