How to change PHP.ini "upload_max_filesize" on Debian 6?

If none of the more specific forums is the right place to ask

How to change PHP.ini "upload_max_filesize" on Debian 6?

Postby pe7er » 2011-11-22 22:34

How can I change PHP's "upload_max_filesize" on my local PC?
I use Debian 6 and have installed PHP from a Debian repository.

phpinfo() shows me that "Loaded Configuration File" is /etc/php5/apache2/php.ini
So in that file I have edited
Code: Select all
; Maximum allowed size for uploaded files.
; http://php.net/upload-max-filesize
upload_max_filesize = 2M
I've changed that in upload_max_filesize = 10M and restarted Apache.

However, phpinfo() still shows "2M" while the php.ini file says "10M".
I suspected that Suhosin was interfering so I uninstalled that and restarted Apache.
But that didn't work.

I also tried to put a .htaccess file in the webfolder with
Code: Select all
php_value upload_max_filesize 10M
but it did not work either.

What am I doing wrong?
Can anyone give me some pointers?
Kind regards, Peter Martin
Joomla specialist http://www.db8.nl & Linux User Group Nijmegen http://www.linuxnijmegen.nl
pe7er
 
Posts: 4
Joined: 2011-09-18 20:45
Location: Netherlands

Re: How to change PHP.ini "upload_max_filesize" on Debian 6?

Postby mikejonesey » 2011-11-22 22:49

the easyest way to test ini configs to to use the php ini confic command ie;

<?php
ini_config("param to change",value to change);
phpinfo();
?>

in my php projects i use this to dynamicly change debug output for when admin is loged in...
My personal website with blog n apps
http://www.mikejonesey.co.uk/
User avatar
mikejonesey
 
Posts: 69
Joined: 2011-06-22 13:05

Re: How to change PHP.ini "upload_max_filesize" on Debian 6?

Postby pe7er » 2011-11-23 11:18

Thanks!
However, I was looking for a way to change "upload_max_filesize" for my whole system.

What can I do to get the "upload_max_filesize" change in /etc/php5/apache2/php.ini implemented on my local webserver environment?
Kind regards, Peter Martin
Joomla specialist http://www.db8.nl & Linux User Group Nijmegen http://www.linuxnijmegen.nl
pe7er
 
Posts: 4
Joined: 2011-09-18 20:45
Location: Netherlands

Re: How to change PHP.ini "upload_max_filesize" on Debian 6?

Postby mikejonesey » 2011-11-23 13:07

if you are sure the propetry is inserted correctly make sure you are editing the correct php.ini file

sudo updatedb
sudo locate php.ini

?

just tested on my local, edited the default location php.ini and changed upload_max_filesize to 10m and it shows in phpinfo... the only thing i can think of is you are useing a different php.ini, localised to your build...

did you build from source?
My personal website with blog n apps
http://www.mikejonesey.co.uk/
User avatar
mikejonesey
 
Posts: 69
Joined: 2011-06-22 13:05


Return to General Questions

Who is online

Users browsing this forum: No registered users and 11 guests

fashionable