php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #4208 memory overrun? - is_dir/chmod
Submitted: 2000-04-20 16:05 UTC Modified: 2001-09-09 09:36 UTC
From: janb at ukans dot edu Assigned:
Status: Not a bug Package: Misbehaving function
PHP Version: 3.0.16 OS: DEC UNIX 4.0(C ?)
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: janb at ukans dot edu
New email:
PHP Version: OS:

 

 [2000-04-20 16:05 UTC] janb at ukans dot edu
do-conf:
./configure --with-gd=no --with-imap=/homea/file/bin/srcs --with-oracle=/home/oracle/u01/app/oracle/product/8.0.5 --with-config-file-path=/homea/file/bin --enable-debug=no --with-exec-dir=/homea/file/public_html/cgi-bin --bindir=/homea/file/bin  

php3.ini:
magic_quotes_gpc        =       Off    
track_vars                      =       On           
upload_max_filesize = 260000000 ; max of 260mb files

DEC UNIX 4.0C?

Basically what is happening is, I call is_dir, after having run chmod, and when I look at the perms on the file I chmod'ed, the privs have been changed immediately after calling is_dir

this script doesn't actually show this behavior (I can't isolate it out of my large script), but if you notice the output, it appears to be wrong...

bug.php3 --

#!/homea/file/bin/php
<?php
$dir = "/homea/jan";
$webdir = $dir . "/public_html";
$file = $dir . "/myfile";
 
echo fileperms($file) . "\n";
chmod($file, 0700);
echo fileperms($file) . "\n";
if(!is_dir($webdir)) {
   mkdir($webdir);
}
echo "just did is_dir conditional.\n";   
echo fileperms($file) . "\n";
chmod($file, 0700);
echo fileperms($file) . "\n";        

output -- 

32932
32932
just did is_dir conditional.
33216
33216 



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-09-09 09:36 UTC] sterling@php.net
rtm :), you need to call clearstatcache()
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 19:01:29 2024 UTC