I recently got XAMPP Lite for my USB drive on Windows 7. Everything runs fine from my USB drive, except when run it in browser. Instead, XAMPP Lite on my USB drive reads the htdocs from XAMPP on my computer.

When I look for solutions, I find that I could change my httpd.conf to change the htdocs directory (which was currently led to /xampp/htdocs).

How could I solve this problem so I could lead XAMPP to the right htdocs folder, without adding a drive letter?

| improve this question | | | | |
  • 2
    Are you using XAMPP Lite or XAMPP Portable Lite? Does the XAMPP on the USB key work fine on another computer without XAMPP installed? – Breakthrough Nov 27 '12 at 20:08

XAMPP Portable Lite is configured by default to use relative paths. It's possible you may have launched the setup script, or modified some of the configuration files to use absolute paths by mistake. To correct this, you can execute the setup_xampp.bat script from the USB key. This will allow you to configure the XAMPP installation to use relative paths, effectively recreating the "portable" install.

The setup script listed above will modify the paths in the configuration files automatically. As an alternative to using relative path names, you could also run the script every time you plug the USB key in, to reset the absolute paths automatically.

| improve this answer | | | | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.