Skip to the content.

Troubleshooting Guide

Introduction

This guide covers common issues encountered when setting up and using WAMP and XAMPP, along with their solutions.

Installation Issues

WAMP: Missing MSVCR/VCRUNTIME DLL Files

Problem: Error message about missing MSVCR110.dll, VCRUNTIME140.dll, or similar.

Solution:

  1. Download Visual C++ Redistributable packages from Microsoft
  2. Install both x86 and x64 versions
  3. Restart your computer
  4. Reinstall WAMP

XAMPP: Installation Blocked by Antivirus

Problem: Antivirus software blocks XAMPP installation.

Solution:

  1. Temporarily disable antivirus software
  2. Run installer as administrator
  3. Add XAMPP installation directory to antivirus exclusions
  4. Re-enable antivirus

Linux: Permission Denied Errors

Problem: Cannot execute installer or access files.

Solution:

chmod +x xampp-linux-x64-installer.run
sudo ./xampp-linux-x64-installer.run
sudo chmod -R 755 /opt/lampp

Service Startup Issues

Apache Won’t Start

Problem: Port 80 Already in Use

Check what’s using port 80:

Windows:

netstat -ano | findstr :80

macOS/Linux:

sudo lsof -i :80

Solutions:

  1. Stop conflicting service (e.g., Skype, IIS):
    • Windows: Services → Stop IIS or World Wide Web Publishing Service
    • Skype: Settings → Advanced → Connection → Uncheck “Use port 80 and 443”
  2. Change Apache port:
    • WAMP: Left-click WAMP icon → Apache → httpd.conf
    • XAMPP: Config → Apache (httpd.conf)
    • Find: Listen 80
    • Change to: Listen 8080
    • Find: ServerName localhost:80
    • Change to: ServerName localhost:8080
    • Restart Apache
    • Access via: http://localhost:8080

Problem: Apache Crashes Immediately

Solution:

  1. Check error logs:
    • WAMP: C:\wamp64\logs\apache_error.log
    • XAMPP: C:\xampp\apache\logs\error.log
  2. Common causes:
    • Syntax error in httpd.conf
    • Missing SSL certificate files
    • Corrupted installation

MySQL Won’t Start

Problem: Port 3306 Already in Use

Check what’s using port 3306:

Windows:

netstat -ano | findstr :3306

macOS/Linux:

sudo lsof -i :3306

Solutions:

  1. Stop conflicting MySQL service:
    • Windows: Services → Stop any other MySQL service
    • Linux: sudo systemctl stop mysql
  2. Change MySQL port:
    • Edit my.ini or my.cnf
    • Find: port = 3306
    • Change to: port = 3307
    • Restart MySQL

Problem: MySQL Service Won’t Start After Installation

Solution:

  1. Check error log (location in configuration file)
  2. Try removing InnoDB log files:
    • Stop MySQL
    • Delete ib_logfile0 and ib_logfile1 from data directory
    • Start MySQL (files will be recreated)

Connection Issues

Cannot Connect to MySQL Database

Error: “Can’t connect to MySQL server on ‘localhost’”

Solutions:

  1. Verify MySQL is running:
    • Check WAMP/XAMPP control panel
    • Services should be green
  2. Check connection parameters:
    $host = 'localhost';  // or '127.0.0.1'
    $port = 3306;
    $username = 'root';
    $password = '';  // default is empty
    
  3. Try 127.0.0.1 instead of localhost:
    • Some systems have issues resolving localhost
  4. Check firewall settings:
    • Ensure MySQL port is allowed through firewall

phpMyAdmin Access Denied

Error: “#1045 - Access denied for user ‘root’@’localhost’”

Solutions:

  1. Reset root password:
    -- Stop MySQL
    -- Start MySQL with --skip-grant-tables
    -- Run:
    ALTER USER 'root'@'localhost' IDENTIFIED BY 'new_password';
    FLUSH PRIVILEGES;
    
  2. Update phpMyAdmin config:
    • WAMP: C:\wamp64\apps\phpmyadmin[version]\config.inc.php
    • XAMPP: C:\xampp\phpMyAdmin\config.inc.php
      $cfg['Servers'][$i]['password'] = 'your_password';
      

Performance Issues

WAMP/XAMPP Running Slowly

Solutions:

  1. Increase PHP memory limit:
    • Edit php.ini
    • Find: memory_limit = 128M
    • Change to: memory_limit = 256M or higher
  2. Optimize MySQL:
    • Increase innodb_buffer_pool_size
    • Enable query cache (MySQL 5.7 and earlier)
  3. Disable unnecessary modules:
    • Disable Apache modules you don’t need
    • Stop services you’re not using

Large Database Import Timeouts

Solutions:

  1. Increase PHP timeouts:
    max_execution_time = 300
    max_input_time = 300
    post_max_size = 128M
    upload_max_filesize = 128M
    
  2. Use MySQL command line:
    mysql -u root -p database_name < backup.sql
    

WAMP Icon Won’t Turn Green

Problem: Icon stays orange or red even though services are running.

Solutions:

  1. Check individual service status:
    • Left-click WAMP icon
    • Check Apache and MySQL separately
  2. Resolve port conflicts:
    • Test with http://localhost
    • If page loads, Apache is working despite orange icon
  3. Reinstall services:
    • WAMP → Apache → Service administration → Install Service
    • WAMP → MySQL → Service administration → Install Service

File Permission Issues

Cannot Create/Edit Files in htdocs/www

Windows Solution:

  1. Right-click htdocs/www folder
  2. Properties → Security tab
  3. Edit → Add your user account
  4. Grant Full Control

macOS/Linux Solution:

sudo chmod -R 775 /Applications/XAMPP/xamppfiles/htdocs
sudo chown -R your_username:_www /Applications/XAMPP/xamppfiles/htdocs

SSL/HTTPS Issues

SSL Certificate Errors

Solution:

  1. Generate new self-signed certificate
  2. Update Apache SSL configuration
  3. Trust the certificate in your browser

Platform-Specific Issues

macOS: “Application is damaged” Error

Solution:

sudo xattr -r -d com.apple.quarantine /Applications/XAMPP

Linux: Cannot Access via Browser

Solution:

  1. Check firewall:
    sudo ufw allow 80/tcp
    sudo ufw allow 443/tcp
    
  2. Check Apache is listening:
    sudo netstat -tulpn | grep apache
    

Getting More Help

Log Files to Check

WAMP:

XAMPP Windows:

XAMPP macOS/Linux:

Community Resources

Prevention Tips

  1. Regular Updates: Keep WAMP/XAMPP updated
  2. Backup Configuration: Save working configuration files
  3. Document Changes: Note any modifications you make
  4. Use Version Control: For your projects
  5. Test First: Try changes on test projects first

Next Steps