Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject: php.ini for LAMP
PostPosted: Sun Jan 01, 2012 7:45 pm 
Offline
Junior Member

Joined: Tue May 31, 2011 5:28 pm
Posts: 25
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!


Last edited by itsjohn on Sun Jan 01, 2012 9:13 pm, edited 1 time in total.

Top
   
 Post subject:
PostPosted: Sun Jan 01, 2012 8:45 pm 
Offline

Joined: Sun Jan 01, 2012 8:35 pm
Posts: 1
Website: http://www.asciant.com
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

_________________
Always remember to pillage before you burn.


Top
   
 Post subject:
PostPosted: Sun Jan 01, 2012 9:40 pm 
Offline
Junior Member

Joined: Tue May 31, 2011 5:28 pm
Posts: 25
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>


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group