.htaccess tutorial

htaccess Elite


htaccess protection stops files from uploading

Using PHP in and with htaccess

htaccess protection stops files from uploading

New postby 99levelsofundo » 04 Apr 2009 20:49

hi -

i'm kinda lost on this one so i am hoping i am in the right place ...

i've been using a simple file upload function in an embedded swf. it calls an upload.php file which uses the move_uploaded_file command to place the uploaded file (~10KB) into a directory called 'temp'. the swf, upload.php file and 'temp' directory all sit in an 'admin' directory. this all works fine. i then wrote and ftp'd to the 'admin' directory a simple htaccess/htpasswd setup which works as expected:

htaccess file:
Code: Select all
AuthName "Restricted Area"
AuthType Basic
AuthUserFile /home/path/a/b/c/username/html/admin/.htpasswd
AuthGroupFile /dev/null
require valid-user


however, now the file uploading never gets anywhere.

i've tried setting all the respective files & directories to all sorts of file permissions, i've tried changing the upload path to a directory outside of the 'admin' one, i've changed the session.save_path and upload_tmp_dir values, i've tried using absolute paths in the php, i've tried setting RewriteEngine to on (not knowing exactly what that does) and i've tried setting safe_mode to on, and setting SecFilterEngine & SecFilterScanPOST to off (just gives me a 500 internal server error). nothing seems to make a difference and because the area i know least about is htaccess, i'm thinking that i am overlooking something there.

it's a shared godaddy account on a linux server.

any help or redirection would be most useful - thanks in advance.
99levelsofundo
 
Posts: 1
Joined: 04 Apr 2009 20:13

Return to PHP and htaccess