Advanced search  

News:

cpg1.5.46 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter recently discovered vulnerabilities. It is important that all users who run version cpg1.5.44 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Fatal Error: Allowed memory size exhausted (strange)  (Read 4174 times)

0 Members and 1 Guest are viewing this topic.

Hanna.

  • Coppermine frequent poster
  • ***
  • Country: us
  • Offline Offline
  • Gender: Female
  • Posts: 131
  • webstar
Fatal Error: Allowed memory size exhausted (strange)
« on: February 11, 2018, 07:29:28 pm »

Hi everyone. I have been experiencing this fatal error of extending memory limit.

But I did increase it from 8 to 64M in the php.ini. Still it will not upload my pictures (selective ones) and I go with the GD version (best one.). My error message refers to the php file "imageobject_gd.class.php"
Logged

Phill Luckhurst

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4556
    • Windsurf.me
Re: Fatal Error: Allowed memory size exhausted (strange)
« Reply #1 on: February 11, 2018, 09:23:54 pm »

What size images are you trying to upload? It may simply be a case your images are quite large.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

Hanna.

  • Coppermine frequent poster
  • ***
  • Country: us
  • Offline Offline
  • Gender: Female
  • Posts: 131
  • webstar
Re: Fatal Error: Allowed memory size exhausted (strange)
« Reply #2 on: February 11, 2018, 11:51:27 pm »

They are no bigger than the rest of the ones I am trying to get up. 3500px and less than 500 kb/each? That is what makes this error so strange.
Logged

ron4mac

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Posts: 911
Re: Fatal Error: Allowed memory size exhausted (strange)
« Reply #3 on: February 12, 2018, 02:25:58 am »

Deselect Auto-orient image(s) when uploading a problem file to see if it makes a difference.
Logged

ron4mac

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Posts: 911
Re: Fatal Error: Allowed memory size exhausted (strange)
« Reply #4 on: February 12, 2018, 02:31:22 am »

My error message refers to the php file "imageobject_gd.class.php"
Can you give us more of the error message? (line number?)

And can you check memory_limit from the Admin menu (Information->phpinfo) to see what the value is?
« Last Edit: February 12, 2018, 02:37:41 am by ron4mac »
Logged

Hanna.

  • Coppermine frequent poster
  • ***
  • Country: us
  • Offline Offline
  • Gender: Female
  • Posts: 131
  • webstar
Re: Re: Fatal Error: Allowed memory size exhausted (strange)
« Reply #5 on: February 12, 2018, 04:21:40 am »

Can you give us more of the error message? (line number?)

And can you check memory_limit from the Admin menu (Information->phpinfo) to see what the value is?

The fatal error is "Allowed memory size of 134217728 bytes exhausted (tried to allocate 8192 bytes) in /home/minowncu/public_html/addons/sarahmichellegellar.us/gallery/include/imageobject_gd.class.php on line 403" and attaching the phpinfo. Let me know if you need anything else.

Logged

ron4mac

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Posts: 911
Re: Fatal Error: Allowed memory size exhausted (strange)
« Reply #6 on: February 12, 2018, 02:30:35 pm »

Hmm .. I don't immediately see why you should be having an issue. What upload method are you using?

I see this is a new site. Do you have a similar issue with the kristincavallari site? Perhaps you could try to upload one of the problem images there to see. If no problems at the KC site, what are the differences?

BTW .. I'm seeing the attached behavior at both sites. I have to click on the small bar and view the intermediate image before the other thumbnails show up. Also get a few browser console errors.
Logged

Hanna.

  • Coppermine frequent poster
  • ***
  • Country: us
  • Offline Offline
  • Gender: Female
  • Posts: 131
  • webstar
Re: Re: Fatal Error: Allowed memory size exhausted (strange)
« Reply #7 on: February 12, 2018, 07:00:57 pm »

Hmm .. I don't immediately see why you should be having an issue. What upload method are you using?

I see this is a new site. Do you have a similar issue with the kristincavallari site? Perhaps you could try to upload one of the problem images there to see. If no problems at the KC site, what are the differences?

BTW .. I'm seeing the attached behavior at both sites. I have to click on the small bar and view the intermediate image before the other thumbnails show up. Also get a few browser console errors.

Thank you for all observations. I just uploaded the fadeslideshow.js that was missing in my folders. Not sure what the coppermine.css is referring to error-wise?

And I did try to upload the same photos to Kristin and it gave me same fatal error. That must mean that the pictures have to have some sort of setting that is not accepted by Coppermine?
Logged

Phill Luckhurst

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4556
    • Windsurf.me
Re: Fatal Error: Allowed memory size exhausted (strange)
« Reply #8 on: February 12, 2018, 07:59:00 pm »

Not really, Coppermine doesn’t really work like that. This certainly sounds more server related.

I have seen server setups, particularly in shared hosting, that while they allow you to make changes to the memory available and it appears this has been change, behind the scenes are quite low limits. The file used over 128mb of memory during the process hence the message. Is there somewhere you can upload the i,age so we can download it and see just how much it would actually take to process.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

Hanna.

  • Coppermine frequent poster
  • ***
  • Country: us
  • Offline Offline
  • Gender: Female
  • Posts: 131
  • webstar
Re: Re: Fatal Error: Allowed memory size exhausted (strange)
« Reply #9 on: February 13, 2018, 12:10:16 am »

Not really, Coppermine doesn’t really work like that. This certainly sounds more server related.

I have seen server setups, particularly in shared hosting, that while they allow you to make changes to the memory available and it appears this has been change, behind the scenes are quite low limits. The file used over 128mb of memory during the process hence the message. Is there somewhere you can upload the i,age so we can download it and see just how much it would actually take to process.

I am going to request a report on it. All my others are at 64M according to mycpanel. I will be back with an update. Thank you.
Logged

Hanna.

  • Coppermine frequent poster
  • ***
  • Country: us
  • Offline Offline
  • Gender: Female
  • Posts: 131
  • webstar
Re: Re: Fatal Error: Allowed memory size exhausted (strange)
« Reply #10 on: February 13, 2018, 02:00:18 am »

I am going to request a report on it. All my others are at 64M according to mycpanel. I will be back with an update. Thank you.

My providor responded "we have set to 256MB". I hope that helps.
Logged

Hanna.

  • Coppermine frequent poster
  • ***
  • Country: us
  • Offline Offline
  • Gender: Female
  • Posts: 131
  • webstar
Re: Re: Fatal Error: Allowed memory size exhausted (strange)
« Reply #11 on: February 14, 2018, 07:34:57 pm »

BTW .. I'm seeing the attached behavior at both sites. I have to click on the small bar and view the intermediate image before the other thumbnails show up. Also get a few browser console errors.

Would you have any idea how to fix this particular issue with the thumbnails not loading properly?
Logged

ron4mac

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Posts: 911
Re: Fatal Error: Allowed memory size exhausted (strange)
« Reply #12 on: February 14, 2018, 09:30:08 pm »

Would you have any idea how to fix this particular issue with the thumbnails not loading properly?
The Kristin site seems to be running quite well now ... no thumbnail issues that I saw. I'll point out some things below that should be corrected, though.
The Sarah site still does not render well.

Your web pages should load without significant issues being displayed in the browser console .. which is the case with Kristin site right now.
The Sarah site shows a number of errors (see attached). You should correct those issues.

These:
Code: [Select]
<link rel="stylesheet" href="https://sarahmichellegellar.us/gallery/themes/2018feb/coppermine.css" type="text/css" />
<link rel="stylesheet" href="https://sarahmichellegellar.us/gallery/themes/2018feb/style.css" type="text/css" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
are better written like this:
Code: [Select]
<link rel="stylesheet" href="//sarahmichellegellar.us/gallery/themes/2018feb/coppermine.css" type="text/css" />
<link rel="stylesheet" href="//sarahmichellegellar.us/gallery/themes/2018feb/style.css" type="text/css" />
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
That way the browser will do the right thing whether it is http: or https:

CPG loads its own jQuery version so it is probably not a good thing to be loading a CDN version as well.
BTW .. the CPG version of jQuery being used is actually v1.4.4, even though it is labeled 1.4.2.
Logged

Hanna.

  • Coppermine frequent poster
  • ***
  • Country: us
  • Offline Offline
  • Gender: Female
  • Posts: 131
  • webstar
Re: Re: Fatal Error: Allowed memory size exhausted (strange)
« Reply #13 on: February 15, 2018, 02:06:06 am »

The Kristin site seems to be running quite well now ... no thumbnail issues that I saw. I'll point out some things below that should be corrected, though.
The Sarah site still does not render well.

Your web pages should load without significant issues being displayed in the browser console .. which is the case with Kristin site right now.
The Sarah site shows a number of errors (see attached). You should correct those issues.

These:
Code: [Select]
<link rel="stylesheet" href="https://sarahmichellegellar.us/gallery/themes/2018feb/coppermine.css" type="text/css" />
<link rel="stylesheet" href="https://sarahmichellegellar.us/gallery/themes/2018feb/style.css" type="text/css" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
are better written like this:
Code: [Select]
<link rel="stylesheet" href="//sarahmichellegellar.us/gallery/themes/2018feb/coppermine.css" type="text/css" />
<link rel="stylesheet" href="//sarahmichellegellar.us/gallery/themes/2018feb/style.css" type="text/css" />
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
That way the browser will do the right thing whether it is http: or https:

CPG loads its own jQuery version so it is probably not a good thing to be loading a CDN version as well.
BTW .. the CPG version of jQuery being used is actually v1.4.4, even though it is labeled 1.4.2.

I just made those adjustments. If you have any more/other suggestions, let me know.

The solution, if you will, to this topic that I started on the fatal error -- I maximized the memory limit to above 200M just to upload certain files; then I put it back to 64M. Only setting that worked.
Logged

ron4mac

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Posts: 911
Re: Fatal Error: Allowed memory size exhausted (strange)
« Reply #14 on: February 15, 2018, 02:16:46 pm »

I just made those adjustments. If you have any more/other suggestions, let me know.

You've got some links set to cross over between your sites.
In your template.html files, change things like this:
Code: [Select]
<link rel="stylesheet" href="//sarahmichellegellar.us/gallery/themes/2018feb/coppermine.css" type="text/css" />
<link rel="stylesheet" href="//sarahmichellegellar.us/gallery/themes/2018feb/style.css" type="text/css" />
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
to this:
Code: [Select]
<link rel="stylesheet" href="css/coppermine.css" type="text/css" />
<link rel="stylesheet" href="{THEME_DIR}style.css" type="text/css" />

The correct location for the coppermine.css file distributed with the release is as above. That was changed many releases ago, I think.
CPG 1.6 will turn {THEME_DIR} in your template.html into the proper link to your theme, making your theme more portable.
And notice I did not include the jQuery CDN call ... get rid of that.

With regard to thumbnails, Kristin is working okay but not Sarah or Rachel. The difference I see is the FB script.
Code: [Select]
<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.5";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
If you need to keep that, try moving it to the bottom of the template file, just before the </body> tag.
Or implement it in a manner as FB suggests when using jQuery:
Code: [Select]
<script type="text/javascript">
  $(document).ready(function() {
    $.ajaxSetup({ cache: true });
    $.getScript('https://connect.facebook.net/en_US/sdk.js', function(){
      FB.init({
        appId: '{your-app-id}',
        version: 'v2.7' // or v2.1, v2.2, v2.3, ...
      });     
      $('#loginbutton,#feedbutton').removeAttr('disabled');
      FB.getLoginStatus(updateStatusCallback);
    });
  });
</script>

I don't see any use of the fadeslideshow code.
« Last Edit: February 15, 2018, 03:23:24 pm by ron4mac »
Logged

Phill Luckhurst

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4556
    • Windsurf.me
Re: Re: Fatal Error: Allowed memory size exhausted (strange)
« Reply #15 on: February 15, 2018, 08:44:33 pm »


The solution, if you will, to this topic that I started on the fatal error -- I maximized the memory limit to above 200M just to upload certain files; then I put it back to 64M. Only setting that worked.

That is understandable. There is a good explanation of this error and the reasons behind it here - http://forum.coppermine-gallery.net/index.php/topic,24088.msg110690.html#msg110690

The thread may be a little out of date, but it does explain a little more.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

Hanna.

  • Coppermine frequent poster
  • ***
  • Country: us
  • Offline Offline
  • Gender: Female
  • Posts: 131
  • webstar
Re: Re: Fatal Error: Allowed memory size exhausted (strange)
« Reply #16 on: February 16, 2018, 01:29:14 am »

You've got some links set to cross over between your sites.
In your template.html files, change things like this:
Code: [Select]
<link rel="stylesheet" href="//sarahmichellegellar.us/gallery/themes/2018feb/coppermine.css" type="text/css" />
<link rel="stylesheet" href="//sarahmichellegellar.us/gallery/themes/2018feb/style.css" type="text/css" />
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
to this:
Code: [Select]
<link rel="stylesheet" href="css/coppermine.css" type="text/css" />
<link rel="stylesheet" href="{THEME_DIR}style.css" type="text/css" />

The correct location for the coppermine.css file distributed with the release is as above. That was changed many releases ago, I think.
CPG 1.6 will turn {THEME_DIR} in your template.html into the proper link to your theme, making your theme more portable.
And notice I did not include the jQuery CDN call ... get rid of that.

With regard to thumbnails, Kristin is working okay but not Sarah or Rachel. The difference I see is the FB script.
Code: [Select]
<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.5";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
If you need to keep that, try moving it to the bottom of the template file, just before the </body> tag.
Or implement it in a manner as FB suggests when using jQuery:
Code: [Select]
<script type="text/javascript">
  $(document).ready(function() {
    $.ajaxSetup({ cache: true });
    $.getScript('https://connect.facebook.net/en_US/sdk.js', function(){
      FB.init({
        appId: '{your-app-id}',
        version: 'v2.7' // or v2.1, v2.2, v2.3, ...
      });     
      $('#loginbutton,#feedbutton').removeAttr('disabled');
      FB.getLoginStatus(updateStatusCallback);
    });
  });
</script>

I don't see any use of the fadeslideshow code.

I made those changes on the Sarah site. I still experience slow loading on the thumbnails on my phone for instance?

And...

That is understandable. There is a good explanation of this error and the reasons behind it here - http://forum.coppermine-gallery.net/index.php/topic,24088.msg110690.html#msg110690

The thread may be a little out of date, but it does explain a little more.

Thank you!
Logged

ron4mac

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Posts: 911
Re: Fatal Error: Allowed memory size exhausted (strange)
« Reply #17 on: February 16, 2018, 02:00:43 am »

I made those changes on the Sarah site. I still experience slow loading on the thumbnails on my phone for instance?
Yes, there are still image load issues. That leaves the Google ads script invocation as the next likely culprit. Try running without that (it's not at Kristin - which seems fine).
[edit:]
My mistake .. it is at Kristin.  You'll have to determine what is different between the Kristin site setup and the others. I have no problems loading pages with lots of thumbnails at Kristin. But there are definitely problems with that at the other sites.
« Last Edit: February 16, 2018, 02:04:08 pm by ron4mac »
Logged
Pages: [1]   Go Up
 

Page created in 0.035 seconds with 21 queries.