attept 2 at site fix

This commit is contained in:
Frank Harris 2026-06-17 17:36:25 -05:00
parent 60bcc67056
commit cc7bbafb63
23 changed files with 360 additions and 75 deletions

View file

@ -216,3 +216,72 @@ Customer-facing account pages:
- Paid order appears in provisioning queue.
- Customer orders, invoices, and My Servers pages show only the authenticated user's records.
- No hardcoded credentials or raw PHP errors are displayed.
## HTTP 500 Troubleshooting
### Login remains on `login.php`
Check:
- submitted field names are `login`, `password`, and `csrf_token`
- CSRF token validates
- the Panel user exists in the configured `users` table
- `users_passwd` matches the current Panel-compatible hash
- account role is not `banned`
- no output is sent before the redirect
- successful login redirects to `my_account.php` unless a safe internal return path is stored
The website also provides `account.php` and `my_account.php` as compatible account routes.
### `staff.php` HTTP 500 or blank output
Common causes:
- PHP 8-only syntax deployed on a PHP 7.x host
- missing production files from `Panel/modules/website/pages/`
- missing `includes/billing.php`
- fatal error suppressed by production `display_errors=0`
- non-admin account expecting staff access
The website bootstrap avoids PHP 8-only constructs and installs a shutdown handler that logs fatal errors with a short reference ID. Staff pages must render through shared website templates and must not point to the Panel activity logger.
### `staff_services.php` HTTP 500
Check:
- `billing_services` exists
- staff migrations have been run
- expected catalog columns exist or can be added by the idempotent migration runner
- `remote_servers` schema is the current Panel schema
- the page is not assuming `remote_servers.enabled` exists
The current helper treats missing `remote_servers.enabled` as enabled for display and lets staff assign locations from current Panel remote-server rows.
### `order.php?service_id=...` HTTP 500
Check:
- `billing_services` exists
- the requested `service_id` exists
- the service is enabled if the `enabled` column exists
- `remote_server_id` contains at least one valid location ID
- configured slot columns are present or defaults are acceptable
- `config_homes` exists when game metadata is needed
The order page no longer requires `config_homes`; it can render from the service row alone. Missing or disabled services produce a styled unavailable page instead of blank output.
### Wrong Panel Administration URL
Website staff administration must link to:
- `staff.php`
It must not link to:
- `home.php?m=administration&p=watch_logger`
The Panel activity logger is operational administration, not website sales/billing administration.
### Log Locations
Production PHP or web-server logs are deployment-specific. Check Apache, Nginx, PHP-FPM, cPanel `error_log`, and PHP `error_log` paths. The local repository does not contain live web-server error logs.