Auto Running XAMPP

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

Auto Running XAMPP

Postby MrWilsonUSCG » 04. August 2006 23:08

Hello, searched for a topic but couldn't find anything so sorry if this has been covered.

I am running XAMPP from a USB drive, everything works fine when I go into the drive via "My Computer" and click on the xampp_start.exe file.

I run into a problem when I try and setup autorun. First of all, and this is a separate issue but if anyone can help please do, the autostart I get is not a true autostart, the user has to select and action to continue (in this case it is the launch action I have supplied).

My batch file simply contains this code:
Code: Select all
start \Moodle4Windows\xampp_start.exe /WAIT
start http://localhost/moodle

The problem is when you autorun, the MySQL server does not seem to start, Apache comes through fine but I get a file not found message in XAMPP's console window, then the web page loads with a database error (cannot find the database).

Does anyone know what this may be.

One thing I am wondering about is if the XAMPP_start file is responsible for starting the MySQL server (I assume it is).

Any help is greatly appreciated.
Posts: 8
Joined: 04. August 2006 22:54

Postby MrWilsonUSCG » 07. August 2006 15:16

Just an update, I managed to get the server to start automatically.

Now I have a problem shutting it down. Ideally, since students are forgetful at times, I want the server to shut down once the USB stick is removed. I copied down the xampp_stop executable but realised that this wouldn't work because the server is on the USB and therefore is not there to be shut down. The processes however remain on the PC. Any way to kill XAMPP on or before USB removal?
Posts: 8
Joined: 04. August 2006 22:54

Postby Izzy » 08. August 2006 00:16

I believe you will need to create a script to run when the USB stick is removed from a USB port.

I am not familiar with this process but came accross a small freeware prog that may be of help as it also has a command line version as well as a GUI. It has a component Kill process that will kill a running process and can be linked to other processes via scripting.

The bat files in the xampp directory contains the various command line process which may also come in handy when composing a script to do the job. Not sure though if the running process left behind could be used by inserting a different USB stick. Worth experimenting on that score just for security reasons alone.

Take a look and see if you can do something arround it:

Someone else who reads your post might be more aware of your issue and provide a better and more informative reply.

Just to add... if the running process is started from the USB stick then after removal it would not be able to locate any files that are dependant on that process. Not sure what happens then if the process sleeps or is killed if another process trys to access it. As you can see I am not familiar with the internals of USB.

Good Luck. :)
Posts: 3344
Joined: 25. April 2006 17:06

Postby stgoos » 30. December 2007 13:09

MrWilsonUSCG wrote:Just an update, I managed to get the server to start automatically.

Hi, just started to use XAMPP and I'm running into the same problem. Can you post your solution?
User avatar
Posts: 3
Joined: 30. December 2007 12:57
Location: Netherlands
Operating System: Windows 7 x64

USB configuration for XAMPP

Postby ridgewood » 31. December 2007 16:02

There is an alternative launcher available at (DTX-Launcher) that was designed for USB removable drives and XAMPP (both lite and full versions).

If you use it for the autostart, it will configure XAMPP and start both the Apache and MySQL sessions and launch the default browser... then minimize to the tray.

If the students are going to use it on systems that already have XAMPP installations, there are instructions on how to set up 'alternative porting' so that the USB sessions do not conflict with the ports already in use.

It does NOT create any services and it does not use the TEMP directory. It has a 'soft shutdown' that will close the processes on exit... if a MySQL data base is being used, it is really important to not just 'pull the stick' since data will potentially be corrupted and lost...

Hope that this helps...Happy New Year!
Posts: 57
Joined: 10. January 2005 22:02

Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 70 guests