Post actualizado el día octubre 29, 2026 by DeiviSanzPlay
XAMPP: why it fails and how to fix it without losing your mind
XAMPP is the most widely used local development environment for testing PHP sites and MySQL databases. Its popularity doesn’t spare it from setbacks: occupied ports, services that won’t start, folder permissions, or mismatched PHP versions are the usual culprits. This guide reviews the most common failures and offers concrete steps to resolve them.
Apache won’t start: the classic port conflict
The most common symptom is the message indicating that Apache stopped unexpectedly. Almost always behind it is port 80 occupied by Skype, IIS, or the World Wide Web Publishing service. To confirm it, open a console and run netstat -ano | findstr :80 on Windows; on macOS or Linux use lsof -i :80. If a foreign process appears, close it or change the listening port in httpd.conf (the Listen 80 line) to 8080. Remember to also update ServerName localhost:8080 and access http://localhost:8080.
MySQL/MariaDB refuses to start
When the panel shows MySQL in red, check the mysql_error.log file inside xampp/mysql/data. Two causes stand out: another MySQL instance already installed on the system or a corrupted ibdata1 file after an abrupt shutdown. In the first case, stop the service in services.msc. In the second, rename the data folder and run mysql_install_db again from the XAMPP console; you will lose the databases, so copy the folder to a safe place beforehand.
403 Forbidden error or access denied to phpMyAdmin
XAMPP’s security configuration restricts remote access. Open xampp/apache/conf/extra/httpd-xampp.conf and locate the <Directory «C:/xampp/phpMyAdmin»> block. Change Require local to Require all granted only if you are working on a trusted network. Save and restart Apache. If the problem persists, check that the actual path matches the declared one, especially when you installed XAMPP on another drive.
PHP doesn’t load extensions or shows the wrong version
Editing php.ini without restarting Apache is a common mistake: the changes don’t take effect. Verify the active path with phpinfo() and make sure you modify the correct file (on Windows, xampp/php/php.ini). If an extension such as mysqli or curl doesn’t appear, remove the leading semicolon from the corresponding line. To coexist with multiple PHP versions, use the control panel selector, which automatically adjusts the Apache module.
Permissions and paths with special characters
Installing XAMPP inside «Program Files» or in a folder with accents causes silent failures in scripts that write files. The recommendation is a simple path, for example C:xampp. On Linux, run chmod -R 755 /opt/lampp/htdocs and make sure your user belongs to the group that owns the folder to avoid write errors when uploading images or generating caches.
The control panel doesn’t respond
If the XAMPP window freezes, close all processes from the task manager (xampp-control.exe, httpd.exe, mysqld.exe) and reopen it with administrator permissions. On some computers with aggressive antivirus, adding the installation folder to the exclusions prevents intermittent blocking of the binaries.
Final check
After each adjustment, restart the modules from the panel and visit http://localhost/dashboard. If the page loads and phpMyAdmin opens without warnings, the environment is operational. Document the changes made in httpd.conf and php.ini: it will save you from repeating the diagnosis on the next update.