Post actualizado el día October 24, 2026 by DeiviSanzPlay
XAMPP is one of the fastest ways to set up Apache, MySQL, and PHP on your machine. Precisely because it brings together so many services, when something fails, the message that appears doesn’t always say what’s wrong. This guide gathers the most common failures and explains how to fix them without reinstalling everything from scratch.
Apache won’t start: port 80 is in use
The classic symptom is that the control panel shows Apache in red or it shuts down within seconds. On Windows, Skype, IIS, or some printing services reserve port 80. Open a console and run netstat -ano | findstr :80; the final number is the PID of the process holding it. If you don’t need it, close it from Task Manager.
A safe alternative is to change the listening port. In httpd.conf, change Listen 80 to Listen 8080 and also adjust ServerName localhost:8080. Remember to update your projects’ URL to http://localhost:8080/.
MySQL stops by itself on startup
If the service appears in green for an instant and then shuts down, check the mysql_error.log file inside xampp/mysql/data. The most frequent causes are:
- Another MySQL or MariaDB installed as a Windows service occupying port 3306.
- ibdata1 or ib_logfile files damaged after an abrupt shutdown.
- Insufficient permissions on the data folder.
For the first case, stop the foreign service with sc stop MySQL or change the port in my.ini. For the second, rename those files and let InnoDB regenerate them; you will lose the previous InnoDB tables, so make a backup first.
“Access denied for user root” error
It occurs when the root password doesn’t match the one saved in phpMyAdmin. Edit config.inc.php and update $cfg[‘Servers’][$i][‘password’]. If you forgot the password, start MySQL with the –skip-grant-tables option, log in without a password, and run ALTER USER ‘root’@’localhost’ IDENTIFIED BY ‘new_password’;.
The page shows “Object not found” or error 404
Apache serves files from htdocs. If your project is in another path, check that the folder is inside that directory or create an alias with Alias /myweb “C:/path/project”. Also verify that the startup file is named index.php or index.html.
PHP is displayed as plain text
It means the PHP module isn’t loaded. In httpd.conf there must be the line LoadModule php_module “C:/xampp/php/php8.x.dll” and, further down, AddType application/x-httpd-php .php. After any change, restart Apache from the panel.
The control panel won’t open
If xampp-control.exe doesn’t respond, your antivirus may be blocking the executables. Add the XAMPP folder to the exclusions and run the panel as administrator. On machines with Windows 11, it also helps to temporarily disable real-time protection during installation.
Prevention: backups and orderly shutdown
Always stop Apache and MySQL from the panel before shutting down the computer; this prevents table corruption. Schedule a periodic export of your databases with mysqldump and save the contents of htdocs in a repository. With these routines, most XAMPP errors are resolved in minutes and without losing work.