Skip to content

WebCheatSheet

The easy way to know

  • PHP
  • HTML
  • JavaScript
  • SQL
  • ASP
  • MS Access Functions
  • SaaS
  • Email

Month: October 2026

PHP

Reject NUL Bytes Before Saving PostgreSQL Text with PHP

Sergey KornilovOctober 10, 2026

Detect NUL bytes in PHP before inserting text into PostgreSQL, and use bytea when the value is truly binary data.

PHP

Fix Local PHP Asset 404 Errors by Setting the Document Root

Sergey KornilovOctober 9, 2026

Make local CSS, SVG, and image URLs match production by starting the PHP development server with the correct public document root.

JavaScript

Call a Server Route from an HTML Button with Fetch

Sergey KornilovOctober 9, 2026

Use an HTML button and the Fetch API to send an item ID to a server route instead of trying to call a Python or PHP function directly from onclick.

JavaScript

Fix “prompt() Is Not Supported” in JavaScript

Sergey KornilovOctober 9, 2026

Run window.prompt in an actual browser page or replace it with an HTML input when the JavaScript host does not support browser dialogs.

SQL

Back Up SQL Server to a Network Share Without Access Denied Errors

Sergey KornilovOctober 9, 2026

Grant the SQL Server Database Engine service identity access to a UNC share before running BACKUP DATABASE from SSMS or a maintenance plan.

PHP

Enable PHP Session Strict Mode and Regenerate IDs Safely

Sergey KornilovOctober 9, 2026

Enable PHP session strict mode, secure the session cookie, and regenerate the ID after authentication without accepting attacker-supplied IDs.

PHP

Reject Excessively Nested Query Strings in PHP

Sergey KornilovOctober 8, 2026

Turn PHP parse_str nesting warnings into a controlled 400 response and limit query-string complexity before malformed requests reach application code.

SQL

Calculate Daily Ticket Counts and Sales in One SQL Query

Sergey KornilovOctober 8, 2026

Use SQL Server conditional aggregation to return ticket counts and sales totals per day and point-of-sale terminal without a fragile PIVOT query.

SQL

Prevent SQL Server JDBC Connections from Hanging Forever

Sergey KornilovOctober 8, 2026

Set a finite SQL Server JDBC socket timeout and align pool validation settings so silently dropped network connections cannot consume application threads forever.

PHP

Keep PHP Image Uploads and Database Records in Sync

Sergey KornilovOctober 8, 2026

Coordinate PHP file moves with PDO transactions and compensating cleanup so failed product-image updates do not leave broken records or orphaned files.

Posts navigation

Older posts
Newer posts

Recent Posts

  • Recover SQL Server from a Stuck Snapshot Backup Suspension
  • Use Level-Specific Serilog Output Without Duplicate Events
  • Handle Invalid Encoding Errors in PHP mbstring
  • Load JavaScript Only on WooCommerce Product Pages
  • Detect Missing PHP Attribute Imports Before They Fail Silently

Recent Comments

  1. Build Accessible Tabs with JavaScript – WebCheatSheet on How to Control Tab Order in HTML
  2. Verify SQL Server Backups with CHECKSUM and VERIFYONLY – WebCheatSheet on Fix SQL Server ‘Insufficient Access Rights’ During Backup
  3. Get the Latest MySQL Value Before Two Dates – WebCheatSheet on SQL GROUP BY
  4. Count Duplicate Values in a JavaScript Array – WebCheatSheet on JavaScript Arrays
  5. Fix MySQL Error 1038 for Wide Rows and Filesort – WebCheatSheet on Determine the MySQL Version from the Command Line

Archives

  • October 2026
  • September 2026
  • August 2026
  • October 2023
  • July 2023
  • June 2023
  • May 2023
  • April 2023
  • March 2023
  • February 2023
  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022
  • August 2022

Categories

  • ASP
  • Email
  • HTML
  • JavaScript
  • MS Access Functions
  • PHP
  • SaaS Architecture
  • SQL
  • Uncategorized
Copyright © 2026 WebCheatSheetFresh News by Ascendoor | Powered by WordPress.