|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #8973 In php3 it works, in php4 goes on file permission denied..installation problem?
Submitted: 2001-01-28 22:36 UTC Modified: 2001-03-16 16:51 UTC
From: scratched at ig dot com dot br Assigned:
Status: Closed Package: Filesystem function related
PHP Version: 4.0.4pl1 OS: UNIX/Linux
Private report: No CVE-ID: None
 [2001-01-28 22:36 UTC] scratched at ig dot com dot br

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>
  <p><font face="Arial" size="2">  
    <input type="submit" value="Enviar">
    <input type="reset"  value="Limpar">   

if ($submit = "Enviar") {
$dir = "/home/httpd/html/testes";
$allow = "abcdefgh2ijkm3npqr4stuv5wxyz6789";
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");  


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-01-29 05:10 UTC]
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.

 [2001-03-16 16:51 UTC]
No feedback and most likely user error.


PHP Copyright © 2001-2018 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC