From:             webmaster at 303030 dot com
Operating system: winxp
PHP version:      5.2.9
PHP Bug Type:     Performance problem
Bug description:  file_exists slow performance 

Description:
------------
i have one script which use file_exists 
am upfrading from php4 
after upgrade my page take 7 or 10 seconds to exectuted 
i test the same script under php4 it take less than 1 second
i remove file_exists from the script the page executed less than 1 second

so i bleve that the problem is in file_exists 

Reproduce code:
---------------
<?
$mokhatatpicp="../mokhatatpic/".$row[mokhatatid].".pdf";
$mokhatatpicj="../mokhatatpic/".$row[mokhatatid].".jpg";


 
if(file_exists($mokhatatpicp))
{
$mokhatatpicp="mokhatatpic/".$row[mokhatatid].".pdf";
echo"<a href=#  
onclick=\"showModalDialog('../picview.hnt?myx=$mokhatatpicp&hex=embed%20' 
,'ÓÈÍÇä','width:1200;resizable: yes; help: no; status:no; scroll:
no;');return false;\"  ><img src=../images/image.jpg border=0></a>";
}
elseif(file_exists($mokhatatpicj))
{
$mokhatatpicj="mokhatatpic/".$row[mokhatatid].".jpg";
echo"<a href=#  
onclick=\"showModalDialog('../picview.hnt?myx=$mokhatatpicj' 
,'ÓÈÍÇä','full-screen:yes;resizable: yes; help: no; status:no; scroll:
no;');return false;\"  ><img src=../images/image.jpg border=0></a>";
}
else
{echo "<img src=../images/delete.gif border=0>";}
 
?>

Expected result:
----------------
this only snippt of the code so i didnot expect any result 

Actual result:
--------------
this only snippt of the code so i didnot expect any result 

-- 
Edit bug report at http://bugs.php.net/?id=47911&edit=1
-- 
Try a CVS snapshot (PHP 5.2):        
http://bugs.php.net/fix.php?id=47911&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):        
http://bugs.php.net/fix.php?id=47911&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):        
http://bugs.php.net/fix.php?id=47911&r=trysnapshot60
Fixed in CVS:                        
http://bugs.php.net/fix.php?id=47911&r=fixedcvs
Fixed in CVS and need be documented: 
http://bugs.php.net/fix.php?id=47911&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=47911&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=47911&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=47911&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=47911&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=47911&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=47911&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=47911&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=47911&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=47911&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=47911&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=47911&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=47911&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=47911&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=47911&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=47911&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=47911&r=mysqlcfg

Reply via email to