Page 1 of 1

Portable xampp mysql not working on my computer

PostPosted: 21. August 2014 21:50
by tvasconcelos
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?

Re: Portable xampp mysql not working on my computer

PostPosted: 22. August 2014 12:29
by tvasconcelos
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.

Re: Portable xampp mysql not working on my computer

PostPosted: 22. August 2014 12:52
by Nobbie
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).