8 KiB
Recent Fixes & Enhancements Summary
Date: November 10, 2025
Critical Fixes Completed ✅
1. PayPal Payment Capture Session Issue (FIXED)
Problem: Payment capture was failing with NO_USER_SESSION error even though user was logged in.
Root Cause: The api/capture_order.php file was calling session_start() without setting the session name first, so it couldn't access the gameservers_website session where the user_id is stored.
Solution: Added session_name("gameservers_website") before session_start() in capture_order.php.
File Modified: modules/billing/api/capture_order.php (line ~148)
Test Steps:
- Log into the billing site
- Add a server to cart
- Click PayPal checkout button
- Complete payment in PayPal sandbox
- Verify payment completes successfully and redirects to success page
- Check
modules/billing/logs/payment_capture.log- should no longer showNO_USER_SESSIONerror
2. Cart Page Debug Logging Removed (COMPLETED)
What Was Removed:
- Shutdown function that logged to
data/debug_cart.log ?debug_cart=1parameter handling- Debug error display code
File Modified: modules/billing/cart.php (lines 1-30)
Result: Cart page now runs in production mode without debug overhead.
3. Cart Page Header/Footer Consistency (FIXED)
Problem: Cart page had different fonts and styling than other billing pages; missing footer entirely.
Solutions Applied:
- Added
include(__DIR__ . '/includes/top.php');before menu - Added
include(__DIR__ . '/includes/footer.php');at page end - Removed global
font-familyandbackgroundoverride from inline CSS - Added favicon links to match other pages
Files Modified:
modules/billing/cart.php(head section and body closing)
Result: Cart page now has consistent header/menu/footer with rest of billing module.
Documentation Enhancements Started 📚
4. Minecraft Documentation Updated (TEMPLATE CREATED)
What Was Added:
- Comprehensive Ports section with table showing all ports (TCP 25565, UDP 25565, TCP 25575, UDP 19132)
- Port purposes clearly explained
- Firewall configuration examples for multiple platforms
- Security notes for RCON and port protection
- Enhanced navigation with icons (🔌 Ports, ⚙️ Startup Parameters, 🔧 Troubleshooting)
File Modified: modules/billing/docs/minecraft/index.php
Template Pattern Established:
- ✅ Quick Info section (at top)
- ✅ Ports section with complete table
- ✅ Installation steps
- ✅ Configuration examples
- ✅ Startup Parameters section (already excellent)
- ✅ Troubleshooting section (already comprehensive)
- ✅ Performance optimization
- ✅ Security best practices
Remaining Documentation Work 📋
Games Needing Full Port/Parameter/Troubleshooting Docs
The following games need their docs/{game}/index.php files updated with the Minecraft template pattern:
High Priority Games (Popular):
- Counter-Strike: Global Offensive (
csgo/) - Team Fortress 2 (
tf2/) - Garry's Mod (
garrysmod/) - Rust (
rust/) - ARK: Survival Evolved (
arkse/) - Terraria (
terraria/) - Valheim (
valheim/) - 7 Days to Die (
7daystodie/) - DayZ (
dayz/) - Left 4 Dead 2 (
left4dead2/)
Medium Priority:
- Counter-Strike Source (
css/) - Arma 3 (
arma3/) - Squad (
squad/) - Insurgency Sandstorm (
insurgencysandstorm/) - Space Engineers (
space_engineers/) - Conan Exiles (
conanexiles/) - The Forest (
theforest/) - Don't Starve Together (
dontstarvetogether/) - Factorio (
factorio/) - TeamSpeak 3 (
teamspeak3/)
Lower Priority (Legacy/Niche):
- All remaining games in
modules/billing/docs/
Research Needed Per Game
For each game, research and document:
-
All Network Ports:
- Game port (TCP/UDP)
- Query port
- RCON/Admin port
- Voice chat ports (if applicable)
- Steam port (if Steam-based)
- Additional service ports (web interfaces, etc.)
-
Startup Parameters:
- Command-line flags
- Memory allocation
- Server configuration switches
- Performance optimization flags
-
Common Issues (from internet research):
- "Server won't start" specific to that game
- Connection problems
- Performance/lag issues specific to game engine
- Mod/plugin conflicts
- Save corruption issues
- Update/patch problems
-
Game-Specific Configuration:
- Main config file locations
- Critical settings
- Player limits
- World/map settings
Documentation Template Structure
Each game's index.php should follow this structure:
<?php
/**
* {Game Name} Server Documentation
*/
?>
<!-- Navigation with icons -->
<div style="background: #1e3a5f...">
<h3>📚 Quick Navigation</h3>
<div>
<a href="#quick-info">Quick Info</a>
<a href="#ports">🔌 Ports</a>
<a href="#installation">Installation</a>
<a href="#configuration">Configuration</a>
<a href="#parameters">⚙️ Startup Parameters</a>
<a href="#troubleshooting">🔧 Troubleshooting</a>
<a href="#performance">Performance</a>
</div>
</div>
<h1>{Game Name} Server Hosting Guide</h1>
<h2 id="quick-info">Quick Info</h2>
<!-- Key stats in styled box -->
<h2 id="ports">🔌 Network Ports Used</h2>
<!-- Table with all ports, protocols, purposes, required/optional -->
<!-- Firewall examples -->
<!-- Port security notes -->
<h2 id="installation">Installation & Setup</h2>
<!-- Step-by-step installation -->
<h2 id="configuration">Server Configuration</h2>
<!-- Config file examples -->
<h2 id="parameters">⚙️ Startup Parameters</h2>
<!-- Command-line flags -->
<!-- Parameter explanations -->
<h2 id="troubleshooting">🔧 Troubleshooting</h2>
<!-- Common Issues section -->
<!-- Server Won't Start -->
<!-- Connection Problems -->
<!-- Performance Issues -->
<!-- Game-specific problems -->
<h2 id="performance">Performance Optimization</h2>
<!-- Optimization tips -->
<!-- Additional Resources -->
<!-- Important Notes -->
Testing Checklist
PayPal Payment Flow:
- Log into billing site
- Add server to cart
- Apply coupon (optional)
- Click PayPal button
- Complete sandbox payment
- Verify success page loads
- Check invoice marked as paid in database
- Verify no
NO_USER_SESSIONinlogs/payment_capture.log
Cart Page:
- Cart page loads with correct header/menu (same font as index.php)
- Footer appears with timestamp
- Favicon displays in browser tab
- Remove item (trash icon) works via AJAX
- Cart refreshes without full page reload after removal
- Database row hard-deleted (invoice removed from table)
Documentation:
- Navigate to
/docs.php(or docs index) - Click on Minecraft documentation
- Verify new Ports section displays correctly
- Verify navigation links jump to correct sections
- Test on mobile/tablet for responsive layout
Next Steps (Priority Order)
- Test PayPal payment flow end-to-end (sandbox environment)
- Verify cart removal functionality (AJAX + database deletion)
- Begin documentation expansion:
- Start with top 10 popular games
- Research ports/parameters/issues for each
- Update docs using Minecraft template
- Test navigation and layout
- Consider automation:
- Script to validate all game docs have required sections
- Port information database/reference
- Common troubleshooting template generator
Files Modified in This Session
modules/billing/api/capture_order.php- Fixed session name issuemodules/billing/cart.php- Removed debug logging, fixed header/footermodules/billing/docs/minecraft/index.php- Added ports section, enhanced navigation
Files to Review
modules/billing/logs/payment_capture.log- Check for successful capturesmodules/billing/data/debug_cart.log- Should no longer be written to- Database table
{$table_prefix}billing_invoices- Verify removals are hard-deleted
End of Summary