forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 upgrading => Topic started by: kathrynsuzie on May 21, 2009, 10:13:40 pm

Title: Fatal Error after upgrading to 1.4.23
Post by: kathrynsuzie on May 21, 2009, 10:13:40 pm
I just tried to upgrade to 1.4.23 and after running the update.php file I cannot get to the index because it says this:
Fatal error: Maximum execution time of 30 seconds exceeded in /hosting/home/tb3v777/www.mprokop.com/htdocs/gallery/include/init.inc.php on line 51

I tried re-uploading the init.inc.php file but it does not work.  I tried searching online for how to fix this error and couldn't find it. Any help would be appreciated!  I've upgraded before and I believe I've done it correctly, but I'm not sure what has happened!
Title: Re: Fatal Error after upgrading to 1.4.23
Post by: shredder on May 21, 2009, 11:34:58 pm
Hello,

Open - ./include/init.inc.php

Find:
$keysToSkip = array('_POST', '_GET', '_COOKIE', '_REQUEST', '_SERVER', 'HTML_SUBST', 'keysToSkip', 'register_globals_flag', 'cpgdebugger');

and replace with:
$keysToSkip = array('_POST', '_GLOBALS', '_GET', '_COOKIE', '_REQUEST', '_SERVER', 'HTML_SUBST', 'keysToSkip', 'register_globals_flag', 'cpgdebugger');
Title: Re: Fatal Error after upgrading to 1.4.23
Post by: kathrynsuzie on May 22, 2009, 12:27:56 am
Thank you for replying.  I have done this, but now all the pages are showing up blank, not with an error or anything but completely blank.

http://www.mprokop.com/gallery/
Title: Re: Fatal Error after upgrading to 1.4.23
Post by: kathrynsuzie on May 22, 2009, 12:49:04 am
Thank you for replying.  I have done this, but then all the pages were showing up blank, not with an error or anything but completely blank. I reverted back to the original version of the file and am now getting the same error as I was before.

http://www.mprokop.com/gallery/
Title: Re: Fatal Error after upgrading to 1.4.23
Post by: kathrynsuzie on May 22, 2009, 01:02:44 am
Thank you for replying.  I have done this, but then all the pages were showing up blank, not with an error or anything but completely blank. I reverted back to the original version of the file and am now getting the same error as I was before.

http://www.mprokop.com/gallery/
Title: Re: Fatal Error after upgrading to 1.4.23
Post by: shredder on May 22, 2009, 12:35:00 pm
Hello,
I've forgotten something

Open - ./include/init.inc.php
Step 1
Find:
$keysToSkip = array('_POST', '_GET', '_COOKIE', '_REQUEST', '_SERVER', 'HTML_SUBST', 'keysToSkip', 'register_globals_flag', 'cpgdebugger');

and replace with:
$keysToSkip = array('_POST', '_GLOBALS', '_GET', '_COOKIE', '_REQUEST', '_SERVER', 'HTML_SUBST', 'keysToSkip', 'register_globals_flag', 'cpgdebugger');

Step 2

rename $GLOBALS in $_GLOBALS

if (is_array($_GLOBALS)) {
        foreach ($_GLOBALS as $key => $value) {
                if (!in_array($key, $keysToSkip) && isset($$key) && $register_globals_flag) unset($$key);
        }
}
Title: Re: Fatal Error after upgrading to 1.4.23
Post by: justal on May 22, 2009, 01:48:25 pm
Same problem here.... Thanks for the fix.

Al.
Title: Re: Fatal Error after upgrading to 1.4.23
Post by: Nibbler on May 22, 2009, 05:57:37 pm
No, that's wrong. Try just changing

Code: [Select]
$keysToSkip = array('_POST', '_GET', '_COOKIE', '_REQUEST', '_SERVER', 'HTML_SUBST', 'keysToSkip', 'register_globals_flag', 'cpgdebugger');

to:

Code: [Select]
$keysToSkip = array('_POST', 'GLOBALS', '_GET', '_COOKIE', '_REQUEST', '_SERVER', 'HTML_SUBST', 'keysToSkip', 'register_globals_flag', 'cpgdebugger');
Title: Re: Fatal Error after upgrading to 1.4.23
Post by: zelal on May 22, 2009, 07:47:01 pm
Dear Nibbler,

Sorry if I say something like a child.

I have just followed your instruction. But the same fatal error message appears. However, if I follow the solution that came from Shredder, I can see the index page as desired without that fatal error message. But there also an error message appears near the top of the page:-

"The PHP setting register_globals is enabled on your server, which is a bad idea in terms of security. It's strongly recommended to turn it off. [more]"

However, since I am trying Coppermine in my local machine (with apache2triad), I wanted to edit the file "php.ini", but I could not get it within my apache2triad folder or it subfolders. Could you please advise me how can I solve this?

Regards.

Zelal
Title: Re: Fatal Error after upgrading to 1.4.23
Post by: Zarzal on May 22, 2009, 08:34:16 pm
The message in the first picture ist correct and all work as it should. It is a message from the code itself to notify you to change register_globals on your server from on to off. Just click the link in the message to get more informations.
thje message is only sho to logged in adminstrators not to normal users.
Title: Re: Fatal Error after upgrading to 1.4.23
Post by: zelal on May 22, 2009, 08:38:59 pm
Also, please, it may be an annoying question:

Should I have both ImageMagic and Stramm's Modpack installed to get watermark / custom thumb feature? In that case, will Modpack for CPG 1.4.22 work with this CPG version (1.4.23)? Also, how can I install ImageMagic on my localhost server of my local PC?

I will be grateful if you kindly reply to the above questions.

I apology in advance if I break the rules of forum.

Many Thanks.
Title: Re: Fatal Error after upgrading to 1.4.23
Post by: phill104 on May 22, 2009, 09:08:43 pm
Yep, you do break the forum rules.

Please start your own threads with one thread per question. We ask this to make it easier to find answers to questions already asked.

On top of that, please use the search feature of this board as some of your questions have already been asked.
Title: Re: Fatal Error after upgrading to 1.4.23
Post by: Aeronautic on May 23, 2009, 10:11:11 pm
Step 2
rename $GLOBALS in $_GLOBALS

if (is_array($_GLOBALS)) {
        foreach ($_GLOBALS as $key => $value) {
                if (!in_array($key, $keysToSkip) && isset($$key) && $register_globals_flag) unset($$key);
        }
}

Did you intend this to be placed in the code just below step one as an addition?

Thank you!
Title: Re: Fatal Error after upgrading to 1.4.23
Post by: Nibbler on May 23, 2009, 10:49:02 pm
Ignore that suggestion. Apply http://forum.coppermine-gallery.net/index.php/topic,59612.msg294368.html#msg294368 instead
Title: Re: Fatal Error after upgrading to 1.4.23
Post by: Aeronautic on May 23, 2009, 11:10:01 pm
Ignore that suggestion. Apply http://forum.coppermine-gallery.net/index.php/topic,59612.msg294368.html#msg294368 instead

Hi Nibbler - thanks - I did at first - and read every post on this update in every thread before posting. Still got the timeout error on either line 51 or 52.

PHP 4.4.9 on my VPS.
Title: Re: Fatal Error after upgrading to 1.4.23
Post by: Aeronautic on May 23, 2009, 11:18:35 pm
Hi Nibbler - thanks - I did at first - and read every post on this update in every thread before posting. Still got the timeout error on either line 51 or 52.

PHP 4.4.9 on my VPS.

 ::)

I stand (or sit) corrected - my bad Nibbler.

I had applied your fix here:

http://forum.coppermine-gallery.net/index.php/topic,59582.msg294236.html#msg294236

Not here:

http://forum.coppermine-gallery.net/index.php/topic,59612.msg294368.html#msg294368

And thought them the same. To others - they are not.

Works fine now. Many many thanks.