Thumb drive installation and perl add-on

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

Thumb drive installation and perl add-on

Postby JoeSmith » 20. November 2007 20:29

Okay, I've been fiddling with this for some time, including doing forum searches, both here and other sites.

I am looking to do a thumb drive install of xampp and the full perl add-on.

From my reading of the the install instructions for XAMMP I understand that I do not use the xampp_setup.bat file for a USB drive installation. However when I update my working XAMPP install (the apache 2.2.4 version) with the full perl add-on my status page reports perl as deactivated. Everything else reports as running fine. I can resolve the perl issue by running the xampp_setup.bat file, which defeats the purpose of the thumb drive installation.

I'm certain the problem lies with my understanding of paths and configuration files, which is limited to say the least. Can someone point me to a tutorial regarding portable web servers that would help a neophyte?

Thanks.
Joe
JoeSmith
 
Posts: 5
Joined: 18. November 2007 21:32

Postby userdude » 20. November 2007 20:43

.bat files are simply text files for running executable commands (think like a plaintext executable), so you can right-click on the .bat and open it in notepad and see what exactly the .bat is doing during installation.

The problem you will run into will be getting the path for a device that inherently will never *know* what it's path is (since it is completely arbitrary).

You could actually run the xampp application using a .bat file, that will run it in such as way as to give you relative paths. Or, you could have it write the current path to a config file and store it on the usb drive on every startup.

You might do web searches on autorun.inf and batch files to see what can be done. I've gotten Firefox to work on USB drives using .inf, and I think that .bat should probably help.
userdude
 
Posts: 5
Joined: 20. November 2007 18:11

Postby JoeSmith » 20. November 2007 21:29

userdude wrote:...
The problem you will run into will be getting the path for a device that inherently will never *know* what it's path is (since it is completely arbitrary).

...


Yes, that is the rub, lol. And the xampp_setup.bat file seems to resolve the perl issue by hardwiring the full, non-relative, path into every script using a shebang line.

I will examine some other .bat files, and do some research on autorun.inf.

Thanks for your response.
Joe
JoeSmith
 
Posts: 5
Joined: 18. November 2007 21:32

Postby Izzy » 20. November 2007 22:03

There is a previous post USB Tips and Tricks (xampp using relative path) that contains a hack that will do this job for you provided by patrick_yi_82 who had trouble with absolute paths on a portable device (I located this using keyword usb in a forum search):
http://community.apachefriends.org/f/viewtopi ... 4289#84289

Extracted from this post:
http://community.apachefriends.org/f/viewtopic.php?t=27332

EDIT
Fixed the link.
/EDIT


===========================================
1. The new DeskTopXampp Launch Control for XAMPP / XAMPPlite
Posted by Ridgewood available from Ridgewood'sDTX web site

2. Build Rich AJAX Applications - Faster
TIBCO General Interface Pro Edition but FREE and Open Source
Fully working with NO donations required to get a user/password
===========================================
Last edited by Izzy on 20. November 2007 22:13, edited 1 time in total.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Postby userdude » 20. November 2007 22:03

Are you running xampp_start.exe to get it going once the drive is ready? From what I understand, if you run xampp_start.exe *through* an .inf file (say, start.inf), that then sets the absolute path to the current drive path. I'm sure that there's something off about that description, but that is what worked for me...

I don't know anything about Perl, though, so other than installing and then replacing all the shebangs with relative paths or creating a program to recursively replace them on startup, I don't know what to tell you!

Can you post the xampp_setup.bat code? Mine has a different name (setup_xampp.bat) and has this inside:

Code: Select all
@ECHO OFF

if "%1" == "sfx" (
    cd xampp
)
if exist php\php.exe GOTO Normal
if not exist php\php.exe GOTO Abort

:Abort
echo Sorry ... cannot find php cli!
echo Must abort these process!
pause
GOTO END

:Normal
set PHP_BIN=php\php.exe
set CONFIG_PHP=install\install.php
%PHP_BIN% -n -d output_buffering=0 %CONFIG_PHP%
GOTO END

:END
pause
userdude
 
Posts: 5
Joined: 20. November 2007 18:11

Postby userdude » 20. November 2007 22:06

/fixed
Last edited by userdude on 20. November 2007 22:40, edited 1 time in total.
userdude
 
Posts: 5
Joined: 20. November 2007 18:11

Postby JoeSmith » 20. November 2007 22:39

Thanks guys,

In my search I did find some information on AMPStart as a launcher, with it's own .ini file. I'm going to fiddle with that next.

And Izzy, I used every search except USB I guess, thanks for the link.

Userdude, we are talking about the same file, I deleted everything last night in order to start fresh and was posting from memory. At my age not such a good idea anymore. I've only been using the control panel to start the services. But I will look at the .bat files and try setting up a .inf if I am not happy with AMPStart. Important for me to be able to hand the stick off to anybody and have it run.

Tonight I will start with fresh clean installs of everything on my USB drive and get back to you folks with my results. Ah Thanksgiving, with the long weekend, :)

I'm starting to do some website development, mostly this is for testing and learning. I'll need to carry the results to different folks, and having everything on the thumb drive set up and working means I could even send someone else the thumb and they could play with the test site. I'll never be a full-fledged website developer, but I want to know enough to ask the right questions of someone else, as well as handle simple updates, changes, and the like on my own.

Thanks.
Joe
JoeSmith
 
Posts: 5
Joined: 18. November 2007 21:32

Postby userdude » 20. November 2007 23:12

I thought this was good for explaining autorun:

http://dailycupoftech.com/usb-drive-autoruninf-tweaking/
userdude
 
Posts: 5
Joined: 20. November 2007 18:11


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 54 guests