-1

I have a VPS server ( with Apache ) using WHM (PHP Configuration Editor). I edited php.ini with this:

;;;;;;;;;;;;;;;;;;;
; Resource Limits ;
;;;;;;;;;;;;;;;;;;;

max_execution_time = 3000
max_input_time = 6000
memory_limit = 3000M
upload_max_filesize = 1024M
post_max_size =  1024M

After update and restarting its showing the updated limit but i am still getting this error

PHP Fatal error: Out of memory (allocated 51118080) (tried to allocate 14588 bytes) in /

PhpmyAdmin > Import is showing

(Max: 50MiB)

my public_html folder does not have any php.ini file.

Yogesh Saroya
  • 1,401
  • 5
  • 23
  • 52
  • 2
    Take a look at your `upload_max_filesize`, and `post_max_size` values. – Matt Jan 07 '16 at 06:59
  • first check which php.ini file the apache is using for php and then edit that file. – Drudge Rajen Jan 07 '16 at 07:04
  • @Matt sorry i have to forgot mention it, i have already updated "upload_max_filesize, and post_max_size" . but same issue – Yogesh Saroya Jan 07 '16 at 07:22
  • Try modifying the options within `Main >> Server Configuration >> Tweak Settings` that say `PHP Max Post Size for cPanel PHP` and `PHP Max Upload Size for cPanel PHP` – Matt Jan 07 '16 at 07:25
  • your problem: http://stackoverflow.com/questions/12707822/how-to-increase-import-size-limit-in-phpmyadmin – Ngô Văn Thao Jan 07 '16 at 07:28
  • It'd be helpful to know **what you're trying to do**, and not simply 'PHP runs out of memory, that is all'. – AStopher Jan 07 '16 at 07:55
  • @cybermonkey what you're trying to do > I am trying to resize image. and it was working fine on old server. i have just move my web into this new server and i am getting this error on this function >> $image = call_user_func('imagecreatefrom'.$types[$size[2]], $url); – Yogesh Saroya Jan 07 '16 at 08:06
  • When running command "php -i | grep memory_limit" inside Your Linux server, then what does it show? – R.P Jan 07 '16 at 08:21
  • @R.P "php -i | grep memory_limit" > it's showing > memory_limit => 1024M => 1024M recently i have update 3000M to 1024M into php.ini – Yogesh Saroya Jan 07 '16 at 08:31
  • Possible duplicate of [Understanding php "Out of memory" error](http://stackoverflow.com/questions/5118927/understanding-php-out-of-memory-error) – Sagar Naliyapara Jan 07 '16 at 08:56
  • @SagarNaliyapara no, its different – Yogesh Saroya Jan 07 '16 at 09:17
  • It might be that somewhere in code, new memory_limit is set and that gets full very fast. Tried to put ini_set('memory_limit', '1024M'); just before the function that causes this problem. Also You can search for memory_limit inside Your code. – R.P Jan 07 '16 at 10:52
  • @R.P already done, but not working. – Yogesh Saroya Jan 07 '16 at 11:33
  • Solution : WHM > Service Configuration » Apache Configuration » Memory Usage Restrictions : here disable "RLimitMEM Settings" and save. – Yogesh Saroya Jan 07 '16 at 16:04

1 Answers1

0

Solution :

WHM >  Service Configuration » Apache Configuration » Memory Usage Restrictions : 

here disable "RLimitMEM Settings" and save.

Yogesh Saroya
  • 1,401
  • 5
  • 23
  • 52