4

I want to edit my php.ini file to allow file uploads. Running phpinfo() tells me that it is located at /usr/local/lib/php.ini. However, I am paying for hosting and can only make these changes via DirectAdmin.

How can I make the change I need to make to my PHP config using DirectAdmin?

Mark Amery
  • 143,130
  • 81
  • 406
  • 459

2 Answers2

1

Alternatively if the php.ini file is located on a shared host and the administrator is not willing to make changes (which often is the case) you can create a ".user.ini" file with the following settings to allow uploading of files. Just adjust the values to your requirements.

max_execution_time = value
max_input_time = value
post_max_size = value
upload_max_filesize = value
memory_limit = value
-1

If you are using ubuntu server, php.ini file is found in apache2 dir

Open php ini file

sudo nano /etc/php5/apache2/php.ini

And change upload_max_filesize and post_max_size in order to increase uploaded file size limit.

Next restart apache server

sudo service apache2 restart

or

sudo /etc/init.d/apache2 restart

Now check phpinfo()

Ijas Ahamed N
  • 5,632
  • 5
  • 31
  • 53