Portable xampp mysql not working on my computer

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

Portable xampp mysql not working on my computer

Postby tvasconcelos » 21. August 2014 21:50

Hi, i'm in bit of trouble here, if someone could give some light on this i'd apreciate it. I have xampp 1.7.5 on a USB disk, portable. I need it portable so i can work wen i'm at work, at home, on the go, whatever and i need 1.7.5 because of the php version for a website i'm working on. I installed everything on the USB at the work computer, installed the website and been working on the website. The problem is that when i get home plug the usb to try and continue to work it sends an error on "http://localhost/ubid/index.php" saying:

"Error: SELECT * FROM BPLA_statssettings
No database selected"

I can enter mysql and see the database. I don't know why this happens, if i go to the work computer it all works fine.
Can someone help out on this?
tvasconcelos
 
Posts: 2
Joined: 21. August 2014 21:41
Operating System: windows

Re: Portable xampp mysql not working on my computer

Postby tvasconcelos » 22. August 2014 12:29

Figured it out. In my website, there was a file with the link to the server. As it is in the USB stick, it had the full path with the drive letter, "F:\" at home the USB was granted another letter, so it wouldn't find the database. I changed the path... boom, it works. If anyone knows of a way to have that link in php relative i'd appreciate it.

Hope this can help someone with the same problem.
tvasconcelos
 
Posts: 2
Joined: 21. August 2014 21:41
Operating System: windows

Re: Portable xampp mysql not working on my computer

Postby Nobbie » 22. August 2014 12:52

tvasconcelos wrote:If anyone knows of a way to have that link in php relative i'd appreciate it.


Simply do not provide a drive letter - if there is no drive letter provided, the default drive yields to the currect directory (which is, in case of Mobile Apache, just the driveletter of the USB Stick).
Nobbie
 
Posts: 8761
Joined: 09. March 2008 13:04


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 24 guests