开发者

Error: Allowed memory size of 67108864 bytes exhausted

开发者 https://www.devze.com 2023-01-19 00:17 出处:网络
When I upload a picture File size: 375kb Width: 2000px Height: 3000px I get an error ERROR Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to

When I upload a picture

  • File size: 375kb
  • Width: 2000px
  • Height: 3000px

I get an error

ERROR Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 2157 bytes) in...

Why this happen, when 67108864 = 64MB?

I use a shared server. My .htaccess is:

<IfModule mod_rewrite.c> 
   RewriteEngine on 
   RewriteRule    ^$ webroot/    [L] 
   RewriteR开发者_如何转开发ule    (.*) webroot/$1 [L] 

</IfModule> 

where must I write php_value memory_limit 128M?


It seems you only have 64M (67108864 / 1024 / 1024) allocated to PHP.

If you have access to your php.ini, increase the max memory size.

You can also do it in a bootstrap PHP script.

ini_set('memory_limit', '128M');

Or even in your .htaccess

php_value memory_limit 128M
0

精彩评论

暂无评论...
验证码 换一张
取 消