July 27th, 2013, 11:47 AM
Getting xampp to work
This has newbie question has probably been answered already in this forum. Sorry for not finding it.
I just installed xampp on Windows 7 and everything looks like it's good to go.
How do I configure it to run my php pages that I'm testing? I'd kinda hoped it would just DO it, but it's apparently not that simple.
July 27th, 2013, 12:04 PM
go to the htdocs folder in the XAMPP installation directory. within that folder make another folder; I called mine sandbox. then put your php files in there. whenever you want to test your php script, just use your browser and go to localhost/sandbox, and you'll get a list of the files in there. note: if you name a file index.php, you won't get the list, it'll only load that file, that's why within the sandbox folder I've made a bunch of other folders.
July 27th, 2013, 01:21 PM
First of all, is PHP even correctly installed/running. A simple phpinfo() will tell you this, or even a simple echo script to say Hi. By default, for MOST installs, htdocs is the default directory hosted. Once you find this folder, simply make sure your PHP is running fine, and you're set to go.
Iunno if you will be sharing any of this server with anyone, but just something out there for thought... Even my development servers have multiple users. htdocs has its own hard drive. Within the htdocs folder is just other folders defined by username. This makes it easy to set up FTP access, and to define something like http://users.whatever.com/(username) until something more direct is set up.
Last edited by Triple_Nothing; July 27th, 2013 at 01:24 PM.
July 27th, 2013, 01:28 PM
Okay, that works. Thanks.
BUT, does this mean I need to do all my development in that directory--i.e. move the entire website into htdocs?
That would be awkward, since I'm developing on top of an existing website, and have some links into the older one.But it would seem necessary in order to keep the links within my new site intact.
So do I just relocate the entire (local) site--old files and new ones--into a new folder in htdocs?
TripleNothing: Yes, it runs the scripts already in the installation, now that I know where to direct the browser. Your reply sounds like the answer to my question above is, Yes, you put everything (the whole website) into htdocs.
July 27th, 2013, 01:32 PM
You can have your directory anywhere on the drive. htdocs is just the default root directory with the install. If you want default to be a folder on the desktop, then alter your httpd.conf as desired. If multiple folder are to be hosted outside htdocs, then look into vhost.
July 27th, 2013, 02:18 PM
That seems to work (after a few frustrating typos!).
Originally Posted by Triple_Nothing
I'll keep this in mind to try later. I'm not sure what vhost is, but can probably find it.
Originally Posted by Triple_Nothing
Many thanks to both of you.
July 27th, 2013, 02:45 PM
For everything I develop locally I work inside c:\xampp\htdocs
To help manage URL paths, consider this:
In your hosts file (C:\Windows\System32\drivers\etc\hosts) add a line like
Then, in one of your apache conf files (probably C:\xampp\apache\conf\extra\httpd-vhosts.conf)
put something like
then flush your dns cache and restart apache (either look it up or restart your computer)
#modify paths as necessary
Options Indexes FollowSymLinks
Allow from all
You'll now be able to go to the url http://local.www.website.co.uk and have it behave as a proper website
July 27th, 2013, 02:57 PM
Northie, the best I can do with this info at this point is file it away for the future. You're way over my head.
While I'm working on a single site and the php is on a relatively small scale, I think I'm okay with just editing the one default. I'll have to grow a bit before I understand what you're describing. Hopefully that time will come.