DonationCoder.com Forum

Main Area and Open Discussion => General Software Discussion => Topic started by: barney on November 08, 2012, 12:00 PM

Title: In search of ... help with XAMPP [portable] installation.
Post by: barney on November 08, 2012, 12:00 PM
Folk,
I recently installed XAMPP v1.8.1 on an 8GB USB stick.  Works fine.  Until I try to use it on a WAMP/LAMP machine.  I finally managed to ferret out the places to change the Apache port so that the stick uses 8080.  However, I cannot get MySQL to run when I change the port to 3308 - or anything other than 3306.

This stick is going to be used in a business - my sailing friend's - to track students, courses, dates, grades, course materials shipments ... y'know, all that minor detail stuff that needs to be recorded  ;).  Yes, it should be done on a dedicated machine with a dedicated admin.  Business not big enough to support that, financially, at this time.

Three (3) machines currently in his office, two (2) of which have WAMP installations that cannot be removed.  Rather than move the operator from machine to machine, we want to be able to move the USB stick.  But that's not a viable option until I can get this MySQL conundrum resolved.

I've run multiple instances of MySQL in the past on ports 3306, 3307, & 3308.  (Needed different versions for then current developments being processed.)  So, I know it's possible, or at least, it was.

Every time I've tried XAMPP in the past, I've ended up throwing it out because of configuration issues, but I cannot do that this time - I need to make it work.  (I've asked over at the XAMPP forum (Apache Friends), but get no response  :(  >:(.)  The event and error logs aren't telling me anything useful.  I'm in hopes that some of you here will be able to point out some - probably obvious  :-\ - oversight on my part to get this thing working as it should.
Title: Re: In search of ... help with XAMPP [portable] installation.
Post by: 40hz on November 08, 2012, 12:30 PM
The setting should be in the file my.cnf where port=nnnn

You can try a direct edit rather than trying to do it through MySQL's admin panel. I don't think XAMPP will let you change the port using that.

The only problem is I don't know what ripple-down effect that's going to have on your pHp scriots and everything else that may reference that port number.
Title: Re: In search of ... help with XAMPP [portable] installation.
Post by: barney on November 08, 2012, 01:47 PM
Yep, did that - albeit 'twas my.ini, not my.cnf.  Error message was, "Could not connect:  No connection could be made because the target machine actively refused it."

Only other my.* files are MY.pm and my.pm in the PERL directory structure.

Insofar as I am aware, I've changed every instance of 3306 to 3308 in my.in, httpd.conf, & php.ini.  Also added localhost:3308 to my connect string.  That's what's pulling my cork - technician's version of Hell:  everything is perfect, it just doesn't work  :P.
Title: Re: In search of ... help with XAMPP [portable] installation.
Post by: Shades on November 08, 2012, 02:05 PM
Are you sure that the port you used in the configuration file is open? Could be that firewall/anti-virus software has that port blocked. Are you using a router in the office? Could be that you have to do some configuring there as well (opening and/or forwarding ports).

These are very general hints, but as I do not know 'the lay of the land' it is hard to say anything more useful.
Title: Re: In search of ... help with XAMPP [portable] installation.
Post by: 40hz on November 08, 2012, 03:08 PM
+1 w/Shades. That does sound like a firewall or related security setting somewhere is blocking the call.

It could also caused by the localhost variable in a script. XAMPP may be trying to connect to an instance of MySQL or php which is already active on the desktop machine - and that may be what is actually refusing the connection rather than something internal to XAMPP.

Title: Re: In search of ... help with XAMPP [portable] installation.
Post by: barney on November 08, 2012, 04:09 PM
I'll recheck the router/firewall settings, but I thimk they are OK.

I'll also check to see if there's an errant localhost setting.  The machine in question has no WAMP installation, and as mentioned in the AV thread, I spent some time making certain it was cleared from the registry - that could be suspect, I suppose.  There's certainly something providing a bias toward port 3306  :-\.

Title: Re: In search of ... help with XAMPP [portable] installation.
Post by: 4wd on November 08, 2012, 04:35 PM
I'm as knowledgeable as a bathroom rug when it comes to XAMPP, (or similar), compared to the other guys but I do run my web site on XAMPP, (not portable), on a XP Pro machine.

May I suggest USBwebserver (http://www.usbwebserver.net/en/index.php) for your portable version ?

I use it for carrying around a copy of my web site and the default ports are 8080 and 3308, it has no trouble firing straight up on my XAMPP machine, (80 and 3306).

If you want to change the ports, it's just the settings\usbwebserver.ini - the relevant port changes are passed to apache and mysql.

[ You are not allowed to view attachments ]

If nothing else, maybe you can use it to test whether the machine will run it or another (?)AMPP combo.

EDIT: Otherwise I did notice a server-id parameter in the my.ini files - maybe that needs to change depending on how many iterations of the server you want to run ?
Title: Re: In search of ... help with XAMPP [portable] installation.
Post by: 40hz on November 08, 2012, 04:39 PM
@4wd- Thanks for that link! :Thmbsup:
Title: Re: In search of ... help with XAMPP [portable] installation.
Post by: barney on November 09, 2012, 04:50 PM
Hm-m-m ... having trouble posting today, for some reason.

If this turns out to be a duplicate, so be it  ;).

4wd's suggestion paid dividends.  Not only did it work out of the box, so to speak, but it gave me a couple of ideas that might rescue the XAMPP issues.  Had to make some code adjustments - I use a separate .php file with a monstrous if...then structure that recognizes whether I'm connecting to the development box, to a local server, or to the Web - but I expected that, so no surprises or issues.

Basically, all I did was put USBWebserver on the root of the USB stick, create an htdocs folder and point USBWebserver to it.  Prolly took fifteen (15) minutes from download start to using the Web-app on the stick.  (Mighta been faster, but I went to get a beer while it was downloading  :P.)

What's more, in the process of modifying my connection code page, I thimked :eusa_dance: of a couple of things that might address my XAMPP issues ... will try those later tonight.  Thanks to all of you  :-* :Thmbsup: for the assistance.