Page 1 of 1

fopen() throwing a 500 error

Posted: Wed Sep 06, 2006 5:24 am
by andym01480
Just playing with a script to edit .htpasswd that is safely above public_html on an apache server.

When the script is in the root

Code: Select all

$fh=fopen("../.htpasswd",w);
works fine
When the script is in the next directory down

Code: Select all

$fh=fopen("../../.htpasswd",w);
throws a 500 server error.
Any idea why???

Posted: Wed Sep 06, 2006 7:00 am
by jmut
try using full paths instead of relative and give use exact error using error_reporting(E_ALL)