PHP 4.0 Bug #8973 Updated: In php3 it works, in php4 goes on file permission denied..installation problem?

From: Date: Mon, 29 Jan 2001 10:10:58 +0000
Subject: PHP 4.0 Bug #8973 Updated: In php3 it works, in php4 goes on file permission denied..installation problem?
Groups: php.dev 
Request: Send a blank email to php-dev+get-45265@lists.php.net to get a copy of this message
ID: 8973 Updated by: sniper Reported By: scratched@ig.com.br Old-Status: Open Status: Feedback Bug Type: Filesystem function related Assigned To: Comments: So where does the error occur? I bet this is caused by not having the directory/file readable/writable by the user with which the webserver is running. --Jani Previous Comments: --------------------------------------------------------------------------- [2001-01-28 22:36:58] scratched@ig.com.br HTML> <HEAD><TITLE>Senhas</TITLE></HEAD> <BODY> <?php if (!$submit) { ?><form method="post" action="random.php"> <p><font face="Arial" size="2" color="#006666">RA: <input type="text" name="ra" size="5" maxlength="5"> </font><font color="#006868"><br> hs</p> <p><font face="Arial" size="2"> <input type="submit" value="Enviar"> <input type="reset" value="Limpar"> </font></p> </form> <?php } if ($submit = "Enviar") { $dir = "/home/httpd/html/testes"; $allow = "abcdefgh2ijkm3npqr4stuv5wxyz6789"; srand((double)microtime()*1000000); for($i=0; $i<6; $i++) { $password .= $allow[rand()%strlen($allow)]; } print "Sua Senha: $password<br>"; $fo = fopen("$dir/senhas", "a"); $fw = fputs($fo, "#$ra#$password"); $fc = fclose($fo); $teste = exec("echo "" >> /$dir/senhas"); copy("$dir/senhas", "$dir/senhas.bkp"); chmod("$dir/senhas.bkp", "0644"); } ?> </BODY> </HTML> --------------------------------------------------------------------------- Full Bug description available at: http://bugs.php.net/?id=8973

« previous php.dev (#45265) next »