views:

34

answers:

2

hey guys, i'm currently trying to do a little upload-feature for some of my clients, so that they can easily upload larger files onto my server. therefore i did a subdomain uploads.mywebsite.com (which links to /uploads)

inside of this /uploads i have an .htaccess file which asks for a userpasswd

AuthType Basic
AuthName "Uploads to mysite"
AuthUserFile /home/.sites/74/site484/web/.htpasswd
Require valid-user

that works fine, however now i want to add another line in this htaccess file.

suPHP_ConfigPath /home/.sites/74/site484/web/stf/uploads/

as soon as i add this i get an INTERNAL SERVER ERROR.

just so you know i want to add this line to link to a custom php.ini file inside of my /uploads folder to ensure max_filesize etc. is set to a higher value.

any ideas what i'm doing wrong? or why i can't add this line to the htaccess file without causing an error?

regards matt

A: 

I may be mistaken, but certain hosts will configure suPHP to limit scripts from running on files with 777 or 666 permissions. Basically, since you'd be running these scripts as your own user (rather than the web group user that usually runs PHP scripts, which has limited rights), it is potentially a security risk to expose scripts running with those permissions to the internet. Try changing your file permissions to 755 (rwx, rx, rx) or 644 (rw, r, r).

Also worth checking: Make sure all files/folders involved have an owner (do not have "nobody" ownership), and make sure you don't use "php_value" or "php_flag" in your .htacces file (which doesn't appear to be the case, by your description).

wilsona
A: 

Are you sure you're using suExec PHP? If it's just maximum filesize directive, then why not simply put:

php_value upload_max_filesize 100M

in your .htaccess?

racetrack
so i set this in the htaccess file?
if i set php_value upload_max_filesize 500Mphp_value post_max_size 500Mphp_value memory_limit 1000M the same thing happens! Internal server error!
Could you check the apache error log? there should be an explanation of what's wrong.
racetrack
i don't think i have access to this log file.