PHP错误 - “驱动器中没有磁盘”

How come when I run php from the command prompt I get a message from php.exe saying "There is no disk in the drive. Please insert a disk into drive F:." What does drive F have to do with anything?!

I can still do PHP commands, but it sure is annoying to have that message pop up whenever I run it.

OK, I found it is an unresolved bug in PHP https://bugs.php.net/bug.php?id=68312 and some people just remap their F: drive to something else, which I did with these instructions that I found:

Run regedit and find the following key.

HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices
Right-click "\DosDevices\G:" and then click Rename.
Rename it to "\DosDevices\M:" or your preferred letter. 
Restart your computer and remap your drive.

UPDATE:

Better solution from that same linked page: just create an environment variable called "OPENSSL_CONF" with a value of "C:\". Some bug having to do with OpenSSL. It just needs a path that exists to point to to stop the error. I don't think it matters what the path is as long as it isn't something unreliable like a removable media drive.

I just logged off Windows and logged back on and the message has gone.

Go to http://windows.php.net/download/ and:

For PHP 5.4 download "VC9 x86 Non Thread Safe" zip file For PHP 5.6 download "VC11 x86 Non Thread Safe" zip file Extract it and put binaries in phpdesktop-chrome/php/ directory.

The "VC9 x86 Non Thread Safe" for php 5.4 worked for me. I only had to take the root files of the "VC9 x86 Non Thread Safe" and dump them in the phpdesktop-chrome/php/ directory. Because the php.ini file is renamed to put it into production all of your settings stay intact. Thanks Mohamed.