Keyword

Attaching image to item

  • David Talaga
  • David Talaga's Avatar Topic Author
  • Offline
  • New Member
More
12 years 3 months ago #66918 by David Talaga
Attaching image to item was created by David Talaga
I am trying to build a site with Joomla 2.5.4 and K2 2.5.7.

Attaching images causes a blank screen. Not all images do this, but many do and there does not seem to be a consistent relationship regarding the size in kb or pixels. The problem occurs for images as small as 200px and 50kb.

Turning on errors gives the following error:

[code type=php-brief]Fatal error: Out of memory (allocated 11272192) (tried to allocate 3724 bytes) in /homepages/15/d104641567/htdocs/joomla25/administrator/components/com_k2/lib/class.upload.php on line 3161[/code]

Line 3161 is the call:
Log in  or Create an account to join the conversation.

More
12 years 3 months ago #66919 by william white
Replied by william white on topic Re: Attaching image to item
First check to be sure mb_string encoding is enabled on your server, and also increase the php timeout value

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

  • David Talaga
  • David Talaga's Avatar Topic Author
  • Offline
  • New Member
More
12 years 3 months ago #66920 by David Talaga
Replied by David Talaga on topic Re: Attaching image to item
max_execution_time is set to 50000, and I've never seen an error associated with execution time. PHP was configured using '--enable-mbstring=all'


mbstring
Multibyte Support enabled
Multibyte string engine libmbfl
HTTP input encoding translation disabled
libmbfl version 1.3.2

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

  • David Talaga
  • David Talaga's Avatar Topic Author
  • Offline
  • New Member
More
12 years 3 months ago - 12 years 3 months ago #66921 by David Talaga
Replied by David Talaga on topic Re: Attaching image to item
Problem solved. I think. It seems that though the server would return a value of 90M when queried about the memory_limit, the actual memory limit was 10.75M. It's somewhat disconcerting to poll the memory limit variable right before the line that causes the error and find that you should have 8 times more memory. I changed server packages and now the problem is gone.

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

More
12 years 3 months ago #66922 by Thomas
Replied by Thomas on topic Re: Attaching image to item
Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 900 bytes) in /.........../joomla/administrator/components/com_k2/lib/class.upload.php on line 3161

Same mistake... same problem... What about solution?
Does anybody may help, please?

Put your hands on your keyboard and feel the warm of my honest thank.

Litho

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

More
12 years 3 months ago #66923 by Lefteris
Replied by Lefteris on topic Re: Attaching image to item
@Thomas

Your server seems to have a memory limit of 16MB which is verry little. You need to increase it. Otherwise K2 won't be able to upload and resize images.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

More
12 years 3 months ago #66924 by Olga
Replied by Olga on topic Re: Attaching image to item
David, I'm probably experience the same problem, I have 64Mb memory limit (which I suppose should be enough) and the same error occures. Could you specify the solution more in detailes? What should I check or ask my hosting provider to change? Great thanks in advance!

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

More
12 years 3 months ago #66925 by Lefteris
Replied by Lefteris on topic Re: Attaching image to item
@Olga

It's not true that 64MB are enough. I mean it depends on the image. For most of the cases 64MB are enough indeed. But if you are trying to upload a really large image 64MB are not enough.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

More
12 years 3 months ago #66926 by Mark Matheson
Replied by Mark Matheson on topic Re: Attaching image to item
Who is your host?

If it's Site5, they have recently imposed a CPU time limit of 5 sec across their entire fleet and this cannot be overridden with PHP.INI.

If I can identify what script is doing the image upload and hitting the CPU limit, they will apparently increase the CPU time for that one process to 25 secs. I am trying to track this down.

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