I installed XAMPP in a virtual drive and now I can't run its services. Why?
The description is quite long. Please spend some time to read it. ^:)^
I have an old PHP application and I'm trying to test and debug it. Unfortunately, the application uses important data so I can't just click this and that. Now, what I'm trying to do is create a copy of the application in a different computer. From now on, I will call the computer running my original PHP application as 'Computer A' and the computer which I'm going to use to run the copy of the application as 'Computer B'.
To prevent missing link problems since the application contains static paths, such in images or tags, I have to copy all files and folder related to my PHP application from Computer A to the same path in Computer B. Unfortunately, Computer B only has drive C while Computer A has drive D and the files of my PHP application is located in 'D:\xampp\htdocs' in Computer A.
OK, now I have to create drive D in computer B. At first, I tried to create a second partition in Computer B by using PowerQuest Partition Magic 8, but somehow Partition Magic doesn't run in Computer B. I have tried to reinstall it but it still doesn't run. So, another alternative is to cr开发者_JAVA技巧eate a virtual drive. That is what I did. I created a virtual drive by running the 'subst' command in Command Prompt. The virtual drive is D and it refers to a directory, which is 'C:\Virtual'.
After I have drive D in Computer B, I installed XAMPP there. The installation was successful. Now, I also have 'D:\xampp\htdocs' in Computer B. However, when I ran the Apache, MySQL, or Filezilla service, I receive an error message "Error 3: The system cannot find the file specified.". In Computer B, there is no IIS or process using the port 80. What should I do? Please help me.
Many thanks in advance,
Haris
I hope this doesn't constitute cross-posting, here goes...
Subst doesn't instantiate a mount globally, or within the System User / NT Authority, so the server (apache) cannot access it. Apache accesses via the system account, and so it cannot see a subst mount point (so-called).
Following from this: http://msdn.microsoft.com/en-us/library/aa363908%28v=VS.85%29.aspx ...it seems you can instantiate a subst globally via either the win api or possibly directly in the registry using the DefineDosDevice function or method.
Any way you try to do a subst, even using something such as RunAsSystem to attempt to apply the subst command within the system-user context, will fail to produce a viable result.
However, I found that by creating the DosDevice in the registry I have a viable 'subst' mount that apache/mysql/php-win can use. You can also find ways of doing it via wmi, vb, c+, etc, and I do not know if (I doubt) the registry method is directly the same, but here it is...
Example, I want: subst S: C:\PortableUSB
asA.reg file...
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\DOS Devices]
"S:"="\\??\\C:\\PortableUSB"
Or, in the registry it will look like this (so you can manually add it this way)... A String Name of "S:" (without the quotes. Use your preferred DriveLetter, of course) This String's Value is "\??\C:\PortableUSB" (without the quotes. Use your own path, of course)
Requires a restart. The subst is persistent and available globally. I do not yet know how reliable it is, but I am using it with success so far. TwoHawks
精彩评论