Overview
RALQ is a PHP-based web application that uses MySQL for data storage and includes modern frontend technologies like Tailwind CSS for styling. This guide covers both Docker deployment and traditional server setup.System Requirements
Minimum Requirements
PHP
Version 8.2 or higher
Web Server
Apache with mod_rewrite enabled
Database
MySQL 5.7+ or MariaDB 10.3+
Node.js
Version 14+ (for building frontend assets)
Recommended Specifications
- RAM: 2GB minimum, 4GB recommended
- Storage: 500MB for application + database
- PHP Extensions: mysqli, json, session
- Browser Support: Modern browsers with WebGL support for 3D models
For AR features to work, end users need mobile devices with ARCore (Android 7.0+) or ARKit (iOS 11+).
Quick Start with Docker
The fastest way to deploy RALQ is using Docker.Prerequisites
Run the Container
Start the RALQ container:The application will be available at
http://localhost:8080Traditional Server Installation
For deployment on a traditional LAMP/LEMP stack:Install Node.js Dependencies
RALQ uses Tailwind CSS for styling:The Build the CSS:
package.json includes:package.json
Database Setup
Create the Database
Connect to MySQL:Create the database:
The database name
registro_RALQ is hardcoded in the application configuration.Configuration
Database Connection
Update the database credentials inphp/validar.php:
File Structure
Ensure these key files are properly configured:Running the Application
Verify PHP Configuration
Check that PHP is working:Test Apache and PHP:Visit
http://your-server/test.php to verify PHP is running.Test Database Connection
Create a test file:Access it via browser to verify the database connection.
test-db.php
Access the Application
Navigate to your server:
- Landing page:
http://your-server/index.php - Registration:
http://your-server/registro.php - Login:
http://your-server/iniciosesion.php
Troubleshooting
Common Issues
Database Connection Failed
Database Connection Failed
Symptoms: Error message “Conexión fallida” on any pageSolutions:
- Verify MySQL is running:
- Check credentials in
php/validar.php - Ensure the database exists:
- Check MySQL user permissions:
3D Models Not Loading
3D Models Not Loading
Symptoms: Empty spaces where molecules should appearSolutions:
- Check browser console for errors (F12)
- Verify
.glbfiles exist in themodelos/directory - Ensure file paths are correct in PHP files
- Check file permissions:
- Verify model-viewer CDN is accessible
AR Features Not Working
AR Features Not Working
Symptoms: AR button doesn’t work or camera doesn’t openSolutions:
- Verify device supports AR (ARCore or ARKit)
- Ensure HTTPS is enabled (AR requires secure context)
- Grant camera permissions in browser
- Test on a different device
- Check that AR links are valid in
estructuras-mol.php
Session Not Persisting
Session Not Persisting
Symptoms: Gets logged out immediately or can’t access menu.phpSolutions:
- Check PHP session configuration:
- Verify session_start() is called at the beginning of protected pages
- Check session directory permissions:
- Review session code in menu.php (line 2)
Styles Not Applying
Styles Not Applying
Symptoms: Pages look broken or unstyledSolutions:
- Verify Tailwind CSS was built:
- Rebuild CSS:
- Check that CSS files are referenced correctly in HTML
- Clear browser cache (Ctrl+Shift+R)
- Verify CDN link is working:
Apache Rewrite Issues
Apache Rewrite Issues
Symptoms: 404 errors on certain pagesSolutions:
- Enable mod_rewrite:
- Verify AllowOverride is set in Apache config
- Check for .htaccess file conflicts
Debug Mode
Enable PHP error reporting for debugging:Performance Optimization
Caching
-
Enable OPcache for PHP:
php.ini
-
Browser caching for static assets:
.htaccess
CDN for 3D Models
For better performance, consider hosting large.glb files on a CDN:
Security Hardening
Next Steps
User Management
Implement admin panel for managing registered users
Backup Strategy
Set up automated database backups
Monitoring
Configure server monitoring and error tracking
Scale Up
Deploy load balancers for high-traffic scenarios
Support
If you encounter issues not covered in this guide:- Email: [email protected]
- Check logs:
/var/log/apache2/ralq_error.log - PHP errors: Check your configured error_log path
- Database: Review MySQL error log
This installation guide is based on RALQ’s current architecture. Future updates may require additional configuration steps.