Fatal Error after upgrading to 1.4.23 Fatal Error after upgrading to 1.4.23
 

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]

Main Menu

Fatal Error after upgrading to 1.4.23

Started by kathrynsuzie, May 21, 2009, 10:13:40 PM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

kathrynsuzie

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!

shredder

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');

kathrynsuzie

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/

kathrynsuzie

Quote from: kathrynsuzie on May 22, 2009, 12:27:56 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/

kathrynsuzie

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/

shredder

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);
        }
}

justal

Same problem here.... Thanks for the fix.

Al.

Nibbler

No, that's wrong. Try just changing


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


to:


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

zelal

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

Zarzal

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.

zelal

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.

phill104

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.
It is a mistake to think you can solve any major problems just with potatoes.

Aeronautic

Quote from: shredder on May 22, 2009, 12:35:00 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!


Aeronautic

Quote from: 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

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.

Aeronautic

Quote from: Aeronautic on May 23, 2009, 11:10:01 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.