Common Issues
mod_rewrite Not Working
Symptoms:- 404 errors on all pages except homepage
- “Not Found” errors when accessing routes
- URLs like
/songsdon’t work
1. Enable mod_rewrite module
1. Enable mod_rewrite module
- Ubuntu/Debian
- CentOS/RHEL
- XAMPP
2. Enable .htaccess support
2. Enable .htaccess support
Your virtual host must allow
.htaccess overrides:3. Verify .htaccess exists
3. Verify .htaccess exists
Check that If missing, create it with the correct content from server setup.
/public/.htaccess exists and is readable:4. Check file permissions
4. Check file permissions
The
.htaccess file must be readable by the web server:Database Connection Errors
Symptoms:- “Could not connect to database” errors
- PDO exceptions
- Blank pages when accessing database-dependent routes
MySQL socket connection error
MySQL socket connection error
If you see “Can’t connect to local MySQL server through socket”:Change This forces PDO to use TCP instead of socket connection.
DB_HOST from localhost to 127.0.0.1:404 Errors on All Routes
Symptoms:- Homepage works, but all other routes return 404
- Apache error: “File not found”
Test .htaccess is working
Add this to the top of Visit
/public/.htaccess:http://yoursite.com/test. If you’re NOT redirected to Google, .htaccess is not being processed.Remove the test line after checking.Permission Denied Errors
Symptoms:- “Permission denied” in error logs
- 403 Forbidden errors
- Cannot read/write files
Replace
www-data with your web server user:- Ubuntu/Debian:
www-data - CentOS/RHEL:
apache - Mac:
_www
PHP Version Compatibility
PHP 7.0+ Error Class Issue
Solution: MINI has been updated to useProblem instead of Error.
If you see errors about the Error class:
- Update to the latest MINI version (already renamed to Problem)
- Or manually rename:
application/controller/error.php→problem.php- Inside the file, change
class Error→class Problem - Update references in
application/core/application.php
The project was written in PHP5 times, but with the release of PHP7 it’s not possible anymore to name a class “Error” as PHP itself has a internal Error class now. Renaming was the most simple solution.
PHP 8.0+ Compatibility
MINI is not extensively tested with PHP 8.0+ but should work fine. Report issues on GitHub.
- Deprecation notices for certain syntax
- Type juggling changes
- Named parameters
application/config/config.php
nginx Issues
PHP files downloading instead of executing
Cause: PHP-FPM not configured correctly. Solution:-
Verify PHP-FPM is running:
-
Check socket path in nginx config:
-
Test nginx config:
404 errors with nginx
Check thetry_files directive:
Subdirectory Installation Issues
Symptoms:- Application works on root domain but not in subdirectory
- CSS/JS not loading in subdirectory
- Routes broken in subdirectory
1. Verify auto-detection is working
1. Verify auto-detection is working
MINI auto-detects subdirectories. Check Debug by adding temporarily:
application/config/config.php8:2. Ensure .htaccess is present
2. Ensure .htaccess is present
The
/public/.htaccess must be present in the subdirectory:3. Check base href in templates
3. Check base href in templates
If CSS/JS not loading, verify paths in
application/view/_templates/header.php use the URL constant:Blank White Pages
Symptoms:- Completely blank page
- No error messages
- Nothing in browser console
Debugging Tips
Enable Development Mode
application/config/config.php
Debug PDO Queries
MINI includes a PDO debugger tool:application/libs/helper.php.
Check Apache/nginx Logs
Test PHP Configuration
Createinfo.php in /public:
http://yoursite.com/info.php and check:
- PHP version
- Loaded extensions (PDO, pdo_mysql)
- Configuration directives
Test URL Rewriting
Createtest.php in /public:
- Direct access:
http://yoursite.com/test.php→ Should work - Routed access:
http://yoursite.com/home→ Should show MINI page
Performance Issues
Slow Page Load
Enable OPcache
Enable OPcache
For PHP 5.5+:Restart Apache/PHP-FPM after changes.
php.ini
Optimize database queries
Optimize database queries
Use the PDO debugger to identify slow queries:Add indexes to frequently queried columns.
Check database connection
Check database connection
Ensure
DB_HOST uses the fastest connection method:- Socket:
localhost(fastest, if available) - TCP:
127.0.0.1(if socket fails)
Getting Help
GitHub Issues
Report bugs and request features
Stack Overflow
Ask questions and search existing answers
Documentation
Browse the complete documentation
Source Code
View the source code on GitHub
When reporting issues, include:
- PHP version (
php -v) - Web server (Apache/nginx) version
- Operating system
- Error messages from logs
- Steps to reproduce
Quick Reference Checklist
PHP requirements
✅ PHP 5.3.0+ installed
✅ PDO and pdo_mysql extensions enabled
✅ Error reporting configured
✅ PDO and pdo_mysql extensions enabled
✅ Error reporting configured
Web server
✅ mod_rewrite enabled (Apache)
✅ Virtual host points to
✅ AllowOverride All set
✅
✅ Virtual host points to
/public✅ AllowOverride All set
✅
.htaccess present and readableDatabase
✅ MySQL installed and running
✅ Database created
✅ Tables imported
✅ Credentials in config.php correct
✅ Database created
✅ Tables imported
✅ Credentials in config.php correct
Next Steps
Back to Server Setup
Review server configuration steps
