Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Fatal Error after upgrading to 1.4.23  (Read 14788 times)

0 Members and 1 Guest are viewing this topic.

kathrynsuzie

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Fatal Error after upgrading to 1.4.23
« 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!
Logged

shredder

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: Fatal Error after upgrading to 1.4.23
« Reply #1 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');
Logged

kathrynsuzie

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Fatal Error after upgrading to 1.4.23
« Reply #2 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/
Logged

kathrynsuzie

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Fatal Error after upgrading to 1.4.23
« Reply #3 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/
Logged

kathrynsuzie

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Fatal Error after upgrading to 1.4.23
« Reply #4 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/
Logged

shredder

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: Fatal Error after upgrading to 1.4.23
« Reply #5 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);
        }
}
Logged

justal

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 46
Re: Fatal Error after upgrading to 1.4.23
« Reply #6 on: May 22, 2009, 01:48:25 pm »

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

Al.
Logged

Nibbler

  • Guest
Re: Fatal Error after upgrading to 1.4.23
« Reply #7 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');
Logged

zelal

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: Fatal Error after upgrading to 1.4.23
« Reply #8 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
Logged

Zarzal

  • Coppermine novice
  • *
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 40
Re: Fatal Error after upgrading to 1.4.23
« Reply #9 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.
Logged

zelal

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: Fatal Error after upgrading to 1.4.23
« Reply #10 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.
Logged

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4885
    • Windsurf.me
Re: Fatal Error after upgrading to 1.4.23
« Reply #11 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.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

Aeronautic

  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 125
  • Photographer / film maker turned webmeister...
Re: Fatal Error after upgrading to 1.4.23
« Reply #12 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!
Logged

Nibbler

  • Guest
Re: Fatal Error after upgrading to 1.4.23
« Reply #13 on: May 23, 2009, 10:49:02 pm »

Logged

Aeronautic

  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 125
  • Photographer / film maker turned webmeister...
Re: Fatal Error after upgrading to 1.4.23
« Reply #14 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.
Logged

Aeronautic

  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 125
  • Photographer / film maker turned webmeister...
Re: Fatal Error after upgrading to 1.4.23
« Reply #15 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.
Logged
Pages: [1]   Go Up
 

Page created in 0.025 seconds with 19 queries.