Informática y Software Práctico

Troubleshooting XAMPP Errors: A Practical Guide

Post actualizado el día October 24, 2026 by DeiviSanzPlay

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

XAMPP is the most popular local development environment for those working with PHP and MySQL. Its simple installation hides, however, a collection of recurring failures that appear right when you’re in the biggest hurry: Apache that won’t start, MySQL that shuts down on its own, the famous time zone error, or port 80 being occupied. This guide gathers the most common problems and their xampp error solution step by step, with clear explanations so you can get back to programming in just a few minutes.

Apache won’t start: the port conflict

The classic symptom is the “Apache shutdown unexpectedly” message in the control panel. Almost always behind it is Skype, IIS, or some Windows service listening on port 80. To confirm it, open a console as administrator and run:

netstat -ano | findstr :80

The final column shows the PID of the process occupying the port. If you don’t need it, close it. If you prefer to coexist with it, edit httpd.conf from Apache’s Config button and change Listen 80 to Listen 8080, and also ServerName localhost:8080. Remember to update the access URL to http://localhost:8080.

MySQL stops unexpectedly

When MySQL shows up in red right after starting, first check whether port 3306 is being used by another instance of MySQL or MariaDB installed previously. The mysql_error.log file, inside MySQL’s data folder, contains the exact clue. Another frequent cause is a corrupted ibdata1 file after an abrupt shutdown: renaming it and letting XAMPP regenerate the system tables usually brings the service back to life, although you’ll lose the user databases, so make a backup first.

Time zone error and root password

When entering phpMyAdmin, the warning “The server is running with the –skip-grant-tables option” or an error related to the time zone may appear. The solution is to edit my.ini and add under [mysqld] the line default-time-zone = ‘Europe/Madrid’ (adjust to your region). If access with the root user without a password fails after an update, open the MySQL console from XAMPP and run ALTER USER ‘root’@’localhost’ IDENTIFIED BY ”; to restore the default local access.

Port 443 and SSL connections

If Apache starts but crashes when loading the SSL module, check that no other program is using port 443. Changing Listen 443 to Listen 4443 in httpd-ssl.conf resolves the conflict. Don’t forget to also modify VirtualHost _default_:443 to keep things consistent.

phpMyAdmin shows session or cookie errors

The message “Cannot start session without errors” is usually due to misconfigured permissions in PHP’s temporary folder. Open php.ini, locate session.save_path and make sure it points to an existing, writable path, for example C:xampptmp. Restart Apache after the change.

Prevention: backups and paths without spaces

Installing XAMPP in a path with spaces or special characters generates failures that are hard to trace. Always use C:xampp. And before touching configuration files, duplicate httpd.conf, my.ini and php.ini: that way you can revert any change in seconds and compare the before and after calmly.

When reinstalling makes sense

If after checking ports, logs and permissions the environment still doesn’t respond, export your databases with mysqldump and your projects from htdocs, and reinstall XAMPP with a stable version. In many cases, a clean environment saves hours of diagnosis and gives you back a reliable local server to keep developing.