php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #68312 Windows Message Box "php.exe - No Disk"
Submitted: 2014-10-27 19:08 UTC Modified: 2015-09-23 13:17 UTC
Votes:21
Avg. Score:4.3 ± 0.9
Reproduced:19 of 19 (100.0%)
Same Version:9 (47.4%)
Same OS:12 (63.2%)
From: hanskrentel at yahoo dot de Assigned: ab (profile)
Status: Closed Package: cURL related
PHP Version: 5.5.18 OS: Windows 8 64bit
Private report: No CVE-ID: None
 [2014-10-27 19:08 UTC] hanskrentel at yahoo dot de
Description:
------------
When running php.exe like

php --version

a Windows Message-Box (Win API MsgBox) pops up with title "php.exe - No Disk" the error symbol (Circle, background filled in red, white X inside it) with the message "There is no disk in the drive. Please insert a disk into drive F:." and a group of three buttons below (Cancel, Retry and Continue).

If running php.exe like

php --help

The box does not appear.

This does only happen when the system has an USB-stick attached that fakes a drive to invoke a driver then to unmount the drive again so you can't look there in. Somehow the drive is still registered.

I don't know why php needs to access this drive anyway.

With

php -n --version

the message box does not appear. Disabling all extensions in php.ini turns out to not have the message box.

Re-enabling extension after extension turns out that 

extension=php_curl.dll

causes this (curl extension).

I suspect this is related to some default files (e.g. _curlrc) / environment variables.

Looking for file-system-activity with Process Monitor didn't made me spot anything more specific.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-10-28 08:36 UTC] ab@php.net
-Status: Open +Status: Feedback
 [2014-10-28 08:36 UTC] ab@php.net
Tcha, if the program from the stick changes some env, that would affect anything else, not just PHP. procmon might reveal more on what files are claimed http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx .

Thanks.
 [2014-10-28 17:43 UTC] hanskrentel at yahoo dot de
I did already check with procmon for the initial report but couldn't reveal anything substantial. It's perhaps OK to have it documented for the moment. I can hotfix by disabling curl on the fly and/or removing the USB stick from the computer.

If this gets too much on my nerves I'll probably look again.

This is rather esoteric.
 [2014-11-04 17:33 UTC] ab@php.net
-Status: Feedback +Status: Suspended
 [2014-11-04 17:33 UTC] ab@php.net
Ok, lets suspend it then. From how it looks it's not related to PHP itself anyway but to the environment change. If you come to debugging this again, feel free to reopen this.

Thanks.
 [2015-01-21 18:27 UTC] adam at tornadowebhosting dot com
I'm experiencing the same issue. But it's not pointing to a flash drive, it's pointing to a built in SD card slot, that's something I can't easily disconnect.
 [2015-01-28 00:18 UTC] grefix at gmail dot com
Happenend to have this same issue. It appears that the curl extension specifically wants to access the drive with letter F:
Workaround is to remap the drive to use a different drive letter (as it will be used for removable media this shouldn't generate other issues)
 [2015-01-28 17:21 UTC] pworlton at hotmail dot com
Thanks grefix! Your solution worked for me. I remapped my F: drive (an empty card slot) and the message went away. My environment is XAMPP 5.6.3 on Windows 7.
 [2015-03-27 14:38 UTC] joleksow at nerdery dot com
I just wanted to add my thanks to grefix. Remapping my F drive solved the issue for me as well. Thank you!
 [2015-05-11 23:31 UTC] keithm at aoeex dot com
I've been experiencing this issue for a while on my development system. Using process monitor it seems that at some point the file F:\repo\winlibs_openssl_vc11_x86\openssl.cnf is accessed.

My initial test was using PHP 5.6.3.  I downloaded and tried again using 5.6.8 and had no issue.  After a little poking around it seems that replacing the libeay32.dll with the newer one provided in the 5.6.8 package resolves the issue for me.

The newer libeay32.dll results in an attempt to access the file D:\tmp\openssl-1.0.1m\vc11\x86\openssl.cnf.  This fails silently as I do have a D: drive on my system.

I was able to do the same type of workaround with my 5.4 setup which is necessary for some sites I maintain.
 [2015-09-22 14:30 UTC] bob at m2 dot exnet dot com
happens on win7 with PHP 5.6.12 also.  i have no D: drive, except when an phone is  plugged in (that can act as USB memory stick), but has no permission to access the file system, ie, the phone is attached but a valid volume is not mounted.

This bug is sever because it prevents PHP from running, it blocks until a dialog box is clicked on.
 [2015-09-22 21:13 UTC] ab@php.net
-Assigned To: +Assigned To: ab
 [2015-09-22 21:13 UTC] ab@php.net
Finally, the reason is creared out. Thanks everyone involved.

The reason of this bug is - OpenSSL library uses hardcoded paths assigned with --prefix. When none of OPENSSL_CONF or SSLEAY_CONF environmental var was found, that hardcoded path will be used in PHP as well. PHP should use a hardcoded path to c:\usr\local\ssl as prefix as documented here http://php.net/manual/en/openssl.installation.php 

A simple workaround is to set one of those env vars pointing to an existent location. I'm going to fix the hardcoded path issue for the next 5.6+ release.

Thanks.
 [2015-09-22 21:13 UTC] ab@php.net
-Status: Suspended +Status: Re-Opened
 [2015-09-23 13:17 UTC] ab@php.net
-Status: Re-Opened +Status: Closed
 [2015-09-23 13:17 UTC] ab@php.net
I've just rebuilt the latest OpenSSL bins we use. For VC11 1.0.1 series or VC14 1.0.2 series please fetch the latest builds from http://windows.php.net/downloads/php-sdk/deps/ and overwrite the bins. I've also added a test so then it'll always alarm if OpenSSL hardcoded path were different from default.

Thanks.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 08:01:29 2024 UTC