Xampp 3.2.2 has no access to network drive

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Xampp 3.2.2 has no access to network drive

Postby siriusblack » 20. May 2017 21:37

Hello.

I installed Xampp 3.2.2, but it does not start if there is a mapped network drive in document Root.

Example:

My current configuration is set in C: partition from my machine. (IT WORK'S)
Code: Select all
DocumentRoot "C:/xampp/htdocs"
<Directory "C:/xampp/htdocs">
    Options Indexes FollowSymLinks Includes ExecCGI
    AllowOverride All
    Require all granted
</Directory>


My current configuration is set in D: partition from my machine. (IT WORK'S)
Code: Select all
DocumentRoot "D:"
<Directory "D:">
    Options Indexes FollowSymLinks Includes ExecCGI
    AllowOverride All
    Require all granted
</Directory>


My current configuration on drive X: which represents a mapped network drive. (NOT WORK'S)
Code: Select all
DocumentRoot "X:"
<Directory "X:">
    Options Indexes FollowSymLinks Includes ExecCGI
    AllowOverride All
    Require all granted
</Directory>


I use Windows 7 64 bit and already tried to do pretty much everything I saw on Google.

Thanks.
siriusblack
 
Posts: 3
Joined: 20. May 2017 20:30
XAMPP version: 3.2.2
Operating System: Windows 7

Re: Xampp 3.2.2 has no access to network drive

Postby Nobbie » 20. May 2017 22:28

Mapped drives are valid only for the logind User, but if you run Apache as a service, it is executed by System user, which does not know your drive letters. That is basic Windows knowledge and not a Xampp issue. Instead of a drive letter apply the server and folder name, like //myserver/myfolder as DocumentRoot.
Nobbie
 
Posts: 13182
Joined: 09. March 2008 13:04

Re: Xampp 3.2.2 has no access to network drive

Postby siriusblack » 20. May 2017 22:36

Nobbie wrote:Mapped drives are valid only for the logind User, but if you run Apache as a service, it is executed by System user, which does not know your drive letters. That is basic Windows knowledge and not a Xampp issue. Instead of a drive letter apply the server and folder name, like //myserver/myfolder as DocumentRoot.

Thank you.

But I already did the procedure below and it did not work.
Code: Select all
DocumentRoot "\\192.168.92.128\www"
<Directory "\\192.168.92.128\www">


I also did the procedure of the usb(https://community.apachefriends.org/viewtopic.php?f=16&t=69784) and also did not work.
Code: Select all
%PHP_BIN% -n -d output_buffering=0 %CONFIG_PHP% usb

Do you have any other solution?
siriusblack
 
Posts: 3
Joined: 20. May 2017 20:30
XAMPP version: 3.2.2
Operating System: Windows 7

Re: Xampp 3.2.2 has no access to network drive

Postby Nobbie » 21. May 2017 09:30

siriusblack wrote:But I already did the procedure below and it did not work.
Code: Select all
DocumentRoot "\\192.168.92.128\www"
<Directory "\\192.168.92.128\www">



This is totally wrong - dont you have any Windows knowledge?? You cannot apply simply an IP, it must be a "Windows Share". And of course User System must have sufficient access rights. You have to configure that Share properly on the mentioned Server. As you still do not tell us anything about that "thing", i cannot go any further.

siriusblack wrote:I also did the procedure of the usb(https://community.apachefriends.org/vie ... 16&t=69784) and also did not work.


This is plain nonsense, it is meant for portable Xampp version only (installed on an USB stick). You might have corrupted your configuration by doing this useless step.

I have an alternative idea for your issue:

a) do NOT(!) run Xampp as a service (you have to configure that in the Xampp dialog). Instead start Apache and MySQL NOT automatically and not as a service, after you login to Windows start the Xampp Controlcenter and start Apache and MySQL via Mouseclick. If you do it correctly, Apache and MySQL are NOT running as System user, but instead with YOUR UserId and with the same rights.

b) edit your Apache Configuration and change "X:" into "X:/", as you only provided a drive letter (what is not sufficient), you also have to apply a folder (at least root folder "/").

Then start Apache and try again.
Nobbie
 
Posts: 13182
Joined: 09. March 2008 13:04

Re: Xampp 3.2.2 has no access to network drive

Postby siriusblack » 21. May 2017 14:39

Nobbie wrote:This is totally wrong - dont you have any Windows knowledge?? You cannot apply simply an IP, it must be a "Windows Share". And of course User System must have sufficient access rights. You have to configure that Share properly on the mentioned Server. As you still do not tell us anything about that "thing", i cannot go any further.


I set up a VM with an LInux server (in text mode) with Nginx and compiled Xdebug in PHP 7, but my development environment is on my local machine and I was not able to use Xdebug remotely. So I shared through Samba the Nginx Document Root and installed Xampp on my Windows.

For me it is better to configure Xdebug locally and so I was trying to map my Samba drive to Xampp's Document Root.

Nobbie wrote:This is plain nonsense, it is meant for portable Xampp version only (installed on an USB stick). You might have corrupted your configuration by doing this useless step.


I remember reading that it is not good practice to use in using network sharing, but I had no other choice.

Nobbie wrote:a) do NOT(!) run Xampp as a service (you have to configure that in the Xampp dialog). Instead start Apache and MySQL NOT automatically and not as a service, after you login to Windows start the Xampp Controlcenter and start Apache and MySQL via Mouseclick. If you do it correctly, Apache and MySQL are NOT running as System user, but instead with YOUR UserId and with the same rights.

I did not run Xampp as a service and it still had a problem.

Nobbie wrote:b) edit your Apache Configuration and change "X:" into "X:/", as you only provided a drive letter (what is not sufficient), you also have to apply a folder (at least root folder "/").

I had already tried using the configuration in several ways: "X:", "X:/" and "X: /", but none of them worked out.

Yet I have found a way that is working. I installed Xampp inside within my X: mapping and in Document Root it looked like this:
Code: Select all
DocumentRoot "X:/"
<Directory "X:/">


Thanks for the help and ideas. It's settled. Now I can run Xdebug on my Netbeans perfectly.
siriusblack
 
Posts: 3
Joined: 20. May 2017 20:30
XAMPP version: 3.2.2
Operating System: Windows 7


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 126 guests