ID: 46629 Updated by: [EMAIL PROTECTED] Reported By: j-e dot zwar at bigpond dot net dot au -Status: Open +Status: Feedback Bug Type: Directory function related Operating System: win32 only PHP Version: 5.2.6 New Comment:
Not sure what's wrong with the installer on your box, but you can fetch a zip, uncompress it and run your test script from the command line. Please try it. Previous Comments: ------------------------------------------------------------------------ [2008-11-24 22:39:18] j-e dot zwar at bigpond dot net dot au Thank you for your recommendation. I tried to install PHP 5.3 (Windows x86 VC9 (thread safe)) installer from windows.php.net/snapshots/ but get a setup error "there is a problem with this Windows Installer package. A script required for this install to complete could not be run. Contact your support personnel or package vendor". I did install the Microsoft 2008 C++ runtime first. ------------------------------------------------------------------------ [2008-11-23 22:53:56] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ ------------------------------------------------------------------------ [2008-11-22 22:40:22] j-e dot zwar at bigpond dot net dot au Thanks for the advice. I changed the permissions and now the lowest level returns TRUE but not the "My Documents" level?? I.e., "C:/Documents and Settings/Fred & Ginger/My Documents/AC Images Test" returns TRUE but "C:/Documents and Settings/Fred & Ginger/My Documents" still returns FALSE. I right-clicked on the directory in Windows Explorer and within the Security tag entered IUSR_COMPUTERNAME (with my computer name) and then ticked the 'full control' box. Any other advice will be appreciated. ------------------------------------------------------------------------ [2008-11-20 19:19:48] [EMAIL PROTECTED] Check permissions. ------------------------------------------------------------------------ [2008-11-20 11:26:55] j-e dot zwar at bigpond dot net dot au Description: ------------ PHP function is_dir does not recognise some of the directories in my PC directory structure. Environment is: . Dell Core 2 Duo PC . Windows XP Pro SP3 . PHP version 5.2.6 . IIS version 5.1 . MySQL version 5.0.51b-community-nt . Dreamweaver MX2004 version 7 as the "text editor" . Internet Explorer version 6.0.2900 . sendmail.exe All running on the Dell PC - i.e., all executions are via 'localhost' Reproduce code: --------------- $dir1 = "C:/AAImages/"; $dir2 = "C:/Documents and Settings/"; $dir3 = "C:/Documents and Settings/Fred & Ginger/"; $dir4 = "C:/Documents and Settings/Fred & Ginger/My Documents/"; $dir5 = "C:/Documents and Settings/Fred & Ginger/My Documents/AC Images Test/"; var_dump (is_dir($dir1)); // returns true (correctly) var_dump (is_dir($dir2)); // returns true (correctly) var_dump (is_dir($dir3)); // returns true (correctly) var_dump (is_dir($dir4)); // returns false (incorrectly) var_dump (is_dir($dir5)); // returns false (incorrectly) But all these directories do exist on my PC and I have checked the spelling carefully. Permissions seem to be OK as I can upload files from the lower level directories via an HTML form OK. Expected result: ---------------- var_dump (is_dir($dir4)) and var_dump(is_dir($dir5)) should both return TRUE, i.e., all of the 5 var_dumps should return TRUE. Have tried it inversely and the same error is apparent - i.e., tried var_dump(!is_dir($dir4)) etc. With the 'not' tests I get false, false, false, true and true. Have also tried it with double backslashes in the directory names instead of the single forward slashes - same error apparent. Have also tried it without the trailing forward slash at the end of each directory name with the same erroneous result. Actual result: -------------- var_dump (is_dir($dir1)); // returns true (correctly) var_dump (is_dir($dir2)); // returns true (correctly) var_dump (is_dir($dir3)); // returns true (correctly) var_dump (is_dir($dir4)); // returns false (incorrectly) var_dump (is_dir($dir5)); // returns false (incorrectly) Any help/advice will be very much appreciated. Thank you in anticipation. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=46629&edit=1