Cannot connect to the database
Cannot connect to the database
The most common cause is a misconfigured
php/conexion.php or a MySQL server that is not running.Open XAMPP (or your local server stack) and verify the MySQL module shows a green “Running” status. Start it if it is stopped.
private $host = "localhost";
private $db_name = "hotel_guevarini_publico";
private $username = "root";
private $password = ""; // often empty on local installs
Open your MySQL client (phpMyAdmin, DBeaver, or MySQL Workbench) and verify that the database
hotel_guevarini_publico exists and contains the 5 tables (roles, usuarios, clientes, habitaciones, reservaciones). If it is missing, re-import base_de_datos.sql.Page shows blank or PHP errors
Page shows blank or PHP errors
A blank white page usually means a fatal PHP error that is being suppressed, or a missing dependency.
If the error references a missing class (commonly
PHPMailer), the vendor/ directory is absent. Run:Check your web server’s error log for more detail. In XAMPP, logs are typically found at
C:\xampp\apache\logs\error.log.Emails are not being sent
Emails are not being sent
The system uses PHPMailer with an SMTP provider (Mailtrap by default) for verification and password-recovery emails.
php/auth/procesar_registro.phpphp/auth/enviar_recuperacion.phpphp/auth/reenviar_verificacion.phpphp/usuarios/guardar_usuario.php$mail->Host = 'sandbox.smtp.mailtrap.io';
$mail->Username = 'TU_USUARIO_SMTP'; // replace
$mail->Password = 'TU_PASSWORD_SMTP'; // replace
$mail->Port = 'TU_PORT'; // replace
Mailtrap’s sandbox environment captures outgoing emails without delivering them to real inboxes, making it ideal for verifying SMTP configuration. Create a free account at mailtrap.io and copy the sandbox credentials into the four files above.
Login fails with correct credentials
Login fails with correct credentials
Newly registered accounts require email verification before they can log in. The
verificado column in the usuarios table must be 1.Use the “Resend verification email” option on the login page to trigger a new verification link if the original email was lost.
base_de_datos.sql includes an UPDATE statement at the bottom that marks the two seed accounts as verified:UPDATE usuarios SET verificado = 1, token_verificacion = NULL
WHERE verificado IS NULL OR verificado = 0;
Forgot-password email is not arriving
Forgot-password email is not arriving
Open
php/auth/enviar_recuperacion.php and confirm that $mail->Host, $mail->Username, $mail->Password, and $mail->Port are all set to valid SMTP credentials.The password-recovery flow only sends an email if the submitted address matches a record in the
usuarios table. Query your database to verify:Permission denied or redirected to login unexpectedly
Permission denied or redirected to login unexpectedly
The most likely cause is an expired PHP session. Navigate to the login page and authenticate again.
Each authenticated view must call
session_start() before any output. If a file emits whitespace or a BOM character before the opening <?php tag, session_start() will fail silently and the session will appear empty. Open the affected file and ensure there are no characters before <?php.Composer install fails
Composer install fails
If the command is not found, download and install Composer from getcomposer.org.
The
composer install command must be executed from the directory that contains composer.json — the project root (CRUD-HOTEL-GUEVARINI-Publico/), not a subdirectory.'Room number already exists' error
'Room number already exists' error
Room numbers (
numero column in habitaciones) are defined as UNIQUE in the database schema. Each room must have a distinct identifier.Choose a different number for the new room. Existing room numbers can be viewed in the Habitaciones section of the dashboard.Getting Help
If you encounter an issue not covered here, open a report on the GitHub repository:- Emir Polito — github.com/EmirPolito
- Irving Mendez — github.com/1RV1N6-M3ND3Z
php -v), web server stack (XAMPP, WAMP, etc.), and any error messages from your PHP or Apache logs.