Jump to content

installing wampServer


son.of.the.morning

Recommended Posts

Well i am trying to run a site which i built by using a hosting site with out any apache or anything like that on my computer, i copied all the site files to the folder wamp/www/... opened the local host and ran the page and it keeps coming up that there is a error connecting to the db host, which is the host site i have been using. Maybe this is extremely stupid but i am new to the whole server side thing and i have never used anything like wamp/apache before ( in my defence :P).

Link to comment
Share on other sites

and it keeps coming up that there is a error connecting to the db host, which is the host site i have been using.

Your host most probably doesn't accept remote database connections.

 

You will be better of extracting your database(s) from your host and importing them locally.

Link to comment
Share on other sites

wamp server is 100x better then xamp

 

I use xampp because it installs itself quickly, then I update the binaries to the latest myself. I'm using "xampp" with PHP 5.3.3, Apahce 2.2.15, MySQL 5.1.50. I use it basically for it's directory structure and do the rest myself. I prefer LLAMP (lighttpd the second L) with proxying requests when needed for static files.

Link to comment
Share on other sites

and chance the local host to my web host on every page that has a connection?

You should change the way you're connecting to mysql. Rather than type out this

$conn = mysql_connect('localhost', 'user', 'pass') or die('MySQL Error: ' . mysql_error());
mysql_select_db('database') or die('MySQL Error: ' . mysql_error());

each time to connect to mysql, take those lines and place them into a seperate PHP file, for example call this new file dbconn.php

 

Now whenever you want to connect to mysql you just need to include that file

include 'dbconn.php';

That way if you need to make a change to your database credentials all you need to do is edit just that one file.

 

But to answer your question yes you will need to alter your database credentials in each file. However if you do as I said above then it'll save you alot of time.

 

If i was to exstract my data bases and store them localy, when i have finished developinging the site i would i have to put them back on to the server

Yeah once you have finished developing then you'll transfer your database over to your site.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.