Fading Coder

One Final Commit for the Last Sprint

Disabling Unused WordPress Default Widgets with Code Examples

WordPress includes numerous default widgets, many of which may be unnecessary for specific sites. Removing unused widgets can streamline the admin interface and reduce clutter. This is achieved by adding code to the theme's functions.php file to unregister widgets during the widgets_init action. One...

Accessing Global Data with PHP Superglobal Arrays

PHP provides several built-in superglobal arrays that remain accessible throughout all scopes of a script. These variables store environment, user input, and server metadata without requiring explicit scope imports. The core superglobals include: $GLOBALS – All variables available in global scope $_...

AES-256-CBC with PKCS#5 Padding in PHP

Cipher: AES in CBC mode with PKCS#5 padding (equivalent to PKCS#7 for AES) Key size: 256 bits IV: all zeros, 16 bytes (AES block size) Ciphertext encoding: hex Common pitfalls include using ECB instead of CBC, omitting PKCS#5 padding, mismatching key sizes, or using a nonzero/encorrect IV length. A...

PHP 7.4 Development Stack on macOS Catalina with Nginx, MySQL, and Redis (including phpredis)

macOS Catalina (10.15) ships with Apache and several scripting languages preinstalled, but the following setup uses Nginx, Homebrew PHP 7.4, MySQL 8, and Redis. The default shell is zsh; commands assume ~/.zshrc for shell configuration. Terminal and IDE Install iTerm2 by dragging the app into /Appli...

Streaming Excel-Compatible Tables in PHP Using HTTP Headers

When you don’t need a heavy library like PHPExcel/PhpSpreadsheet, you can generate a tab‑separated file (TSV) and instruct the browser to download it as an Excel‑readable worksheet using standard HTTP headers. Reusable exporter <?php /** * Stream an Excel-readable TSV file to the browser. * * @pa...

Resolve PhpStorm "Interpreter is not specified or invalid" on WAMP (Windows)

Symptom PhpStorm displays: "Interpreter is not specified or invalid. Press ‘Fix’ to edit your project configuration." This occurs when the IDE cannot locate a valid PHP CLI executable or when the debugger extension is missing from the selected runtime. Target environment Windows with WAMP installed...