Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|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

1 Answer 1

up vote 2 down vote accepted

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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