To create your custom php.ini, you just need to follow these steps:
1. Create a file named “.user.ini” (without quotes)
2. Place your new .user.ini file in the wwwroot of your application (example: E:\HostingSpaces\Username\www.yourdomain.com\wwwroot\.user.ini) This can be done either through your File Manager in your WebsitePanel or through FTP.
3. Add PHP directives to your new .user.ini file such as:
memory_limit = 600M;
upload_max_filesize = 1000M;
4. Recycle your website’s application pool.
The values you configure in this document will override the master values set in your PHP instance’s global php.ini file, the same way it does on Linux.
The next part is testing our change:
1. Create a phpinfo.php file in your wwwroot root (Example: E:\HostingSpaces\Username\www.yourdomain.com\wwwroot\phpinfo.php)
2. Add the following line to your phpinfo.php file:
<?php phpinfo(); ?>
3. Save phpinfo.php
4. Visit http://www.yourdomain.com/phpinfo.php in your browser.
5. If done followed the steps above correctly, you should now see the new, modified value(s) in the first column, like this:
Looking for quality web hosting? Look no further than Arvixe Web Hosting!
Hi Arian,
I have a problem with php.ini.
Yesterday I couldn’t install joomla because it says ‘MAGIC_QUOTES_GPC’ must be off. However in the php.ini files it is ‘OFF’ also in the cpanel under PHP Settings I try to change to ‘OFF’ but it doesn’t want to.
So now how to do. Do you have any advise ?? Please.
Thks, Alain
Hi,
Please e-mail support@arvixe.com in regards to your issue and include your Arvixe account name. They will need to review your account.
Regards,
Thanks a lot for this 🙂
Hi Arian. i have avrixe windows server and develop a php website.
I tried to change php directives using .user.ini
it works for some directives like upload_max_filesize
but other important directives like upload_tmp_dir or max_file_uploads
can not be changed by .user.ini
i made custom php.ini and .htaccess file in wwwroot
they don’t work neigher.
plese let me know the solution. thx