ID: 49039 Comment by: sant9442 at gmail dot com Reported By: sant9442 at gmail dot com Status: Feedback Bug Type: CGI related Operating System: win32 only - Windows PHP Version: 5.3.0 Assigned To: pajoye New Comment:
> Are you sure about the last line of the > processmonitor log? > G:\files\php\php5-3-1-snapshot\pwephpinfo.php NAME NOT FOUND > As it is not only missing a back slash but the path > itself is completely wrong. It should have been: > D:\wc63\http\pwe\phpinfo.php Correct, that is part of the bug I already mentioned - a lost slash. There seems to be a path parsing bug either +1 or -1, and the slash is lost. It is what it is in the processmon logs. If I recall, it was related to the length of the sub-folder. 3 or less caused a pointer offset issue. 4 or more was ok. Also, as I indicated, it may be an intermittent issue, a pointer is off, and depending on the machine and OS, it could point to a low load memory (all zeros, no problem) or high load memory (all ones, a problem) or just random (intermittent). That was determined because of the two machines testing was done (2000 and XP), I could reproduce under XP but not 2000. Same code, same scripts, running from shared drives. That tells me there is subtle memory/pointer issue as you can see with the processmon log indicated a parsed path with a missing slash. > If you still get the same (wrong) results, please give me > a way to reproduce it. I wish I could give you more that I already did. Right now, on my XP development box, I have to use PHP 5.2.6 with the directory structure I provided with the junction and 3 letter pwe sub folder. Can't use 5.3 as we proceed with updates. We even had a small vote in our developers support forum if we should change the name of the PWE example folder name to something longer (WCPHP). But it was concluded that this is a PHP problem and we had the faith it will be eventually fixed. So no need to change documented material and distribution folder names. I wish I had more time to debug the code, step by step, but the time I did when I was actively investigating it, I was able to step thru the debugger and see a path slash was lost at some point. I just don't recall exactly where in the code because there was a lot steps and what appeared some recursion. Don't remember, but when the junction tip was investigated, that is where I decided to use ProcessMon to see what was different between 5.2 and 5.3. The lofic is definitely different - no doubt there. But I can't tell ya is that is the issue or this path parsing issue is the root cause of the problem. There are three ways to resolve it: 1) Don't use PHP 5.3 2) Don' use Junctions 3) Rename the PWE folder to something longer. Given the evidence, I vote its the pointer problem that may just alter the changed symbolic link logic or the changed itself produced the subtle pointer bug. Who knows! Previous Comments: ------------------------------------------------------------------------ [2009-08-13 23:35:47] 1minus1 at gmail dot com Hi! I've just upgraded from PHP 5.2.10 to PHP 5.3.0 and had a problem similar to the discussed one: every attempt to load (with Apache) any php web page failed with the following error: Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0 Fatal error: Unknown: Failed opening required 'C:/usr/www/test.php' (include_path='.;C:\php5\pear') in Unknown on line 0 After a while I happened to understand that the problem is related to symbolic links (directory junctions). On my system (Win XP SP3) the "C:\usr" folder is a junction to "D:\usr". The easiest way to reproduce this bug is by calling the CLI PHP interpreter. C:\>type c:\usr\temp\test.php <?="OK"?> C:\>php c:\usr\temp\test.php Could not open input file: c:\usr\temp\test.php C:\>php d:\usr\temp\test.php OK --- 5 minutes later --- Hmmm... I tried to reproduce the problem on some other "artificially created" folders and symlincs, and I happened to be unable to do so! And what is more, when I removed the "c:\usr" junction and re-created it - the problem (with Apache and the example above) disapeared! I don't know now how to interpret the problem, maybe that was a "bad link" (in some way), but the fact is: it *happened* and I've clearly seen it happening several times with 5.3 and not happening with 5.2. At least I hope my report can help some googling "poor guys" like me to to get a clue on what is happening. :) ------------------------------------------------------------------------ [2009-08-10 15:18:09] [email protected] Which windows version do you use? ------------------------------------------------------------------------ [2009-08-10 15:17:13] [email protected] Hi, I was not able to reproduce this problem using: F:\wc63>dir <JUNCTION> http [F:\wc63\http-1234] <DIR> http-1234 and the following call: ..\obj\Debug_TS\php-cgi.exe f:\wc63\http\pwe\t.php X-Powered-By: PHP/5.3.1-dev Content-type: text/html included F:\wc63\http-1234\pwe script being: <?php echo "included\n"; print_r(getcwd()); Are you sure about the last line of the processmonitor log? G:\files\php\php5-3-1-snapshot\pwephpinfo.php NAME NOT FOUND As it is not only missing a back slash but the path itself is completely wrong. It should have been: D:\wc63\http\pwe\phpinfo.php If you still get the same (wrong) results, please give me a way to reproduce it. Using one directory tree (D:\wc63\http with D:\wc63\http-1234 for example) and how exactly you call php. ------------------------------------------------------------------------ [2009-07-23 23:15:20] sant9442 at gmail dot com Sure thing! Btw, take a look at the last line for the 5.3 Process Monitor dump, where it shows: G:\files\php\php5-3-1-snapshot\pwephpinfo.php NAME NOT FOUND Notice that it is missing a slash, so it seems its pointer movement is off by one somewhere in the code, and I think this might be part of the GPF that might occur as mentioned in bug #49040. Thanks ------------------------------------------------------------------------ [2009-07-23 23:02:57] [email protected] Thanks for the clear explanation :) Ok, so it may be related to a bug with junctions and symlink in 5.3. I will check it while working in the other related bugs (august, not before :). ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/49039 -- Edit this bug report at http://bugs.php.net/?id=49039&edit=1
