ComusThumbz Troubleshooting
ComusThumbz Troubleshooting Guide
Version: 1.0.0
Created: 2026-02-03
Applies to: ComusThumbz CMS - Complete Backend & Frontend
Table of Contents
- Overview
- Quick Diagnostic Checklist
- Server & PHP Errors
- Database Issues
- Video Processing
- API Issues
- Frontend Issues
- Cam Performers System
- Live Streaming (LiveKit)
- Creator Monetization
- Authentication & Users
- Cron Jobs
- Debug Tools Reference
- Log File Locations
- Common SQL Fixes
Overview
This guide consolidates troubleshooting information for the entire ComusThumbz CMS, covering both the backend admin panel (ct/admin/) and the frontend public pages (project root). Issues are organized by category with symptoms, causes, and solutions.
Quick Diagnostic Checklist
Run through these checks in order when encountering any issue:
- PHP error log - Check
ct/logs/and your server's PHP error log for recent errors - Cron jobs - Verify cron jobs are running (most "data not updating" issues)
- File permissions - Web server must have read/write access to
uploads/,ct/logs/,ct/dat/ - Database connection - Test with
https://yourdomain.com/tools/simpletest.php?key=comus2025 - API health - Test with
https://yourdomain.com/ct/api/v1/features - Feature toggles - Disabled features are the most common cause of "page not showing"
- Browser console - Check for JavaScript errors (F12 -> Console)
- Network tab - Check for failed API requests (F12 -> Network)
Server & PHP Errors
Blank Page / 500 Internal Server Error
Common Causes:
declare(stricttypes=1)placement - Must be the FIRST line after<?php. Any whitespace, BOM character, or code before it causes a fatal error.
<?php
declare(stricttypes=1); // MUST be here, line 2
- PHP syntax error - Check the error log:
tail -50 /var/log/php/error.log
- Missing include file - A
requireoncefor a file that doesn't exist:
grep -r "requireonce" ct/admin/yourpage.php
- Display errors disabled - Temporarily enable for debugging:
iniset('displayerrors', 1);
errorreporting(EALL);
Solution: Check PHP error log first. If empty, enable
displayerrors temporarily to see the actual error.AdminLanguage Singleton Error
Fatal error: Cannot instantiate AdminLanguage or similar 500 error on admin pages.Cause: Using
new AdminLanguage() instead of the singleton pattern.Fix:
// WRONG
$lang = new AdminLanguage();
// CORRECT
$lang = AdminLanguage::getInstance();
Memory Limit Exhausted
Fatal error: Allowed memory size of X bytes exhaustedCommon triggers:
- Large video file uploads
- Processing large image galleries
- Bulk operations on 400K+ cam performer records
Solution: Increase PHP memory limit:
; php.ini
memorylimit = 512M ; Minimum recommended
uploadmaxfilesize = 2G ; For video uploads
postmaxsize = 2G ; Must be >= uploadmaxfilesize
Or per-script:
iniset('memorylimit', '512M');
Max Execution Time Exceeded
Fatal error: Maximum execution time of 30 seconds exceededCommon triggers:
- Video processing cron jobs
- Large database queries
- External API calls timing out
Solution:
; php.ini
maxexecutiontime = 300 ; 5 minutes for web requests
For cron jobs, set unlimited:
settimelimit(0);
File Permission Errors
Permission denied errors when writing files or creating directories.Required permissions:
Fix:
chown -R www-data:www-data uploads/ ct/logs/ ct/dat/
chmod -R 775 uploads/ ct/logs/ ct/dat/
Database Issues
Database Connection Failed
Diagnosis:
- Test with the quick database tool:
https://yourdomain.com/tools/simpletest.php?key=comus2025
- Verify credentials in
ct/dat/config.inc.php:
$dbhost = 'localhost';
$dbuser = 'admincomus';
$dbpasswd = 'yourpassword';
$db = 'admincomus';
- Check MySQL is running:
systemctl status mysql
Solution: Verify MySQL service is running and credentials match the database configuration.
Table Locks & Blocking Queries
Diagnosis:
- Run the MySQL Status tool:
https://yourdomain.com/tools/mysqlstatus.php?key=comus2025
- Check for blocking queries:
SHOW FULL PROCESSLIST;
Look for queries running longer than 30 seconds.
- Use the Database Lock Inspector for InnoDB lock analysis:
https://yourdomain.com/tools/dblockinspector.php?key=comus2025
Solution:
- Kill the blocking query:
KILL <processid>;
- Or via the debug tool:
https://yourdomain.com/tools/mysqlstatus.php?key=comus2025&kill=PROCESSID
Common culprit: The
apicron.php marksiteperformersoffline() function updating all performers at once. This was fixed with batched updates (1000 rows at a time with 10ms pauses).Slow Queries
Diagnosis:
-- Check table locks
SHOW OPEN TABLES WHERE Inuse > 0;
-- Analyze table performance
ANALYZE TABLE tblCamsPerformers;
ANALYZE TABLE tblVideos;
-- Check index usage
SHOW INDEX FROM tblCamsPerformers;
SHOW INDEX FROM tblVideos;
Solution:
- Verify indexes exist on frequently-queried columns
- Use
EXPLAINon slow queries to identify missing indexes - Check if APCu cache is working (
php -m | grep apcu) - For cam performers, use
?fast=1to skip COUNT queries
SQL Debugging Commands
-- Show all running queries
SHOW FULL PROCESSLIST;
-- Kill a specific query
KILL 123;
-- Kill all sleeping connections older than 30 seconds
SELECT CONCAT('KILL ', id, ';')
FROM informationschema.processlist
WHERE Command='Sleep' AND Time > 30;
-- Check table locks
SHOW OPEN TABLES WHERE Inuse > 0;
-- Check InnoDB status for deadlocks
SHOW ENGINE INNODB STATUS;
Video Processing
Videos Stuck at 'pending'
This is the most common video issue. Check these in order:
- Cron jobs not running - The video processor runs on a schedule:
# Must be in crontab
- php /path/to/ct/admin/cron/ftpvideoprocessor.php
/5 php /path/to/ct/admin/cron/videoprocessor.php
- Wrong filepath format in database - The most common data bug:
-- Check filepath format
SELECT videoid, filepath, status FROM tblVideos WHERE status='pending';
File path MUST be:
uploads/videos/original/{filename}NOT just the filename, and NOT including
ct/ prefix.- Fix incorrect file paths:
-- Fix paths that are just filenames
UPDATE tblVideos
SET filepath = CONCAT('uploads/videos/original/', filepath)
WHERE filepath NOT LIKE 'uploads/%'
AND filepath NOT LIKE '%/%'
AND status = 'pending';
- Clear stuck processing queue:
DELETE FROM tblVideoProcessingJobs
WHERE videoid IN (SELECT videoid FROM tblVideos WHERE status = 'pending');
- Verify the file exists on disk:
ls -la /path/to/ct/uploads/videos/original/
FFmpeg / FFprobe Not Found
Diagnosis:
which ffmpeg
which ffprobe
ffmpeg -version
Solution:
- Install FFmpeg:
sudo apt install ffmpeg # Debian/Ubuntu
- Verify paths in config match actual locations:
// ct/dat/config.inc.php
$ffmpegpath = '/usr/bin/ffmpeg';
$ffprobepath = '/usr/bin/ffprobe';
- Ensure PHP can execute shell commands:
// Check if exec() is disabled
vardump(functionexists('exec'));
Video Processing Errors
Diagnosis:
- Check processing logs:
tail -100 ct/logs/videoprocessor/.log
- Check the video record:
SELECT videoid, filepath, status, errormessage
FROM tblVideos WHERE status = 'error'
ORDER BY videoid DESC LIMIT 10;
Common causes:
- Corrupted source file
- Unsupported codec
- Insufficient disk space
- FFmpeg version too old (need 4.0+)
Solution: Fix the underlying cause, then reset the video for reprocessing:
UPDATE tblVideos SET status = 'pending', errormessage = NULL
WHERE videoid = <ID>;
HLS Streaming Not Working
.m3u8 files not loading.Diagnosis:
- Check if HLS files were generated:
SELECT videoid, hlspath FROM tblVideoFiles WHERE videoid = <ID>;
- Verify the master playlist is accessible:
curl -I https://cdn.example.com/videos/{shard}/{id}/hls/master.m3u8
- Check MIME type configuration. Your web server must serve
.m3u8asapplication/vnd.apple.mpegurl:
# Apache .htaccess
AddType application/vnd.apple.mpegurl .m3u8
AddType video/MP2T .ts
Solution: Verify HLS files exist on CDN, MIME types are correct, and
securemedia.php token is valid.Thumbnails Not Generating
Diagnosis:
SELECT videoid, posterpath, previewpath
FROM tblVideoFiles WHERE videoid = <ID>;
Common causes:
- ImageMagick not installed (
convertcommand needed for contact sheets) - FFmpeg failed during thumbnail extraction
- CDN upload for thumbnails failed (check storage server logs)
Solution:
# Verify ImageMagick
which convert
convert --version
# Reprocess thumbnails only
php ct/admin/cron/videoprocessor.php --video-id=<ID> --thumbnails-only
CDN Upload Failures
Diagnosis:
- Check storage server configuration:
SELECT FROM tblStorageServers WHERE enabled = 1;
SELECT FROM tblStorageServerGroups;
- Check file location records:
SELECT FROM tblStorageFileLocations WHERE videoid = <ID>;
- Verify CDN credentials and connectivity from the admin panel.
File sharding formula:
floor(videoid / 1000) 1000Example: Video ID 4321 goes to shard 4000:
https://cdn.example.com/videos/4000/4321/webmp4/web.mp4
Solution: Check CDN credentials, test connectivity, verify storage server group assignment.
Distributed Conversion Server Issues
Diagnosis:
- Check server status:
SELECT serverid, title, statusid, currentjobs, maxconcurrentjobs,
lastheartbeat, loadaverage
FROM tblConversionServers WHERE statusid = 1;
- Check conversion logs:
SELECT FROM tblConversionServerLogs
WHERE loglevel IN ('WARNING', 'ERROR')
ORDER BY createdat DESC LIMIT 20;
- Verify settings:
SELECT FROM tblSettings WHERE settinggroup = 'videoprocessing';
Solution:
- Ensure
conversionuseremoteserversis set to1 - Verify remote server SSH/FTP connectivity
- Check that FFmpeg is installed on remote servers
- Verify
conversionfallbacktolocalis1for automatic fallback
API Issues
API Authentication Failures
Common causes:
- Wrong user ID column -
tblCMSUsersusesid, NOTuserid:
-- CORRECT
SELECT id, username, accountstatus FROM tblCMSUsers WHERE id = 123;
-- WRONG (column doesn't exist)
SELECT userid FROM tblCMSUsers;
- Wrong status column -
tblCMSUsersusesaccountstatus, NOTstatus:
-- CORRECT
WHERE accountstatus = 'active'
-- WRONG
WHERE status = 'active'
- JWT token expired - Tokens have an expiration time. Re-authenticate:
POST /ct/api/v1/auth/login
- JWT secret mismatch - Verify in config:
$jwtsecret = md5($domain . $licensekey);
API Calls Failing from JavaScript
Diagnosis:
- Check
ApiClientbase URL:
// Browser console
const api = new ApiClient();
console.log(api.baseUrl);
- Check Network tab (F12) for the failing request - note the URL, status code, and response body.
- Verify the endpoint exists in the router:
- File:
ct/api/v1/index.php - 90+ endpoints defined
- File:
- Check JWT token:
console.log(localStorage.getItem('authtoken'));
Solution: Verify base URL detection, check endpoint exists in router, verify authentication token if endpoint requires auth.
API Returns Empty Data
{"success": true, "data": []} with no content.Diagnosis:
- Check if data exists in the database:
SELECT COUNT() FROM tblVideos WHERE status = 'active';
SELECT COUNT() FROM tblCamsPerformers WHERE status = 1 AND enabled = 1;
- Check feature toggles - some API endpoints return empty when features are disabled.
- Check query parameters - pagination offset may be beyond available data.
Solution: Verify data exists in the database and feature toggles are enabled.
CORS Errors
Access-Control-Allow-Origin errors.Cause: API and frontend on different domains or ports.
Solution: Ensure the API sets proper CORS headers:
header('Access-Control-Allow-Origin: https://yourdomain.com');
header('Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS');
header('Access-Control-Allow-Headers: Content-Type, Authorization');
Or in
.htaccess:Header set Access-Control-Allow-Origin "https://yourdomain.com"
Frontend Issues
Features Not Showing / All Disabled
Diagnosis:
- Test the features API endpoint:
curl https://yourdomain.com/ct/api/v1/features
- Check feature cache - APCu may have stale data:
// Clear APCu cache
apcuclearcache();
- Check
featurehelper.php- all features default to enabled if not found in database.
- Verify feature settings in admin panel: Admin Panel -> Feature Toggles
Solution: Clear APCu cache, verify feature settings in admin panel, check that the API is reachable.
Translations Not Loading
videos.title instead of "Videos").Diagnosis:
- Verify
lang/en.jsonexists and is valid JSON:
php -r "jsondecode(filegetcontents('lang/en.json')); echo jsonlasterrormsg();"
- Check file permissions (must be readable by web server).
- Verify the translation key exists in the JSON:
# Search for a specific key
grep -o '"videos"' lang/en.json
- Check for typos in nested keys -
videos.sortby.videoidrequires all parent keys to exist.
Solution: Validate JSON syntax, check file permissions, verify key path exists in the translation file.
CSS Styles Not Applying
Rules:
- Only use
assets/css/style.css- no external CSS frameworks (Bootstrap, Tailwind, etc.) - Check for specificity conflicts with Style Manager overrides (Phase 12)
- Verify the stylesheet is loaded in
includes/header.php - Check browser cache - append
?v=timestampto stylesheet URL
Solution:
// Force cache bust
<link rel="stylesheet" href="assets/css/style.css?v=<?= time() ?>">
Dark Mode Not Working
Diagnosis:
- Check
featuredarkmodeis enabled in feature toggles - Verify
localStorageis available:
console.log(localStorage.getItem('comusdarkmode'));
- Confirm
body.dark-modeCSS rules exist inassets/css/style.css - Check that both
bodyandhtmlelements get the class:
document.body.classList.contains('dark-mode');
document.documentElement.classList.contains('dark-mode');
Solution: Enable the feature toggle, clear localStorage, verify CSS dark mode rules exist.
Video Player Not Loading
Diagnosis:
Check browser Network tab for
/ct/api/v1/videos/{id} requestVerify video data is returned with valid URLsCheck access control - user may lack permission (free/premium/VIP)For HLS: verify HLS.js is loaded and browser supports it
- Check
securemedia.phptoken generation:
GET /securemedia.php?token=...&type=video&id=...
Solution: Check API response, verify access control, ensure HLS.js or native HLS support is available, verify media token is valid.
Click Tracking Not Working
Critical rule: ALL external links MUST route through
click.php. Direct links incur a 100% skim penalty.Correct format:
// PHP
$url = sprintf('click.php?url=%s&type=video&id=%d',
urlencode($externalurl), $videoid);
// JavaScript
const url = click.php?url=${encodeURIComponent(externalUrl)}&type=${type}&id=${id};
Diagnosis:
- Check that
click.phpexists at the project root - Verify
tblClickTrackingis receiving records:
SELECT FROM tblClickTracking ORDER BY clickid DESC LIMIT 10;
- Check
tblContentClicksfor aggregated counts
Solution: Audit all external links to ensure they use
click.php. Use browser DevTools to verify link href attributes.SEO Meta Tags Missing
Cause: SEO data must be loaded BEFORE
header.php is included.Correct order:
// 1. Load config and API helper FIRST
requireonce DIR . '/ct/dat/config.inc.php';
requireonce DIR . '/includes/InternalApiHelper.php';
// 2. Fetch data for SEO
$api = InternalApiHelper::getInstance();
$videoData = $api->getVideoForSeo($videoId);
// 3. NOW include header (generates meta tags from loaded data)
requireonce DIR . '/includes/header.php';
Diagnosis:
View page source and check for
<meta property="og:title"> tagsUse Facebook/Twitter debugger tools to validate Open Graph tags
- Check
ct/dat/seosettings.jsonfor template configuration
Solution: Ensure SEO data is loaded before header, verify
SeoHelper.php and InternalApiHelper.php are working.Cam Performers System
No Performers Appearing
Diagnosis (in order):
- Check cron jobs are running:
php ct/admin/cronupdatecams.php
- Verify API credentials in Admin -> Cam Settings
- Check
tblCamsSitesfor enabled sites:
SELECT recordnum, name, enabled FROM tblCamsSites WHERE enabled = 1;
- Verify
featurelivecamsis enabled in feature toggles - Check logs:
tail -50 ct/logs/cron-update.log
- Test the internal API directly:
GET /ct/api/v1/cams/online?perpage=1&fast=1
Solution: Enable cron jobs, verify API credentials, enable the feature toggle.
All Performers Showing Offline
Diagnosis:
- Run the cron update manually:
php ct/admin/cronupdatecams.php
- Check if external API is responding:
curl --location 'https://performersext-api.pcvdaa.com/performers-ext/?token=<TOKEN>&gender=f&live=true&size=1&page=1' \
--header 'x-api-key: <APIKEY>' \
--header 'User-Agent: ComusThumbz/1.0'
- Verify API token hasn't expired
- Check database for online performers:
SELECT COUNT() FROM tblCamsPerformers WHERE status = 1;
Solution: Run cron manually, verify external API credentials are valid.
External API 403 Forbidden
{"message": "Forbidden"} or HTML error page.Causes:
- Missing or invalid
x-api-keyheader - Missing
User-Agentheader (returns HTML error page) - API key revoked by CrakRevenue
Diagnosis:
-- Check stored API credentials
SELECT recordnum, name, apiData, parameters FROM tblCamsSites WHERE enabled = 1;
Solution: Verify
x-api-key (stored in tblCamsSites.apiData) and ensure requests include a User-Agent header. Contact CrakRevenue if key was revoked.External API 401 Unauthorized
{"message": "Unauthorized: brands not allowed"} or similar.Causes:
- Invalid or missing
tokenparameter - Requesting brands not authorized for your token
- Token is domain-bound and being used from wrong domain
Diagnosis:
-- Check token values
SELECT recordnum, name, parameters, brand FROM tblCamsSites WHERE enabled = 1;
Solution: Verify
token (stored in tblCamsSites.parameters), ensure you only request authorized brands, verify token is for your domain.Slow Cam Performers Page
Diagnosis:
- Use the debug panel: add
?debug=1to the URL to see timing breakdown - Use the full debug tool:
https://yourdomain.com/tools/camperformersdebug.php?key=comus2025
Optimization checklist:
- Enable fast mode - ensure frontend uses
?fast=1parameter - Check APCu is installed and enabled:
php -m | grep apcu
- Verify stats cache cron is running:
/2 php /path/to/ct/admin/cron/updatecamperformerstats.php
- Reduce
perpageto 24 or less - Check for blocking database queries (see Table Locks)
Three-layer caching strategy:
- Layer 1: APCu in-memory cache (30s TTL)
- Layer 2: Database stats cache (
tblCamsPerformersStatsCache) - Layer 3: Fast mode (skip COUNT queries entirely)
Solution: Enable all three caching layers and verify cron jobs are running.
Affiliate Revenue Missing
Cause: External performer links not routed through
click.php.Required format:
$clickurl = sprintf('click.php?url=%s&type=camperformer&id=%d',
urlencode($performer['chatroomurl']), $performer['performerid']);
Also verify:
- Affiliate ID is present in the
roomUrlfrom the external API tblClickTrackingis recording cam performer clicks- Performer
chatroomurlcontains valid affiliate tracking parameters
Solution: Audit all performer links to ensure
click.php routing. Verify affiliate ID in room URLs.Live Streaming (LiveKit)
LiveKit Server Not Starting
Diagnosis:
# Check container status
docker ps -a | grep livekit
# Check logs
docker logs livekit
# Verify Docker is running
systemctl status docker
Common causes:
- Port conflicts (7880, 7881, 40000-40100 already in use)
- Invalid
livekit-config.yamlsyntax - Docker not installed or not running
- Insufficient permissions
Solution:
# Check port availability
ss -tlnp | grep 7880
# Restart container
docker restart livekit
# Or recreate
docker rm -f livekit
docker run -d --name livekit --network host \
-v $(pwd)/livekit-config.yaml:/livekit.yaml:ro \
livekit/livekit-server:latest --config /livekit.yaml
Stream Not Connecting
Diagnosis:
- Check LiveKit config in
ct/dat/config.inc.php:
define('LIVEKITHOST', 'wss://yourdomain.com/livekit/');
define('LIVEKITAPIKEY', 'yourkey');
define('LIVEKITAPISECRET', 'yoursecret');
- Verify WebSocket connection from browser:
- Open browser console (F12)
- Look for WebSocket connection errors
- Check if
wss://URL is accessible
- Verify firewall rules:
sudo ufw status | grep -E "7880|7881|40000"
Required ports:
7880- WebSocket signaling7881- TCP media40000-40100- UDP media (WebRTC)
Solution: Verify LiveKit credentials match between config and server, check firewall ports, ensure SSL is configured for
wss://.High Latency / Buffering
Causes:
- UDP ports blocked - WebRTC falls back to TCP (higher latency)
- Server overloaded
- Client bandwidth insufficient
Solution:
- Ensure UDP ports 40000-40100 are open
- Check server load:
top -bn1 | head -5
- Verify
nodeipinlivekit-config.yamlmatches your public IP
Chat Not Working
Diagnosis:
- Check
tblLiveStreamChatfor recent messages:
SELECT FROM tblLiveStreamChat ORDER BY id DESC LIMIT 10;
- Verify WebSocket connection in browser console
- Check that the stream ID is valid in
tblLiveStreams
Solution: Verify stream exists, WebSocket is connected, and chat API endpoint is responding.
Creator Monetization
Tips Not Processing
Diagnosis:
-- Check recent token transactions
SELECT FROM tblTokenTransactions ORDER BY createdat DESC LIMIT 10;
-- Check creator tips
SELECT FROM tblCreatorTips ORDER BY createdat DESC LIMIT 10;
-- Check user token balance
SELECT id, username, tokenbalance FROM tblCMSUsers WHERE id = <USERID>;
Common causes:
- Insufficient token balance
- Creator profile not verified
- API endpoint error (check response)
Solution: Verify sender has sufficient tokens, creator profile is active, and
POST /tips/send returns success.Earnings Not Aggregating
Cause: Earnings aggregation cron job not running.
Required cron:
php /path/to/ct/admin/cron/aggregatecreatorearnings.php
Diagnosis:
-- Check daily earnings records
SELECT FROM tblCreatorEarningsDaily
WHERE creatorid = <ID>
ORDER BY earningdate DESC LIMIT 10;
-- Check if raw transactions exist
SELECT SUM(amount) as total
FROM tblTokenTransactions
WHERE recipientid = <ID> AND createdat >= CURDATE();
Solution: Ensure the
aggregatecreatorearnings.php cron job is running every minute.Creator Posts Not Displaying
Diagnosis:
- Check
featurecreatorpostsis enabled - Verify posts exist:
SELECT FROM tblCreatorPosts WHERE creatorid = <ID> ORDER BY createdat DESC LIMIT 10;
- Check post visibility settings (public vs subscriber-only vs PPV)
- Verify media uploads if post contains images/video:
SELECT FROM tblCreatorPostMedia WHERE postid = <POSTID>;
Solution: Enable the feature toggle, verify posts exist in the database, check access control for post visibility.
Subscription Issues
Diagnosis:
-- Check active subscriptions
SELECT FROM tblCreatorSubscriptions
WHERE subscriberid = <USERID> AND status = 'active';
-- Check subscription packages
SELECT FROM tblCreatorSubscriptionPackages WHERE creatorid = <CREATORID>;
Solution: Verify
featuresubscriptions is enabled, check payment processing, verify subscription record status.Authentication & Users
Login Fails
Diagnosis:
- Test the auth API directly:
POST /ct/api/v1/auth/login
{"username": "test", "password": "test"}
- Check user account status:
SELECT id, username, accountstatus, emailverified
FROM tblCMSUsers WHERE username = 'testuser';
Remember: column is
accountstatus, NOT status.- Check if account is locked, suspended, or unverified.
Solution: Verify account exists, is active (
accountstatus = 'active'), and email is verified if required.Admin Locked Out (Too Many Failed Attempts)
Cause: The rate limiter blocks the IP address after 5 failed login attempts for 15 minutes. If you also forgot your password, you'll need to reset both the lockout and the password.
Solution:
Step 1: Clear the rate limit lockout
Run this SQL in phpMyAdmin or MySQL CLI:
DELETE FROM tblCMSRateLimits WHERE action LIKE '%login%';
This immediately removes all login blocks for all IPs.
Step 2 (if needed): Reset the admin password
If you also forgot your password, you have two options:
Option A: Use the built-in repair tool
Navigate to
ct/admin/repair.php?action=setupBasicAuth and set a new password. This page does not require login.repair.php via .htaccess or server configuration.Option B: Reset directly via SQL
- Generate a new password hash. Create a temporary PHP file on your server (e.g.,
hash.php):
<?php echo passwordhash('yournewpassword', PASSWORDDEFAULT); ?>
- Visit the file in your browser and copy the hash output.
- Run this SQL:
UPDATE tblSettings SET adminpassword = 'PASTEHASHHERE' WHERE id = 1;
- Delete
hash.phpimmediately after use.
Step 3: Verify and log in
Go to
ct/admin/ctlogin.php and log in with your new password.Prevention:
- Store your admin password in a password manager.
- The lockout expires automatically after 15 minutes if you prefer to wait.
Session Issues
Diagnosis:
- Check
auth/setsession.phpis being called after login - Verify session cookie is being set:
document.cookie // Check for PHP session cookie
- Check PHP session configuration:
vardump(sessionstatus()); // Should be PHPSESSIONACTIVE
vardump($SESSION); // Should contain user data
Solution: Ensure
setsession.php is called after API login returns JWT token. Verify session cookie domain matches.2FA Problems
Diagnosis:
- Check
feature2fais enabled - Verify server time is accurate (TOTP codes are time-based):
date
timedatectl status
- Time drift of >30 seconds will cause code rejection.
Solution: Sync server time with NTP, verify 2FA secret is stored correctly.
Cron Jobs
Verifying Cron Jobs Are Running
crontab -l
Check if they've run recently:
# Check video processor logs
ls -la ct/logs/videoprocessor/
# Check last modification of log files
stat ct/logs/cron-update.log
Test a cron job manually:
php ct/admin/cron/videoprocessor.php
echo $? # 0 = success
Required Cron Schedule
# Video Processing (CRITICAL)
- php /path/to/ct/admin/cron/ftpvideoprocessor.php
/5 php /path/to/ct/admin/cron/videoprocessor.php
/5 php /path/to/ct/admin/cron/conversionpoller.php
# Cam Performers
/5 php /path/to/ct/admin/cronupdatecams.php
/2 php /path/to/ct/admin/cron/updatecamperformerstats.php
0 3 php /path/to/ct/admin/cron/maintenancecamperformers.php
# Creator Monetization
- php /path/to/ct/admin/cron/aggregatecreatorearnings.php
# Site Maintenance
0 0 php /path/to/ct/admin/cron/generatesitemap.php
0 1 php /path/to/ct/admin/cron/sitecron.php
Impact of missing cron jobs:
Cron Tasks Failing with Exit Code 1 (exec Functions Disabled)
Symptom:
ERROR Task 'apicronevery10m' failed with exit code 1 after 0.01s.
Output for apicronevery10m: Checking MySQL configuration for large dataset optimization...
Or:
No process execution functions available (procopen, exec, shellexec all disabled)
Tasks fail when launched by sitecron.php but work fine when run manually via SSH (php apicron.php).
Cause:
PHP-FPM has exec, shellexec, procopen, and related functions disabled in disablefunctions. The sitecron.php scheduler needs these to spawn subtasks. The CLI PHP config usually has them enabled, which is why running manually works.
Fix:
- Open your PHP-FPM config:
sudo nano /etc/php/8.3/fpm/php.ini
- Find the
disablefunctionsline. It will look something like:
disablefunctions = pcntlalarm,pcntlfork,...,exec,system,passthru,shellexec,procopen,popen
- Remove
exec,system,passthru,shellexec,procopen,popenfrom the list. Keep thepcntlfunctions disabled. The line should look like:
disablefunctions = pcntlalarm,pcntlfork,pcntlwaitpid,pcntlwait,pcntlwifexited,pcntlwifstopped,pcntlwifsignaled,pcntlwifcontinued,pcntlwexitstatus,pcntlwtermsig,pcntlwstopsig,pcntlsignal,pcntlsignaldispatch,pcntlgetlasterror,pcntlstrerror,pcntlsigprocmask,pcntlsigwaitinfo,pcntlsigtimedwait,pcntlexec,pcntlgetpriority,pcntlsetpriority
- Restart PHP-FPM:
sudo systemctl restart php8.3-fpm
- Verify:
php -r "echo functionexists('exec') ? 'exec: OK' : 'exec: DISABLED'; echo PHPEOL;"
Why these functions are needed:
exec,shellexec,procopen- Required bysitecron.phpto spawn cron subtaskssystem,passthru- Used by video processing (FFmpeg/FFprobe)popen- Used by some processing pipelines
The pcntl functions should remain disabled as they are for process forking and are not needed by ComusThumbz.
Debug Tools Reference
?key=comus2025Kill a blocking query via URL:
https://yourdomain.com/tools/mysqlstatus.php?key=comus2025&kill=PROCESSID
Cam performers debug panel:
https://yourdomain.com/camperformers.php?debug=1
Shows: API URL, TTFB, download time, JSON parse time, DOM render time.
Log File Locations
Common SQL Fixes
-- Fix videos with incorrect filepath (just filename, missing path)
UPDATE tblVideos
SET filepath = CONCAT('uploads/videos/original/', filepath)
WHERE filepath NOT LIKE 'uploads/%'
AND filepath NOT LIKE '%/%'
AND status IN ('pending', 'error');
-- Reset errored videos for reprocessing
UPDATE tblVideos SET status = 'pending', errormessage = NULL
WHERE status = 'error' AND videoid IN (1, 2, 3);
-- Clear stuck processing jobs
DELETE FROM tblVideoProcessingJobs
WHERE videoid IN (SELECT videoid FROM tblVideos WHERE status = 'pending');
-- Check cam performer online counts by site
SELECT s.name, COUNT(p.performerid) as onlinecount
FROM tblCamsPerformers p
JOIN tblCamsSites s ON p.site = s.recordnum
WHERE p.status = 1 AND p.enabled = 1
GROUP BY s.name;
-- Check feature toggle status
SELECT settingkey, settingvalue
FROM tblSettings
WHERE settingkey LIKE 'feature%'
ORDER BY settingkey;
-- Check recent click tracking
SELECT type, COUNT() as clicks, MAX(createdat) as lastclick
FROM tblClickTracking
GROUP BY type ORDER BY clicks DESC;
-- Find users with authentication issues
SELECT id, username, accountstatus, emailverified, lastlogin
FROM tblCMSUsers
WHERE accountstatus != 'active'
ORDER BY id DESC LIMIT 20;
-- Check storage server health
SELECT serverid, servername, servertype, enabled,
lastcheck, lasterror
FROM tblStorageServers;
-- Verify creator earnings aggregation
SELECT creatorid, earningdate, totaltips, totalsubscriptions,
totalppv, totalearnings
FROM tblCreatorEarningsDaily
ORDER BY earningdate DESC LIMIT 20;