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

@ -47,6 +47,10 @@ Website login verifies credentials against the existing Panel password hash form
`Panel/modules/website/sso.php` and `Panel/sso.php` are retained only as compatibility redirects for old links. Active navigation must not depend on them.
Successful website login redirects to `my_account.php` unless a safe internal
return path was stored, such as `cart.php?checkout=1`. `account.php` is retained
as a compatibility account entry point.
## Ordering
The current public catalog route is `serverlist.php`. Customer-facing Order buttons must use:
@ -73,7 +77,17 @@ Website footer account links are state-aware:
- logged in: `My Account`, `Order a Server`, `Control Panel`, `My Servers`, `Log Out`
- staff-only links appear only for Panel admin users and still enforce website staff authorization server-side
The website main navigation also includes visible `Login`, `Create Account`, and `Cart` entries when appropriate. Control Panel links point directly to the configured Panel domain. `My Servers` opens a website customer page that summarizes website orders and links to the Panel for live server controls. Staff Dashboard opens the website sales/billing staff area, not Panel activity logging.
The shared header groups navigation by purpose:
- public: Home, Game Servers, Pricing, Locations, Documentation, Support
- account: Login/Create Account/Cart or My Account/My Orders/My Servers/Cart/Logout
- staff: Staff Dashboard, only for authorized website staff
- actions: Custom Projects and Control Panel
Control Panel links point directly to the configured Panel domain. `My Servers`
opens a website customer page that summarizes website orders and links to the
Panel for live server controls. Staff Dashboard opens the website sales/billing
staff area, not Panel activity logging.
## Deployment
@ -100,7 +114,9 @@ Recommended:
- `forgot_password.php`
- `reset_password.php`
- `account.php`
- `my_account.php`
- `orders.php`
- `my_orders.php`
- `invoices.php`
- `my_servers.php`
- `order.php`

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.