HomeUnityBlogs
 
 
milenkovski

How do I change the max width and hight of the pics that a user can upload?

I checked there isnt in the admin panel.

So where in the code can I check the max width and hight of the pics that a user can upload? (dimensions in pixels ex. 640x480)

When people try to upload larger pic it shows:

Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 340 bytes) in /home/zapoznaj/public_html/inc/images.inc.php

please help me

bad
0
good
 
 

Comments

LeonidS
LeonidS 180 days agocomment permalink
 
Hello !

Sizes of profile and photo pics can be regulated in admin panel->settings->advanced settings section, find variables there like:

Max width of profile photo (in pixels) or
Max height of profile photo (in pixels).

In current gallery photos we applied check for server's upload_max_filesize and post_max_size - so users can't upload photo with size than 2 this variables. In your case it can be memroy_size_limit less than values of mentioned parameters.

Regards
 
bad
0
good
 
 
milenkovski
milenkovski 180 days agocomment permalink
 
Thank you for your answer

The problem is
When a user uploads a bigger photo (eg. 1200x840), it shows white field instead of the photo. When uploading smaller pic there is no problem.

When I go directly to the photo file (the link ....jpg) it dispayes the photo, so the file is uploaded.
But the problem is that the file isn't displayed in Dolphin, only blank white field and no photo.

How do I change the limit for the uploading picture size?
I'm not sure but it might be the problem.

If I change those parametars
Max width of profile photo (in pixels) or
Max height of profile photo (in pixels).
The it changes me the field in the Dolphin (which is ugly).


The post_max_size problem seems to be another problem not linked to the one mentioned (how ever I set the limit to 8mb) in php.ini


Please some one help me I get this problem constantly
 
bad
0
good
 
View 1 replies to this comment
 
milenkovski
milenkovski 180 days agocomment permalink
 
Thank you for your answer

The problem is
When a user uploads a bigger photo (eg. 1200x840), it shows white field instead of the photo. When uploading smaller pic there is no problem.

When I go directly to the photo file (the link ....jpg) it dispayes the photo, so the file is uploaded.
But the problem is that the file isn't displayed in Dolphin, only blank white field and no photo.

How do I change the limit for the uploading picture size?
I'm not sure but it might be the problem.


If I change those parametars
Max width of profile photo (in pixels) or
Max height of profile photo (in pixels).
Then it changes me the photo field in the Dolphin (which is ugly).


The post_max_size problem seems to be another problem not linked to the one mentioned (how ever I set the limit to 8mb) in php.ini


Please some one help me I get this problem constantly
 
bad
0
good
 
 
nappywet
nappywet 117 days agocomment permalink
 
i got this error also i added ini_set("memory_limit","64M");
just after the <?php open fixed the problem.
 
bad
0
good
 
 
iSalento
iSalento 58 days agocomment permalink
 
Hi nappywet, I have the same problem of milenkovski.
In which php file I have to insert "ini_set("memory_limit","64M"); ???
thanks!
 
bad
0
good
 
 


Post a Comment

Please login to post a comment.

This Post
 
 
milenkovski Blog
All Blogs
Found a bug? Have a suggestion? We really value your feedback!
 
© 2008 BoonEx Ltd
ABN 27 127 966 581
 
PET:0.563526153564