 |
Linode Forum Linode Community Forums
|
| Author |
Message |
itsjohn
Joined: 31 May 2011
Posts: 21
|
| Posted: Sun Jan 01, 2012 6:45 pm Post subject: php.ini for LAMP |
|
|
I currently have a few virtual hosts running on a linode, each having their own wordpress installation. However depending which virtual host, I want to be able to limit my max uploading size. I've tried copying the php.ini from the /etc/php5/apache2/php.ini to each of the individual virtual host root directory, but its not working... any suggestions?
I'm a complete noob and learning... thanks! |
|
| Back to top |
|
asciant
Joined: 01 Jan 2012
Posts: 1
|
| Posted: Sun Jan 01, 2012 7:45 pm Post subject: |
|
|
Hi itsjohn,
You could try a few methods, the first would be to try using the php ini_set function from within the php files directly, the code would be something like (this equates to 1mb in bytes):
Code: ini_set('upload_max_filesize', '1048567');
Although the above ini_set function is generally not considered to be the best method.
You could also try a .htaccess file or the declaration within the <directory> settings in the vhost configuration within httpd.conf
Code: php_value upload_max_filesize "1048567"
I am no expert, but this may help you. Hopefully some php gurus can clear this up if I am way off track.
Asciant |
|
| Back to top |
|
itsjohn
Joined: 31 May 2011
Posts: 21
|
| Posted: Sun Jan 01, 2012 8:40 pm Post subject: |
|
|
asciant wrote: Hi itsjohn,
You could try a few methods, the first would be to try using the php ini_set function from within the php files directly, the code would be something like (this equates to 1mb in bytes):
Code: ini_set('upload_max_filesize', '1048567');
Although the above ini_set function is generally not considered to be the best method.
You could also try a .htaccess file or the declaration within the <directory> settings in the vhost configuration within httpd.conf
Code: php_value upload_max_filesize "1048567"
I am no expert, but this may help you. Hopefully some php gurus can clear this up if I am way off track.
Asciant
Hey, Thanks!
I tried this in the vhost configuration. I hope this is correct. Is there a more efficient way of doing this?
Code:
<IfModule mod_php5.c>
php_value post_max_size "32M"
php_value upload_max_filesize "32M"
</IfModule>
|
|
| Back to top |
|
| |
|