Search code examples
phppleskmemory-limit

Memory limit not increasing in php.ini on godaddy Plesk


I have been trying to increase memory limit of php.ini file on godaddy Plesk server for 2 days but it is not increasing.

I created php_info file to check the path of my php.ini file. On Plesk hosting of godaddy, my php.ini file is located at following path which is not accessible by me: C:\Program Files (x86)\Parallels\Plesk\Additional\PleskPHP54\php.ini

After reading many answers on the stackoverflow, I have created a file named as php.ini, wrote memory_limit = 256M in it and placed it on the root of my hosting. But still memory limit is not increasing in the php_info as shown here.

Need help. Thanks in advance!


Solution

  • PHP only loads the php.ini file it's configured to. It will not load all files with such name it finds in the request path.

    Once you find out whether PHP is running as CGI OR Apache module you need to set the directive in the file and syntax that documentation explains:

    • .user.ini for CGI
    • .htaccess for Apache

    Alternatively, you can do it in your own PHP code:

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