Preguntas y Respuestas

XAMPP Apache Port 80 Error Fix 2026

Post actualizado el día octubre 29, 2026 by DeiviSanzPlay

Why XAMPP fails and how to diagnose it without losing your mind

XAMPP is the most widespread local development environment for testing PHP and MySQL sites. However, its apparent simplicity hides an ecosystem of interdependent services (Apache, MySQL/MariaDB, FileZilla, Mercury) that, when one of them stumbles, blocks the entire workflow. Before reinstalling, it is worth understanding that most failures have repetitive causes and concrete solutions.

Apache won’t start: ports 80 and 443 in conflict

The classic symptom is the message that Apache stopped unexpectedly. It is almost always due to another program occupying port 80. Skype, Windows IIS, some Adobe services, or even the «World Wide Web Publishing» service itself may be listening. To confirm it, open a console and run netstat -ano | findstr :80 on Windows; on Linux or macOS, sudo lsof -i :80. The final column shows the PID of the offending process.

If you can’t disable that program, change Apache’s ports: in the XAMPP panel click Config next to Apache, open httpd.conf, and replace Listen 80 with Listen 8080 and ServerName localhost:80 with ServerName localhost:8080. Repeat the change in httpd-ssl.conf for port 443. Then access http://localhost:8080.

MySQL shuts down by itself or doesn’t respond

A MySQL that starts and dies within seconds usually carries a corrupted table or a damaged ibdata1 file after a power outage. Check xampp/mysql/data/mysql_error.log: if «InnoDB: Database page corruption» appears, you can try to recover with innodb_force_recovery = 1 in my.ini. If the error is «Another MySQL daemon already running», there is a zombie process: on Windows close it with Task Manager; on Linux, sudo pkill mysqld.

Access failure with root without a password due to an outdated config.inc.php in phpMyAdmin is also common. Edit that file and adjust the credentials to the real user and password.

403 Forbidden error when opening a project

The browser shows «Access forbidden» because the project folder lacks an index file or because permissions block reading. Check that index.php or index.html exists, and on Linux assign chmod -R 755 to the folder inside htdocs. If you work with symbolic links, enable Options FollowSymLinks in the <Directory> directive of httpd.conf.

phpMyAdmin returns error 1045

Code 1045 indicates rejected credentials. Open phpMyAdmin/config.inc.php and verify that auth_type is ‘cookie’ or ‘config’, and that user and password match those of MySQL. If you forgot the root password, stop MySQL, start it with –skip-grant-tables, change the password with ALTER USER, and restart the service.

Extension errors and modules not loaded

Messages such as «PHP Startup: Unable to load dynamic library» when starting Apache point to an extension referenced in php.ini that does not exist or is incorrectly commented out. Check that the line extension=mysqli does not have a semicolon in front of it and that the extension_dir path points to the actual ext folder of your installation. After any change to php.ini, restart Apache for it to take effect.

Best practices to prevent future failures

Run XAMPP as administrator on Windows, avoid installing in paths with spaces or accents, and stop the services before shutting down the computer so that InnoDB closes cleanly. Keep backups of htdocs and of the databases with mysqldump. With these routines, errors stop being crises and become simple, controlled incidents.