Skip to Content Skip to Menu

🎃 Happy Halloween! Treat yourself with an awesome discount on memberships! Get 20% off now with code SPOOKY-2024!

[SOLVED] CB 2.0.9 Joomla 3.4.1 CB Gallery 1.0.3 Some Photos Not Uploading At All

  • LexLodon
  • LexLodon
  • OFFLINE
  • Posts: 9
  • Thanks: 2
  • Karma: 0
9 years 4 months ago - 9 years 4 months ago #265929 by LexLodon
I am a new developer to Community Builder and I have officially hit my first speed bump. I launched a website and users are signing up, but I need them to upload photos into their profile and for some reason, some work, and some don't. I'm running mod_security on my server, so I am trying to investigate that also, but since this site is live now, I am trying to be humble and ask those who are much smarter than me, which may be this entire forum, if you can lend any assistance.

Thank you in advance for all of your help and support.
Last edit: 9 years 4 months ago by krileon.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48473
  • Thanks: 8281
  • Karma: 1443
9 years 4 months ago #265931 by krileon
Anything common about the photos that don't upload? Any errors? What happens when trying to upload? Tested with debug mode and maximum error reporting enabled? My first guess is you're hitting memory limits while trying to upload a very large photo (width by height wise, but filesize can contribute to this issue).


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • LexLodon
  • LexLodon
  • OFFLINE
  • Posts: 9
  • Thanks: 2
  • Karma: 0
9 years 4 months ago - 9 years 4 months ago #265935 by LexLodon
Wow! Thank you for the reply...

I did try to investigate to see if mod_security was the culprit. This is what I am seeing thus far in the error log.

See error_log_text.txt

I was told this by someone else... The "PCRE limits exceeded" error can be caused by a few things, generally if you see this you will also see a different error before hand that can be corrected to prevent the limit from being reached, however there are a few changes required if this does not come whit another error.

As for your questions...

1) There were no specific correlation that I could find between the files. The one that wasn't working was taken with an iPhone 6 and was a 1.8 MB JPG. Not the largest or the only iPhone 6 photo.

2) No visible errors at all. The screen just went white and everything stopped.

3) This issue only occurs during an upload attempt when the specific file does not work.

4) I did not text with Debug Mode or Maximum Errors, however I will attempt to do that now.
Attachments:
Last edit: 9 years 4 months ago by LexLodon. Reason: Moved the output to a file.

Please Log in or Create an account to join the conversation.

  • LexLodon
  • LexLodon
  • OFFLINE
  • Posts: 9
  • Thanks: 2
  • Karma: 0
9 years 4 months ago #265936 by LexLodon
I just turned on Debug Mode and put Error Reporting to Maximum.

This is what I saw...

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 31961089 bytes) in /home/pestalen/public_html/libraries/CBLib/Imagine/Gd/Image.php on line 617

Please Log in or Create an account to join the conversation.

  • LexLodon
  • LexLodon
  • OFFLINE
  • Posts: 9
  • Thanks: 2
  • Karma: 0
9 years 4 months ago #265937 by LexLodon
Someone suggested that I add the following to /usr/local/lib/php.ini

pcre.backtrack_limit = 10000000
pcre.recursion_limit = 10000000

And also add the following to /usr/local/apache/conf/modsec2/custom.conf

SecPcreMatchLimit 150000
SecPcreMatchLimitRecursion 150000

I made both changes, but I am still seeing the error below:

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 31961089 bytes) in /home/pestalen/public_html/libraries/CBLib/Imagine/Gd/Image.php on line 617

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48473
  • Thanks: 8281
  • Karma: 1443
9 years 4 months ago #265938 by krileon
Yup, you're hitting memory limits when the image is trying to process. You've a few options to avoid this. The first is to increase your memory limit, which is currently set at 128mb (recommend 256mb for large photos). Another is to limit the maximum upload size of photos, which doesn't help that much as most of the memory usage is from the photo exploding to raw data. You can also try using ImageMagick which is more optimized than PHP GD2.

Increasing memory limit is likely going to be your best option. The reason for this is you image maybe just 1.8 MB (btw, that's huge for an image; that's like raw uncompressed), but if its say 4000x4000 that's a massive amount of pixel data. Images are processed by their raw pixel data, which takes a ton of memory if you're uploading a huge image.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
The following user(s) said Thank You: LexLodon

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum