How to make XAMPP more portable with CMS using absolute path

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

Is it useful for You?

Yes
2
67%
Maybe in future
0
No votes
No
1
33%
 
Total votes : 3

How to make XAMPP more portable with CMS using absolute path

Postby koteek » 23. April 2008 11:37

This solution is for portable version of XAMPP wih installed CMS (such as Joomla!) that use absolute path.

Hi! I'm using XAMPP for web demonstrations from my portable USB HDD. In this case i'm using it on different Windows machines and the drive latter is different for each machine. The problem was to use CMS (Joomla) as it use absolute path (I:\\xampp\\htdocs...). In this case I have to change this setting in CMS for each machine. The solution is to use the virtual drive with usualy unused drive latter (W: for example). I've wrote the bat file to do this and it works(put it in xampp directory):

@ECHO Starting XAMPP Portable...
@ECHO OFF
set Disk=%1
IF "%Disk%"=="" set Disk=w
subst %Disk%: /D
subst %Disk%: "..\xampp"
%Disk%:
@ECHO Stoping apache, mysql, filezilla and mercury if running...
@ECHO OFF
xampp_stop.exe
@ECHO Starting XAMPP Control Panel Application...
@ECHO DO NOT CLOSE THIS WINDOW!!!
@ECHO OFF
xampp-control.exe
xampp_stop.exe
subst %Disk%: /D
exit

after run it use setup_xampp.bat from virtual drive to config. Thats all.
Simply run created bat file to start XAMPP. After exit from Control Panel it stops services and unmounts virtual drive. It will be great if somewone will improve this ability, because it very useful.
Tested on XP and Vista 64. Subst - is internal windows nt command.
Please reply if You know other solution for this problem.
Sorry for my English, i'm from Russia.

http://portableapps.com/node/12985
koteek
 
Posts: 1
Joined: 23. April 2008 11:15

Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 45 guests