================================================================================ SPEEDots Server File Upload - Diagnostic Checklist ================================================================================ CRITICAL ISSUE IDENTIFIED: The server at http://secupgrade.com/speedots/speedstore.php has the OLD version of the code. Even though you uploaded, the file is not being used. ================================================================================ STEP 1: VERIFY CURRENT SERVER FILE VERSION ================================================================================ Test if server has updated code by running this command in your browser or curl: curl -X POST http://secupgrade.com/speedots/speedstore.php \ -H "Content-Type: application/json" \ -d "{\"action\":\"debug_games\"}" EXPECTED RESULTS: ✓ GOOD: Returns JSON with game data and table columns ✗ BAD: Returns {"success":false,"error":"Unknown action"} If you get "Unknown action", the server still has the old file. ================================================================================ STEP 2: CHECK FOR MULTIPLE SPEEDSTORE.PHP FILES ================================================================================ Your server may have multiple copies of speedstore.php in different locations: Common locations to check: 1. /public_html/speedots/speedstore.php 2. /www/speedots/speedstore.php 3. /htdocs/speedots/speedstore.php 4. /httpdocs/speedots/speedstore.php 5. ~/speedots/speedstore.php ACTION: Use your hosting control panel or FTP to search for ALL files named "speedstore.php" on your server. There may be duplicates! ================================================================================ STEP 3: VERIFY UPLOAD LOCATION ================================================================================ The URL http://secupgrade.com/speedots/speedstore.php maps to a specific file path on your server. Find out which one: In your hosting control panel (cPanel, Plesk, etc.): 1. Go to File Manager 2. Navigate to the document root for secupgrade.com 3. Look for the "speedots" folder 4. The speedstore.php file should be inside that folder Common document root paths: - /home/[username]/public_html/ - /var/www/html/ - /usr/share/nginx/html/ So the full path might be: /home/[username]/public_html/speedots/speedstore.php ACTION: Write down the EXACT full path where the file should be uploaded. ================================================================================ STEP 4: VERIFY FILE PERMISSIONS ================================================================================ After uploading, the file must have correct permissions: Required permissions: 644 (rw-r--r--) In FTP client or File Manager: - Right-click speedstore.php - Select "File Permissions" or "CHMOD" - Set to 644 or check: Owner Read+Write, Group Read, World Read If permissions are wrong, PHP may fall back to an older cached version. ================================================================================ STEP 5: CLEAR SERVER-SIDE CACHES ================================================================================ Your server may be caching the old PHP file. Clear all caches: A) PHP OPcache: - In cPanel: Software > Select PHP Version > Extensions > Disable/Enable OPcache - Or create a file clear_cache.php: - Visit http://secupgrade.com/speedots/clear_cache.php B) Server Cache: - In cPanel: click "Clear Cache" if available - In Plesk: Tools & Settings > Server Management > Service Management > Restart PHP-FPM C) Browser Cache: - Hard refresh your browser (Ctrl+Shift+R) ================================================================================ STEP 6: VERIFY UPLOADED FILE CONTENTS ================================================================================ After uploading, download the file back from the server to verify it uploaded correctly: 1. Download speedstore.php from server using FTP or File Manager 2. Save it as speedstore_downloaded.php 3. Open it in a text editor 4. Search for these functions to confirm it's the new version: Search for: "function getPayPalButton(" Search for: "function debugGames()" Search for: "case 'get_paypal_button':" If you DON'T find these, the upload failed or went to wrong location. ================================================================================ STEP 7: CHECK FILE SIZE ================================================================================ The NEW speedstore.php file should be approximately 30-35 KB in size. The OLD version is probably 15-20 KB. Check file size: - In File Manager: file size shown in file list - In FTP client: file size shown in details - Via command line: ls -lh speedstore.php If file size is small, it's the old version. ================================================================================ STEP 8: UPLOAD VERIFICATION METHOD ================================================================================ To ensure upload succeeded, add a version marker to speedstore.php: 1. Open your LOCAL copy of speedstore.php 2. Add this at the very top after true, 'version' => SPEEDSTORE_VERSION, 'timestamp' => date('Y-m-d H:i:s') ]); exit; 4. Re-upload the file 5. Test with: curl -X POST http://secupgrade.com/speedots/speedstore.php \ -H "Content-Type: application/json" \ -d "{\"action\":\"check_version\"}" Should return: {"success":true,"version":"2025-10-10-UPDATED",...} ================================================================================ STEP 9: FTP UPLOAD BEST PRACTICES ================================================================================ If using FTP to upload: 1. Use BINARY mode, not ASCII mode - In FileZilla: Transfer > Transfer Type > Binary - ASCII mode can corrupt PHP files! 2. Delete old file first, then upload new one - Don't just overwrite - Delete speedstore.php from server - Upload new speedstore.php 3. Verify upload completed - Check file size matches local file - Check modification timestamp is recent 4. Common FTP mistakes: - Uploading to wrong directory - File name has extra extension (.php.txt) - Upload incomplete/corrupted ================================================================================ STEP 10: ALTERNATIVE UPLOAD METHOD ================================================================================ If FTP isn't working, try uploading via hosting control panel: In cPanel: 1. File Manager > Navigate to speedots folder 2. Click "Upload" button 3. Select speedstore.php from your computer 4. If file exists, confirm "Overwrite" 5. After upload completes, verify file size and date ================================================================================ STEP 11: CHECK .HTACCESS FOR REDIRECTS ================================================================================ Your server may have .htaccess rules redirecting to an old file: 1. Check if .htaccess exists in /speedots/ folder 2. Look for rules like: RewriteRule speedstore.php old_speedstore.php 3. If found, remove or comment out redirect rules ================================================================================ STEP 12: CHECK PHP ERROR LOGS ================================================================================ If file is uploaded but not working, check PHP error logs: In cPanel: - Metrics > Errors - Look for recent errors related to speedstore.php Common errors: - Syntax errors (missing semicolon, bracket) - Database connection errors - Function not defined errors ================================================================================ TROUBLESHOOTING FLOWCHART ================================================================================ START: Upload speedstore.php to server ↓ Test: curl debug_games action ↓ ├─ Returns "Unknown action" → File not updated on server │ ↓ │ Check: Multiple speedstore.php files exist? │ ↓ │ Yes → Delete old copies, keep only new one │ No → Check upload location is correct │ └─ Returns game data → SUCCESS! File is updated ↓ Test: PayPal button should now work ================================================================================ EXPECTED OUTCOMES AFTER SUCCESSFUL UPLOAD ================================================================================ Once the file is correctly uploaded, these should work: 1. Debug games endpoint: curl -X POST http://secupgrade.com/speedots/speedstore.php \ -H "Content-Type: application/json" \ -d "{\"action\":\"debug_games\"}" Returns: {"success":true,"total_games":2,"games":[...]} 2. PayPal button: - Click "Buy Now" button in launcher - Should open PayPal checkout in browser - No "Game not found" error 3. Free game claiming: - Click "Play for Free" button - Should generate receipt token - Game added to library 4. Version check: curl -X POST http://secupgrade.com/speedots/speedstore.php \ -H "Content-Type: application/json" \ -d "{\"action\":\"check_version\"}" Returns: {"success":true,"version":"2025-10-10-UPDATED"} ================================================================================ IF ALL ELSE FAILS ================================================================================ If you've tried everything and the file still won't update: 1. Contact your hosting provider support - Tell them: "I'm uploading a PHP file but the old version keeps running" - Ask them to check for caching, multiple files, or .htaccess redirects 2. Try renaming the file: - Upload as speedstore_new.php - Update launcher to use new URL - Test if new file works 3. Check server configuration: - PHP version (should be 7.4 or 8.x) - PDO extension enabled - MySQL extension enabled ================================================================================ NEXT STEPS ================================================================================ 1. Work through this checklist step by step 2. Document which step revealed the issue 3. Once file is verified uploaded, test with debug_games action 4. If that works, test PayPal button and free claiming Remember: The game data IS in the database (game_id 7 and 8 exist). The ONLY problem is the server-side PHP file needs to be updated! ================================================================================