xampp and wamp for local development

Discuss general web development questions. Help others and get help from others.

Moderator: kfury77

xampp and wamp for local development

Postby t8xt » Thu May 09, 2013 6:47 am

Hi,

Was having problems with xammp being to slow on Windows 8 then I tried wamp and it was slow too. Here's what I did to fix the problem and now everything is very fast.

Try it in this order, the first one may solve the problem without editing the host file. It seems either Windows 8 has a problem with mysql driven websites running locally being accessed by going to http://localhost or mysql has the problem, but doing this fixed my problem of websites running slow.

Simply change your mysql connection string from localhost to 127.0.0.1
Code: Select all
$hostname = "localhost";

to
Code: Select all
$hostname = "127.0.0.1";


Next if this did not work and xampp or wamp is still slow you may have to edit the host file, here's how.
Run windows notepad.exe as administrator from the command prompt. To do this go to the Windows 8 classic desktop and right click the task bar on the left side to get the power tools menu and select "Command Prompt (Admin)" once the command prompt is open type notepad.exe or notepad both are the same, you will get a user access prompt to run notepad.exe click yes.

Next in Notepad open the host file from C:\Windows\System32\Drivers\etc\ you will have to change the document type to "All Files" to see the host file.
Next make your host file look like these lines below and save the host file. You will have to restart Apache and Mysql or just restart your computer. Note: editing the host file did not speed things up, it wasn't until changing the mysql connection string that things got a whole lot faster.

# localhost name resolution is handled within DNS itself.
127.0.0.1 localhost
127.0.0.1 127.0.0.1
# ::1 localhost
t8xt
 
Posts: 15
Joined: Thu Apr 11, 2013 9:52 am

Return to Web Developer Talk

Who is online

Users browsing this forum: Bing [Bot] and 1 guest

cron