XAMPP and SD Card Reader (or ANY USB?)

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

XAMPP and SD Card Reader (or ANY USB?)

Postby animnim » 06. February 2017 16:07

Hi

I run events that need a local site available on a number of laptops for customers to use on site. I have a server running the site, and varying amount of laptops for viewing, mostly around 10. XAMPP is fully stable and never causes issues other than the following. It is to view images that are displaying within the site, and the server PC spends its entire day transferring media from storage cards, into the relevant places to be made available for viewing.

A few months ago, I thought my card reader had finally given in, when every time I plugged it in, I received a HTTPD: No Disk error. XAMPP would freeze and laptops would immediately stop, meaning all customers were unable to continue. Removing the USB card reader meant that clicking cancel on the error prompt would make it go away, and XAMPP would immediately work again. Very weird problem. By chance, I replaced both the PC and the card reader and so just totally ignored and forgot about the problem, and put it down to a freak thing, and blamed the old card reader.

It has now happened again, with a new card reader, a new PC, and a fresh copy of XAMPP. Every time I plug in this card reader, the whole thing just stops, displaying the HTTPD: No Disk error. I have a decent understanding of everything involved here, in terms of how XAMPP runs, Apache, SQL and the site I have created and run, but cannot find ANYTHING relevant for how to solve this. Searching brings up a ton of results relevant to Portable versions of XAMPP on a USB but just nothing for XAMPP/Drive Mapping/USB issues.

Why would XAMPP suddenly "fall out" with one particular USB device and halt every time it is connected to the host PC, and how do I solve this? It worked flawlessly for months, including Day 1 of an event, and when we switched everything on Day 2, this weird error appeared.

Any ideas at all? Thanks in advance!
animnim
 
Posts: 4
Joined: 06. February 2017 15:56
XAMPP version: 3.2.2
Operating System: Windows 10

Re: XAMPP and SD Card Reader (or ANY USB?)

Postby Nobbie » 07. February 2017 11:50

I think that is a quite logical behaviour. Unfortunately you dont show any configuration, but i assume, that the card reader is assigned with a drive letter or similar and included as an ALIAS or DocumentRoot or similar in the Apache configuration. When this drive (it is unimportant, whether it is a network drive, a harddisk or a cardreader, its also unimportant whether it is an USB slot or an SATA slot or whatever) fails to run, Apache cannot connect to the above mentioned ALIAS or DocumentRoot or whatever.

The Windows Kernel does not return any value to Apache and therefore Apache waits and hangs. I think, if you (for example) try to read a picture with any tool (lets say Irfan View) it will also simply hang. It is not an Apache issue, it is a Windows Driver issue. Maybe an USB connection with a (mostly very cheap) cardreader is not a very stable connection and if the connection fails, the reading tool (whatever it is - in this case Apache) fails. I dont think that it is good idea to leave the relevant content directly on a cardreader, i also regularly have problems with USB cardreaders, this is not a big issue normally (i simply can restart my laptop if necessary), but for running a 24/7 service i am finding it to unsafe. I would definately copy the contents on a harddrive and deliver it from there.
Nobbie
 
Posts: 13170
Joined: 09. March 2008 13:04

Re: XAMPP and SD Card Reader (or ANY USB?)

Postby animnim » 08. February 2017 21:49

Nobbie

The xampp install is located on C:, the purpose of the card reader is purely to transfer files to the Server PC and plays no part in the XAMPP installation at all. XAMPP has no reason to ever look anywhere besides C: where it is installed.

I agree that it would make sense IF I was running something from the storage cards or they had any role in the XAMPP installation but they don't.

Does that clear it up a little?

Thanks
animnim
 
Posts: 4
Joined: 06. February 2017 15:56
XAMPP version: 3.2.2
Operating System: Windows 10

Re: XAMPP and SD Card Reader (or ANY USB?)

Postby Nobbie » 08. February 2017 22:37

Plugin the SD card to a different PC and copy the files via LAN. It seems to be a WIndows Driver issue anyway.
Nobbie
 
Posts: 13170
Joined: 09. March 2008 13:04

Re: XAMPP and SD Card Reader (or ANY USB?)

Postby animnim » 08. February 2017 23:00

That's what I had to do, and it caused a nightmare. When you need to transfer up to 20,000 full res images per day, and have bought hardware to keep up, having this minor issue stop you in your tracks it kind of renders all of that powerful hardware useless.

Have you got any ideas for a solution?
animnim
 
Posts: 4
Joined: 06. February 2017 15:56
XAMPP version: 3.2.2
Operating System: Windows 10

Re: XAMPP and SD Card Reader (or ANY USB?)

Postby Nobbie » 09. February 2017 12:21

animnim wrote:Have you got any ideas for a solution?


Ask Microsoft. I am pretty sure that this problem is Windows based. Its neither Xampp (Xampp is only a distribution), nor Apache (Apache is built with Microsoft Visual C), it is either a problem of the C Runtime Library (what i dont think) or its a generai problem of WIndows Drivers, i.e. with so called "hot plugged" ports.

Maybe the system runs more stable on a Linux environment (Apache is developed under Linux anyway), it is worth a try. But i dont think that Bitnami / Xampp can do anything about this problem. They only build the packages, there is no development (especially no Apache development).

P.S.: There is one idea left, in Apache there is an Option to use the "sendfile" capability of the Windows Kernel when deliverring files. The Option is called "EnableSendfile" and the default Value is "On" for Apache 2.3 and older and it is "Off" for Apache 2.3.9 and newer. Anyway, you might try both values (EnableSendfile On | EnableSendfile Off) on your Apache installation, simply insert that Option into httpd.conf and restart Apache. If you are lucky, this might fix the problem (it sometimes fixes network problems with slow delivery). See https://httpd.apache.org/docs/2.4/en/mo ... lesendfile for documentation.

Thats the only option i know which might change Apaches behaviour.
Nobbie
 
Posts: 13170
Joined: 09. March 2008 13:04

Re: XAMPP and SD Card Reader (or ANY USB?)

Postby animnim » 21. February 2017 01:06

Thanks Nobbie

It mysteriously disappeared after a few days of not getting anywhere with solving it, but next time it returns I'll give that a shot. There was around 2 months between the first and second time, but it likes to choose extremely stressful and busy times to do it!

Thanks for the info.
animnim
 
Posts: 4
Joined: 06. February 2017 15:56
XAMPP version: 3.2.2
Operating System: Windows 10


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 138 guests