Troubleshooting

Common issues + fixes. Always check kode/storage/logs/laravel.log for the actual error before doing anything else.

Where to find errors

tail -f /home/user/public_html/kode/storage/logs/laravel.log

Or via cPanel File Manager โ†’ navigate to kode/storage/logs/ โ†’ open latest laravel.log.

Installation issues

500 error during install

File permissions wrong. Run:

chmod -R 755 .
chmod -R 775 kode/storage kode/bootstrap/cache

"Specified key was too long"

MySQL too old. Upgrade to 8.0+ or MariaDB 10.6+.

White page

Enable debug mode temporarily in kode/.env:

APP_DEBUG=true

Reload page to see actual error. Set back to false after.

Installer keeps redirecting

rm kode/storage/cartuser_installed
php artisan cache:clear

Update issues

Update tool fails mid-process

Check laravel.log for actual error. Common causes:

"Update package contains sensitive files"

Your ZIP includes .env or .htaccess โ€” security guard rejected it. Re-package without those files.

Missing columns after update

php artisan schema:fix
php artisan migrate --force
php artisan optimize:clear

Frontend issues

"Class not found" / autoloader errors

cd /home/user/public_html/kode
composer dump-autoload --no-dev --optimize
php artisan optimize:clear

Home page blank or shows old content

php artisan cache:clear
php artisan view:clear

Images not loading

"Mixed content" errors (HTTP/HTTPS)

Set in kode/app/Providers/AppServiceProvider.php:

if (env('APP_ENV') === 'production') {
    URL::forceScheme('https');
}

Admin / login issues

Login redirects to "Unauthorized"

Roles table empty (seeder didn't run). Run:

php artisan db:seed --class="Database\Seeders\Installer\RoleSeeder" --force
php artisan cache:clear

Forgot SuperAdmin password

php artisan tinker --execute="
\$a = App\Models\Admin::where('user_name','admin')->first();
\$a->password = bcrypt('newpassword');
\$a->save();
"

Order & payment issues

Payment shows "Failed" but customer was charged

Callback URL not set in gateway dashboard. Open gateway edit page in admin โ†’ copy Callback URL โ†’ paste into gateway provider's webhook config.

Cart total doesn't match

Currency conversion issue. Verify:

Checkout 500 error

Likely missing column. Run:

php artisan schema:fix
php artisan cache:clear

Email issues

Emails not sending

  1. Verify SMTP credentials in .env
  2. Test: php artisan tinker --execute="Mail::raw('test', fn(\$m) => \$m->to('[email protected]')->subject('test'));"
  3. Check failed jobs: php artisan queue:failed
  4. Retry: php artisan queue:retry all

Gmail SMTP rejected

Gmail requires app-specific password if 2FA is on. Create one at myaccount.google.com/apppasswords.

SMS issues

OTP not arriving

  1. Verify SMS gateway credentials
  2. Check SMS provider credit balance
  3. Test from Admin โ†’ Settings โ†’ SMS โ†’ Send Test SMS
  4. Some providers reject without sender ID approval

Mobile app issues

App shows "Cannot connect to server"

App shows old data

Push notifications not arriving

Performance issues

Slow page loads

  1. Enable OPcache (PHP performance boost)
  2. Switch to Redis cache: CACHE_DRIVER=redis in .env
  3. Run php artisan optimize
  4. Use CDN for static assets (CloudFlare, BunnyCDN)
  5. Optimize images (compress, WebP format)

Database slow queries

Common error messages

ErrorFix
foreach() argument must be of type array|object, null givenCache stale or DB column NULL. Run php artisan cache:clear
array_key_exists(): Argument #2 must be of type array, null givenSame as above. Often in social_login settings on fresh install
Array to string conversionMultilingual JSON field rendered as string. Update to v3.0
Class not foundRun composer dump-autoload --no-dev --optimize
Specified key was too longMySQL too old, upgrade to 8.0+
SQLSTATE[42S02]: Base table doesn't existMigration didn't run. Run php artisan migrate --force
Unknown columnRun php artisan schema:fix
500 on /api/dashboardSoft-deleted product orphans. Update to v3.0 (fixed)
Login โ†’ UnauthorizedRoles table empty. Run RoleSeeder

Still stuck?