upload_max_filesize problem

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
cc96ai
Forum Newbie
Posts: 1
Joined: Mon Jan 22, 2007 5:22 pm

upload_max_filesize problem

Post by cc96ai »

Hi ,
I m PHP 5.2.0 / Apache
and I can't access php.ini

I try to update .htaccess
and added
php_value upload_max_filesize "25M"
php_value post_max_size "25M"
However it will give me "Internal Server Error"

>From the log file , i can see the error msg
[Mon Jan 22 14:57:57 2007] [alert] [client 127.0.0.1]
C:/work/www/Joomla-1.0.11_eCommerceEdition_VM-1.0.7/.htaccess: Invalid
command 'php_value', perhaps mis-spelled or defined by a module not
included in the server configuration, referer:
http://joomla/administrator/index2.php? ... ion=config
so I searched on web and try again.. and update the .htaccess

Code: Select all

<IfModule mod_php5.c>
php_value max_execution_time "60"
php_value upload_max_filesize "25M"
php_value post_max_size "25M"
</IfModule>
No Error msg, but nothing change.

then I searched again ....

updated php code - ini_set()

Code: Select all

print "b4 ".ini_get('upload_max_filesize');
ini_set("upload_max_filesize" , "10M");
print "<br/>after ".ini_get('upload_max_filesize');
which I got the same "2M" from the php code

anyone have any idea where should I go ? is this php5 problem ?
or i did something wrong ?


m3mn0n | Be sure to use BB code tags for code posted! Thanks!
User avatar
m3mn0n
PHP Evangelist
Posts: 3548
Joined: Tue Aug 13, 2002 3:35 pm
Location: Calgary, Canada

Post by m3mn0n »

Moving this to the PHP - Code forum.
printf
Forum Contributor
Posts: 173
Joined: Wed Jan 12, 2005 5:24 pm

Post by printf »

In order to to set any value php_value in htaccess file, the directory must allow it!

//Apache

access.conf

Code: Select all

<Directory "/usr/local/apache/htdocs">
AllowOverride Options
</Directory>
By default.... (it's not allowed)

Code: Select all

<Directory "/usr/local/apache/htdocs">
AllowOverride None
</Directory>
pif
Post Reply