Installer
ComusThumbz Installation System
Document Version: 1.0.0
Last Updated: 2026-01-02
Applies To: ComusThumbz v1.11.14+
Location: /install/index.php
Overview
The ComusThumbz Installation System is a comprehensive 7-stage web-based installer that guides users through the complete setup of a new ComusThumbz installation. The installer handles everything from verifying server requirements to creating database tables, generating configuration files, setting up folder permissions, and creating the administrator account.
[Screenshot: installer-welcome-screen]
Key Features
- 7-Stage Installation Process - Guided step-by-step setup
- Real-Time Requirement Checking - Validates PHP, MySQL, and external tools
- Batch Database Import - Handles large schema files without timeout
- Dynamic Configuration Generator - Creates
config.inc.phpwith user-provided values - Folder Permission Management - Creates required directories with proper security
- Password Strength Validation - Enforces strong admin passwords
- Reset Functionality - Allows starting over including database cleanup
System Requirements
Before running the installer, ensure your server meets these minimum requirements. The installer will check these automatically in Stage 1.
PHP Requirements
Required PHP Extensions
Required PHP Functions
These functions must NOT be in
disablefunctions in php.ini:External Tools (Verified in Stage 1)
Server Requirements
Installation Requirements
Database Tables Created
The installer creates over 200 database tables through the schema file. Key tables created include:
/install/schema/schemacomplete.sql and contains all table definitions, indexes, and default data.Config Variables Generated
The installer generates ct/dat/config.inc.php with the following configurable values:
// Database Configuration
$dbhost = 'localhost'; // Database host
$db = 'databasename'; // Database name
$dbuser = 'databaseuser'; // Database username
$dbpasswd = 'password'; // Database password
$dbprefix = 'tbl'; // Table prefix
// Site Configuration
$domain = 'example.com'; // Site domain
$sitename = 'Site Name'; // Site name
$sitedesc = 'Description'; // Site description
$siteemail = 'admin@example.com'; // Admin email
$sitekeywords = 'keywords'; // SEO keywords
$sitepath = '/ct'; // Path to ct folder
// License Configuration
$licensekey = 'XXXX-XXXX-XXXX-XXXX';
$licenseemail = 'license@email.com';
// Image Sizing
$WSIZE = 220; // Thumbnail width
$HSIZE = 180; // Thumbnail height
$MODWSIZE = 260; // Model image width
$MODHSIZE = 400; // Model image height
$CATWSIZE = 260; // Category image width
$CATHSIZE = 400; // Category image height
// Error Handling
$error404URL = ''; // 404 redirect URL
$dberrorurl = ''; // Database error redirect
// Security
$jwtsecret = 'generatedsecret';
$pwhash = 'generatedhash';
$akey = 'generatedkey';
Folders Created with Permissions
Security Files Created
The installer creates .htaccess files to secure sensitive directories:
For /ct/logs, /ct/dat, /ct/cache:
Order deny,allow
Deny from all
For /ct/uploads and /assets/uploads:
# Prevent PHP execution
<FilesMatch "\.ph(p[3457]?|t|tml|ps)$">
Order allow,deny
Deny from all
</FilesMatch>
Allow media files
<FilesMatch "\.(jpg|jpeg|png|gif|webp|mp4|webm|m3u8|ts)$">
Order allow,deny
Allow from all
</FilesMatch>
Prevent directory listing
Options -Indexes
File Dependencies
Features & UI Elements
Header and Branding
[Screenshot: installer-header-branding]
The installer features a branded header with:
- COMUSTHUMBZ Logo - Orbitron font with accent bar
- Icon Row - Five feature icons (Video, Gallery, Models, Cams, Templates)
- Progress Bar - Visual indicator of installation progress (stages 1-7)
- Stage Navigation - Clickable stage indicators showing completion status
Stage Progress Indicators
Each stage shows one of three states:
- Completed (Green checkmark) - Stage finished successfully
- Current (Highlighted) - Active stage being worked on
- Pending (Gray) - Not yet reached
Navigation Buttons
Stage-by-Stage Guide
Stage 1: System Requirements
[Screenshot: stage-1-requirements]
Purpose: Verify that the server meets all requirements for ComusThumbz.
Checks Performed:
- PHP Version - Must be 8.0 or higher
- Required Extensions:
- PDO, pdomysql, mysqli
- GD, cURL, mbstring, json
- session, fileinfo, openssl
- Optional Extensions:
- ImageMagick, zip, exif
- php.ini Settings:
- memorylimit (256M minimum)
- maxexecutiontime (300 seconds minimum)
- postmaxsize, uploadmaxfilesize
- File Permissions:
- /install/ writable
- /ct/dat/ writable (or parent writable)
- External Tools:
- FFmpeg availability
- FFprobe availability
- ImageMagick convert command
Status Indicators:
- ✅ Passed - Requirement met
- ⚠️ Warning - Recommended but not critical
- ❌ Failed - Must be fixed before proceeding
If critical requirements fail, you cannot proceed. Fix the issues on your server and refresh the page.
UI Elements:
- Requirement cards grouped by category
- Pass/Fail status badges
- Expandable details for each check
- "Re-check Requirements" button
Stage 2: Database Setup
[Screenshot: stage-2-database]
Purpose: Configure database connection and import the complete schema.
Form Fields:
Process Flow:
- Enter database credentials
- Click "Test Connection" to verify
- If successful, click "Continue" to import schema
- Batch import processes SQL statements in groups of 20
- Progress bar shows import status (percentage complete)
- Results show success count and any errors
Batch Processing:
- Uses AJAX to prevent timeout
- Processes 20 statements per batch
- Automatically continues until complete
- Foreign key checks disabled during import
- Errors logged but non-blocking for duplicates
[Screenshot: stage-2-batch-import-progress]
Error Handling:
- Connection failures show specific error message
- Schema import errors are collected and displayed
- "Table already exists" errors are normal for re-runs
Stage 3: Configuration Generator
[Screenshot: stage-3-config]
Purpose: Generate the main configuration file ct/dat/config.inc.php.
Form Sections:
Site Information
Path Configuration
License Configuration
Webmaster Information
Error Handling URLs
Thumbnail Size Configuration
Database Summary:
- Displays configured database settings from Stage 2
- Read-only confirmation of connection details
Output:
- Generates complete
config.inc.phpfile - Creates secure random keys (JWT secret, password hash, etc.)
- Sets timezone and logging configuration
If the config file cannot be written automatically, the content is displayed for manual copy/paste.
Stage 4: Folder Structure
[Screenshot: stage-4-folders]
Purpose: Create all required directories with proper permissions.
Folder Categories:
Core Directories - ct/dat, ct/logs
- Log Directories - api, videoprocessor, storageservers, cron
- Upload Directories - videos, images, galleries, avatars, temp
- Creator Directories - creatoravatars, creatorcovers, creatorposts
- Cache Directories - templates, api
- Admin Directories - exports, backups
- Frontend Directories - assets/uploads
Status Indicators:
- 🟢 Ready - Folder exists and is writable
- 🟡 Will Create - Folder will be created
- 🔴 Not Writable - Exists but permissions need fixing
Summary Statistics:
- Total Folders: Count of all required directories
- Already Ready: Directories that already exist and are writable
- To Create: Directories that will be created
Security Files:
After folder creation, .htaccess files are automatically added to:
- Prevent direct access to logs and config
- Block PHP execution in upload directories
- Disable directory listing
If folders fail to create, you may need to manually create them with proper ownership (www-data or your web server user).
Stage 5: Default Data Import
[Screenshot: stage-5-data-import]
Purpose: Import essential default data for the system to function.
Import Options:
Menu Categories Created:
- Help (Documentation, Getting Started, FAQ, Support)
- Import (Video Import, Gallery Import, FTP Uploads, CSV Import)
- Database (Videos, Galleries, Models, Categories, Tags)
- Engine (Page Builder, Widgets, Components)
- Templates (Template Manager, File Editor, Style Manager)
- Pages (All Pages, Create Page, Menu Manager)
- Traffic (Click Reports, Analytics, Sources)
- Reports (Dashboard, Video Stats, User Activity, Revenue)
- Robots (Cron Jobs, Scheduled Tasks, Processing Queue)
- Tools (Storage Servers, Video Processor, Cache Manager, API Tester)
- Multi (Sites, Sync Settings)
- Settings (General, Users, Feature Toggles, Creators, License, Backups)
Sample Categories Created:
- Popular, Recent, Featured, Trending
- HD, Amateur, Professional, Vintage
If data was already imported during schema creation (Stage 2), the import will show "Already imported" and skip those items.
Stage 6: Admin Password
[Screenshot: stage-6-admin-password]
Purpose: Set the administrator password for accessing the admin panel.
The admin panel uses password-only authentication. There is no username - just the password. Keep it secure!
Password Requirements:
- Minimum 8 characters
- At least one uppercase letter (A-Z)
- At least one lowercase letter (a-z)
- At least one number (0-9)
- At least one special character (!@#$%^&)
UI Features:
- Password visibility toggle (eye icon)
- Real-time requirement checklist
- Password strength meter (Weak → Fair → Good → Strong)
- Visual feedback as you type
Security Recommendations Displayed:
- Use a unique password
- Store in a secure password manager
- Enable 2FA after installation
Storage:
- Password is hashed using bcrypt (PASSWORDBCRYPT)
- Stored in tblSettings.adminpassword column
- Also written to config.inc.php for legacy auth
Stage 7: Finalization
[Screenshot: stage-7-finalization]
Purpose: Perform final verification and complete the installation.
Final Verification Checks:
Installation Summary:
- Site Information (name, email, path)
- Database Details (host, name)
- Admin Login URL with password display
- System Info (version, PHP version, server)
Post-Installation Security Reminders:
- Delete Install Directory - Remove /install folder after completion
- Secure Config Files - Set config.inc.php to 644 permissions
- Enable Two-Factor Authentication - Set up 2FA in admin settings
- License Registration - Register at comusthumbz.com
What's Next Steps:
- Access Admin Panel
- Configure Settings
- Setup Content (import videos, galleries)
- Configure Cron Jobs
Installation Marker:
Creates ct/dat/.installed file containing:
{
"installedat": "2026-01-02 10:30:00",
"version": "1.11.14",
"installerversion": "1.0.0",
"siteemail": "admin@example.com",
"sitename": "ComusThumbz"
}
Welcome Screen (Stage 0)
[Screenshot: installer-welcome-screen-full]
Purpose: Landing page before starting installation.
Elements:
- Welcome message explaining ComusThumbz
- "Before You Begin" checklist:
- Database credentials ready
- PHP 8.0+ with required extensions
- Write permissions on installation directory
- FFmpeg installed (for video processing)
- Begin Installation button - Starts Stage 1
- Resume Previous Installation - If session exists
- Reset Installation button - Clears all progress and database tables
Reset Installation Feature
[Screenshot: reset-confirmation-dialog]
Purpose: Allow starting completely fresh if issues occur.
What Reset Does:
- Drops All Database Tables - Removes all tables with configured prefix
- Deletes Configuration File - Removes ct/dat/config.inc.php
- Clears Session Data - Resets all installation progress
- Returns to Welcome Screen - Fresh start
Reset is destructive! All database tables with your configured prefix will be permanently deleted. This cannot be undone.
Confirmation Dialog:
Shows warning message requiring explicit confirmation before proceeding.
Error Handling:
If cleanup fails (e.g., database connection issues), warnings are displayed on the welcome screen but installation can still proceed.
Completion Screen
[Screenshot: installation-complete]
Purpose: Shown after successful completion of all 7 stages.
Elements:
- Success celebration message with checkmark
- Access Admin Panel button - Direct link to ctlogin.php
- View Your Site button - Link to frontend
- Final reminder to delete /install folder
- Documentation link
Troubleshooting
Common Errors and Solutions
Error: "Could not connect to database"
- Verify database exists and credentials are correct
- Check MySQL service is running
- Ensure user has proper permissions (SELECT, INSERT, UPDATE, DELETE, CREATE, ALTER, DROP)
Error: "Failed to write config.inc.php"
- Check that ct/dat/ directory exists and is writable
- Verify web server user has write permissions (chown www-data:www-data ct/dat/)
- As fallback, manually create the file with displayed content
Error: "Some critical folders could not be created"
- SSH into server and create folders manually
- Set ownership:
chown -R www-data:www-data ct/ - Set permissions:
chmod -R 775 ct/uploads ct/logs ct/cache
Error: "Schema import timeout" or page hangs
The batch processor handles this automaticallyIf stuck, refresh page - progress is saved
- Increase maxexecutiontime in php.ini if needed
Error: "Table already exists" during schema import
- This is normal for re-runs or resumed installations
- Errors are logged but won't block installation
- Use Reset if you need a completely fresh database
Error: "Password requirements not met"
- Ensure password has 8+ characters
- Include uppercase, lowercase, number, and special character
- Check the requirements checklist for missing items
Re-running the Installer
If you need to re-run the installer after completion:
- Delete the installation marker:
rm ct/dat/.installed - Navigate to
/install/index.php - Use Reset if you want a fresh database, or continue with existing tables
Manual Database Import
If batch import fails completely:
- Export your schema:
cat install/schema/schemacomplete.sql - Import via command line:
mysql -u user -p database < schemacomplete.sql - Resume installer from Stage 3
Security Considerations
During Installation
- Installer uses sessions to store sensitive data
- Database passwords are not logged
- Generated secrets use cryptographically secure random bytes
- CSRF protection via form tokens
After Installation
CRITICAL: Delete the /install folder after completing installation!
Leaving it accessible allows anyone to potentially reinstall or view configuration details.
Recommended Post-Install Security:
- Delete entire
/install/directory - Set config.inc.php to 644:
chmod 644 ct/dat/config.inc.php - Verify .htaccess files are in place
- Enable 2FA in admin panel
- Use HTTPS in production
Cron Jobs Required After Installation
After installation, set up this cron job for system maintenance:
# Main site cron - runs every minute
* php /path/to/ct/admin/cron/sitecron.php >> /path/to/ct/logs/cron/sitecron.log 2>&1
This single cron job handles:
- Video processing queue
- Scheduled tasks
- Cache cleanup
- Analytics aggregation
- Subscription billing
Translatable Strings
The following text strings appear in the installer and may need translation for non-English installations:
Welcome Screen
- "Welcome to ComusThumbz"
- "High Powered Website Automation"
- "Before You Begin"
- "Begin Installation"
- "Resume Previous Installation"
- "Reset Installation"
Navigation
- "Previous"
- "Continue"
- "Skip to Stage"
- "Back to Start"
Stage 1 - Requirements
- "System Requirements"
- "Checking server compatibility"
- "Passed", "Warning", "Failed"
- "Re-check Requirements"
Stage 2 - Database
- "Database Setup"
- "Database Host", "Database Name", "Database User", "Database Password"
- "Table Prefix"
- "Test Connection"
- "Import Schema"
- "Processing..."
Stage 3 - Configuration
- "Configuration Generator"
- "Site Name", "Admin Email", "Site Description", "Site Keywords"
- "Site Path", "Timezone"
- "License Configuration"
- "License Key", "License Email"
- "Webmaster Name"
- "Error Handling URLs"
- "Thumbnail Size Configuration"
Stage 4 - Folders
- "Folder Structure Setup"
- "Required Directories"
- "Security Files"
- "Ready", "Will Create", "Not Writable"
- "Create Folders"
Stage 5 - Data Import
- "Default Data Import"
- "Admin Menu Structure"
- "Default Settings"
- "Sample Categories"
- "Required"
Stage 6 - Admin Password
- "Admin Password Setup"
- "Password", "Confirm Password"
- "Password Requirements"
- "Password Strength"
- "Weak", "Fair", "Good", "Strong"
Stage 7 - Finalization
- "Final Verification"
- "Installation Summary"
- "Post-Installation Security"
- "What's Next"
- "Complete Installation"
Completion Screen
- "Installation Complete!"
- "Access Admin Panel"
- "View Your Site"
- "Delete Install Folder"
Error Messages
- "Could not connect to database"
- "Failed to write configuration file"
- "Some folders could not be created"
- "Password requirements not met"
- "Passwords do not match"
Version History
Related Documentation
Admin Panel Guide: Navigate to Admin Panel → Help → Documentation
- Storage Server Configuration: Navigate to Admin Panel → Tools → Storage Servers
- Creator Platform Setup: Navigate to Admin Panel → Settings → Creators