.htaccess - 500 Internal Server Error

Status
Not open for further replies.

deadimp

New Member
Messages
249
Reaction score
0
Points
0
Is there a way I can set an .htaccess file for a directory? I need it for my CMS demo to limit uploads to 128KB.
This is what I tried:
Code:
# Limitations for the demo

php_value upload_max_filesize 128K
But it threw me that error...

I'd add more, but I need to get some sleep.
 

Corey

I Break Things
Staff member
Messages
34,553
Reaction score
204
Points
63
Try ini_set like Brandon said, we don't allow you to override PHP variables in your .htaccess file.

-Corey
 

deadimp

New Member
Messages
249
Reaction score
0
Points
0
I tried using ini_set(), but it didn't affect the value:
Code:
ini_set('upload_max_filesize','128K');
echo "Max: ".ini_get('upload_max_filesize');
It still returned 15M. Funny thing is, it doesn't allow me to change it via ini_set() on my test server either.
 
Last edited:

Corey

I Break Things
Staff member
Messages
34,553
Reaction score
204
Points
63
Weird, well.. we don't allow values to be overridden for security reasons via .htaccess . Only other thing option would be to try to place a php.ini file in there with it set. But again I think we have it disabled =\

-Corey
 
Status
Not open for further replies.
Top