View Full Version : xampp

05-04-2011, 08:29 PM
Ok so I have installed xampp and followed this tutorial http://www.thenewboston.com/?p=635&pOpen=tutorial I have managed to get it to work. But it seems to me that I must have my website located in the xampp file....is there a way around this? (I usually store all my files in one "web design file")

05-05-2011, 12:56 AM
use web design file as your local site and make a folder in the xxamp to huose your site copy, this will be the testing server andcan also be your remote if you choose. if you dont work from yor xxamp folder (called probably www or publi_html) it will not function, this is the apache server similar to what you have online

05-09-2011, 09:56 AM
So for me to test my pages successfully I will have to save my pages in dreamweaver, then copy and paste them into the xampp folder...is that correct?

The reason I ask is because I am currently following a a video tutorial on youtube http://www.youtube.com/watch?v=YaII5QhNCH0&feature=relmfu and he is bale to test his pages in Dreamweaver's design view. what do I need to do to be able to check my pages this way?

To be honest, I like the idea of viewing it in Dreamweaver's design view because I'm being lazy. So it's not a major problem to copy and paste into xampp file and view that way, if it's a bit complex to set up

05-09-2011, 10:02 AM
so go follow the youtube vid

05-09-2011, 11:55 AM
the vid doesn't talk about setting anything up with xampp

05-10-2011, 09:35 PM
I still trying to follow the video from youtube which I mentioned earlier and have now come across another problem. At the beginning of the video he talks about setting up a MY SQL database with "your" host. About six minuets into the video he then copies a script from another site and it asks for:


I have put in what I put into xampp when I was completing the security section. Dreamweaver then comes up with this text:

"Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'tony09uk'@'localhost' (using password: YES) in C:\xampp\htdocs\mysite\storeScripts\connectToMySql .php on line 19
could not connect to mysql"

Looking at it I can see that there is a problem on line19. But I didn't write that so I don't know what the problem is, can you please help.

I am assuming its to do with my password or username information which I put in above that line. Do I have to create a mysql database in xampp? (or is my guess not very educated?) and if so how. Or is the simpler option to test it live online?

05-10-2011, 10:26 PM
After a little playing I sorted it.

05-11-2011, 09:02 AM

If I understand your post correctly, you would like to put your website files in development in a seperate folder dedicated to your website projects in a folder outside of XAMPP. rather than in the htdocs folder within the XAMPP. I keep all of my websites in development in a folder on the C:/ drive for easier ready access. To do this you will need to create a virtual host on your C:/ drive. I do this as a matter of routine when I define my site wthin Dreamweaver. Here are my notes for doing so.
(I call my website folder 'vhosts', ie C:/vhosts)

To set up a virtual host for a new site:
1) Open with notebook C:/Windows/System32/drivers/etc (display all files..open the file-> hosts)(make sure to save your edited file without .txt extension ie save in double quotes..."hosts")
--Add (VirtualHostName) to hosts

2) Register virtual host in apache
-Open with notebook C:/xampp/apache/conf/extra/httpd-vhosts.conf (need to look at "all files" and add the following:

<VirtualHost *:80>
DocumentRoot C:/vhosts/(VirtualHostName)
ServerName (Your testeng server name)

3) Add subfolder (VirtualHostName) to C:/vhosts/(VirtualHostName)
4) URL=http://(VirtualHostName)/ (Note this is the local URL, not the web URL.
5) Define site in Dreamweaver and set up testing server.

Here is the hosts file for Windows in C:/Windows/System32/drivers/etc for
3 websites called bodyworks, phoneflix, and earidessence.
# Copyright (c) 1993-2009 Microsoft Corp.
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
# For example:
# rhino.acme.com # source server
# x.acme.com # x client host
# localhost name resolution is handled within DNS itself.
# localhost
# ::1 localhost
# localhost127.0.0.1 localhost127.0.0.1 localhost localhost bodyworks phoneflix earidessence

And the file C:/xampp/apache/conf/extra/httpd-vhosts.conf looks like this:
# Virtual Hosts
# If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
# Please see the documentation at
# <URL:http://httpd.apache.org/docs/2.2/vhosts/ (http://httpd.apache.org/docs/2.2/vhosts/)>
# for further details before you try to setup virtual hosts.
# You may use the command line option '-S' to verify your virtual host
# configuration.
# Use name-based virtual hosting.
NameVirtualHost *:80
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias in any <VirtualHost> block.
##<VirtualHost *:80>
##ServerAdmin webmaster@dummy-host.example.com
##DocumentRoot "/httpd-2.2-x64/docs/dummy-host.example.com"
##ServerName dummy-host.example.com
##ServerAlias www.dummy-host.example.com (http://www.dummy-host.example.com)
##ErrorLog "logs/dummy-host.example.com-error.log"
##CustomLog "logs/dummy-host.example.com-access.log" common
##<VirtualHost *:80>
##ServerAdmin webmaster@dummy-host2.example.com
##DocumentRoot "/httpd-2.2-x64/docs/dummy-host2.example.com"
##ServerName dummy-host2.example.com
##ErrorLog "logs/dummy-host2.example.com-error.log"
##CustomLog "logs/dummy-host2.example.com-access.log" common

<Directory C:/vhosts>
Order Deny,Allow
Allow from all

<VirtualHost *:80>
DocumentRoot C:/xampp/htdocs
ServerName localhost

<VirtualHost *:80>
DocumentRoot C:/vhosts/bodyworks
ServerName bodyworks

<VirtualHost *:80>
DocumentRoot C:/vhosts/phoneflix
ServerName phoneflix

<VirtualHost *:80>
DocumentRoot C:/vhosts/earidessence
ServerName earidessence

For the example above:

c:/vhosts/ has foders within it for bodyworks (c:/vhosts/bodyworks), phoneflix (c:/vhosts/phoneflix), and earidessence (c:/vhosts/earidessence) which is where the actual website files are stored.

Hope this helps.

05-12-2011, 11:32 AM
thanks. I have read and tried to understand it, but i feel i'm out of my depth with this php thing. I can't seem to wrap my head around it. I suppose it will come in time...it took me long enough to understand html and css though :s

I have opted (for ease of use) to just store my files in the xampp folder for now though.

I have been trying to follow a video tutorial series on youtube which talks you through setting up an Ecommerce store but in lesson 2 where he talks about setting up mysql databases and testing them on a server, I get lost....very lost.

He creates a mysql database online...I did the same but with xampp, in phpmyadmin. he then mentions a mysqlconnection script so files can be opened in Dreamweaver. He then changes the host, username, pass and name, which I am confident I have done correctly. He then moves onto using a script to test the connection (this is where I fall BADLY). He uploads the test file to the server and everthing works fine for him, so he moves on. I am trying to test it in xampp, my files are located in the htdocs and in a folder i have created for my website. So I tried this in the address bar:

I also try

and on both I get this message

Object not found!

The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.

If you think this is a server error, please contact the webmaster.

Error 404

12/05/2011 12:26:44
Apache/2.2.17 (Win32) mod_ssl/2.2.17 OpenSSL/0.9.8o PHP/5.3.4 mod_perl/2.0.4 Perl/v5.10.1

Can you please tell me how to test if the mysql database is working I would like to do it through xampp rather than upload it to my server, as i am having issues with them at the moment.

05-13-2011, 12:59 AM
http://localhost/xampp/htdocs/mysite...ysql_quicktest should be


the xampp public_html is yoyr local host

05-13-2011, 04:44 PM
that makes more sense. thanks.

Ive decided I'm going to try following some basic mysql tuts and php tuts before I carry on trying this tutorial series out, I seem to be getting to many simple things wrong.

05-13-2011, 05:05 PM
Try this Tony; http://devzone.zend.com/article/625

05-14-2011, 05:11 AM
Tony, post your email in cantact information or here, and I wll privately contact you and walk you through this by email. It really not that hard to set up the database, install and configure apache and code the scripts for database connection. No cost, I could use the practice.

05-14-2011, 09:26 AM
corrosive, thanks for the link.

Newby, thanks for the offer and I will happily accept.


Although, I will be away for the next week, so will post to let you know when im back, then I will gratefully take up your offer .

05-24-2011, 08:31 PM
Newby, thanks for that offer of walking me though the php sludge, but after a week away and looking at it with fresh eyes I have managed to sort it :D. Although thanks for the offer anyway.

It was two stupid/simple mistakes I was making.