Memory error when trying to create a gallery for a Theater album

Something went wrong

Unexpected error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in PdoExtended.php on line 161

I have 4 other html5 video albums and I’m trying to follow exactly what I did to create them but at the moment I try to create an album, I get a memory error. Then when I try to delete that failed album in Backlight4, I get a red error: " The albums could not be deleted."

https://www.garybrackin.com/videos/fredomfight2021-jackie-schlegel/ gives Error: 404

Here is my admin for Backlight 4:
website: http://www.garybrackin.com/backlight/admin/?a=login
Admin Backlight login: admin
Password: [removed by Ben]

Well, hmmm. I deleted and entire gallery set and cannot create a new photo album, …and I cannot create a Theater video gallery, either. I get errors, even though I tried reinstallng all of backlight modules. It was successful installing but I cannot create or delete any album or album set.

have you tried using the Update Album Files link?

It was worth a shot but, this is the error I get when I,
Update Album Files:

Sorry, that didn’t work.
Please try again or come back later.
500 Error. Internal Server Error.

@Ben will need to take a look. Sounds like a server issue though.

That was a good suggestion, Rod. So, I had my server company HostGator refresh my entire site from a backup they had from a month ago.

Still get the same memory error in PdoExtended.php when I try to create an album.
I’m using the same Backlight Pangolin templates and settings I usually use for TTG Theater
and creating an HTML5 video and doing all the usual things and using the same /public_html/videosrc/ folder as I always do. I put the Video ID in there as I normally do and when I click, Save …to make the album …Backlight crashes and gives this error:

Something went wrong
Unexpected error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in PdoExtended.php on line 161
Please report error at https://discourse.theturninggate.net


If I go back to look at the album that was created, it was started and yes there is a container started …but not much is in the album, …since the php crashed while it was building the album. And sometimes, I can delete that album …and sometimes I have to try several times before Backlight is successful in deleting the album.

Since I can see that the error is happening in the file PdoExtended.php …I did try to go to my server and upgrade PHP to PHP 7.4 and that crashes the whole site saying Backlight needed something. But I easily, reverted back to PHP 7.3 inherit and then the site works great as before, but i still cannot create a new HTML5 video album using Theater and the templates I always have been using.

-> That’s a lot to explain, but you can see a half-created crashed album here:
Here’s the working Album Set where all my videos are,

And if you follow that broken Album -it’s here
https://www.garybrackin.com/videos/tfvc-pastor-stephen-broden-and-dr-amy-offutt/

That’s some good info for @Ben to work with. He’ll have to take a look at what’s going on.

Thanks, Rod.
Ben, here is my admin info, Backlight 4.0.2


admin
[removed by Ben]

Hi Gary, the short answer is that creating these albums is exceeding the memory limit set on your host.
A quick fix would be to increase the allocated memory from 128M to 256M. How you do this would depend on your host. If you have access to the memory_limit in your PHP settings in your Control Panel, then change it there.
Another option would be to edit the file backlight/.htaccess and add this line:
php_value memory_limit 256M

Does this error only happen when creating HTML5 galleries? If so, what Designer template are you using, and are there specific settings that trigger it?

Thanks, Ben. Still got the error, though. I’ve tried different Designer templates and settings other than what normally use, but it seems not to matter. Still get the memory error.
Thanks for removing the my admin info, guess I should not put it out there in the public.

The error happens no matter when I try to create a HTML5 video gallery or a normal photo gallery. And I upload 3MB photos, 15 at a time and it always has been less than 100 photos and uploading files that way, sas always worked for me.

I’m using my same template that I currently have working on my site for galleries and the template I always use for Video. And I always like to do a “Backlight clear template cache” and also clear my browser cash.

I did go to my cPanel on my server and change the php.ini to say 256. It had been set to 128 but the problem still happens. I did not also edit the " backlight/.htaccess …yet.

…if you think I should edit the backlight/.htaccess as well, where does that line you mention go? -Does it go before after the last line 35 that says …IfModule

To me, it does seem like a PHP memory error or a timeout. If you could use your smarts, Ben. …Perhaps there is something you see by looking at all my PHPinfo file.

Okay, I’m having a developer from my website host call me.
I’m not even to the memory error anymore, I updated to PHP 7.4 and that did not fix the memory crash …but it gave me a new problem of …breaking access to my entire site.

I’m sure my host will fix it but they said there is some code in your Content Management System called Backlight that has old PHP info and that code needs to but updated to work with the new PHP version.

-I’ll keep TurningGate informed on what I find out and what fixes things.
Here’s the error I now get with PHP 7.4.23 and it says Backlight 2 …and it should read Backlight 4 , unless I’ve got some old Backlight 2 stuff on my server that is causing the issues. And my host said these modules are, in fact, installed. I dunno what I’ll discover …but here is the error.

Unable to find the PDO module. Backlight 2 requires the PDO, SQLite and XML modules. Make sure that these modules are installed and enabled.
Deprecated: Directive ‘allow_url_include’ is deprecated in Unknown on line 0

Hi @gary_in_austin, your host has broken something. Those modules should be there. Is there a page on your hosting Control Panel where you can enable those PHP modules?

The error on allow_url_include is also related to your host. They either have a config error in the server’s PHP settings or there is an issue in your .htaccess file at the top of your site that has been caused by the Control Panel trying to change your PHP version.

Thank you, Ben. My host had to roll my site back to PHP 7.1 and they said Backlight wouldn’t work with PHP 7.3 or 7.4 and my site is accessible but when I try to create a Theater album

…I still get error: Something went Wrong - out of memery in PdoExtended.php

If I look at Backlight View PHP Info, it shows PHP 7.1.33 and Core shows memory_limit=256. I am using the Pangolin video templates I always use for about a year with no problems.

256 memory should be enough. That’s the max they allow. What other things should I look for?
(…besides another host provider)

Hi @gary_in_austin, you shouldn’t need anything like 256MB. My site is set to 128MB and doesn’t suffer from this problem. This issue also hasn’t come up for other users, many of whom are likely to have it set to less than 128M.

Can you provide me with FTP access so that I can try and work out exactly where this is happening? The best way is to click on my profile name and then click Message.

Hi @gary_in_austin, please see my reply to your message.

@rod_barbee, the short story is that one of the albums had its parent id set to its own ID. Database queries that tried to navigate up the hierarchy got stuck in a loop until the memory limit was reached. How that happened is unknown.

Well that’s a new one :no_mouth:

Ben has saved the day!

This issue has been resolved but it’s good for others to know about.

The Hosting Company I’m on used to be really great. They got bought out and they are terrible, now. I had 7 or 8 of their “techies” going through my site (none of them fixing the problem and mostly making things worse). -But Ben is a real treasure. You’re great, Ben. How you explained it, was how I saw the PHP code and also the logic and circular behavior I was seeing on the server, itself. Files were triplicating, disappearing, reappearing, …just weird, wild stuff.

For sure, I am leaving HostGator and not touching anything under the conglomerate that is EIG Web Hosting. With Ben’s help I am now able to backup my site in the state it’s in and move my Backlight files to higher ground. And I’m much happier than I’ve been …in several weeks.

3 Likes