Tutorials for Developers & Sysadmins

Step-by-step guides for the work we actually do — Laravel, PHP, WordPress, MySQL, Linux servers, and the occasional rabbit hole. Every command has been run on a real machine; nothing is theoretical.

How to Fix Missing Authorization Header in PHP Requests

Fix a missing Authorization header in PHP requests: forward it via .htaccess RewriteRule [E=...] or Apache SetEnvIf. Includes cPanel Pre-VirtualHost…

how7o

How to Extract a .tar.gz Archive in PHP

Extract a .tar.gz archive in PHP without shell access using PharData — two-step decompress() + extractTo(), or one-call on newer…

how7o

How to Enable the PHP DOM Extension

Enable the PHP DOM extension: install php-xml (or php8.x-xml), uncomment extension=dom in php.ini or run phpenmod dom, then restart PHP-FPM…

how7o

How to Duplicate a DIV into Another DIV with jQuery

Duplicate a div into another with jQuery using .clone() for the full element or .html() for inner markup. Includes event-handler…

how7o

How to Disable or Enable an Input with JavaScript or jQuery

Disable or enable an input with JavaScript: element.disabled = true/false. In jQuery 1.6+, use .prop('disabled', true) — not .attr(). Includes…

how7o

How to Delete All Lines in a File with Vi or Vim

Delete all lines in a file with Vi or Vim using :%d (shortest), :1,$d (explicit range), or ggdG (normal mode).…

how7o

How to Create Ajax-Based Pagination in DataTables

Enable Ajax-based pagination in DataTables with serverSide: true. Includes the request/response shape and a working Laravel controller for paginate, sort,…

how7o

How to Create a Login and Registration System in Laravel

Create a login and registration system in Laravel using laravel/ui (Bootstrap), laravel/breeze (Tailwind, minimal), or laravel/jetstream (teams, 2FA, API).

how7o

How to Create a Folder If It Does Not Exist in PHP

Create a folder if it doesn't exist in PHP: check with is_dir(), create with mkdir($path, 0755, true). Includes a race-safe…

how7o

How to Convert an Image to a Base64 String in JavaScript

Convert an image to a base64 string in JavaScript: fetch + FileReader.readAsDataURL for URLs, FileReader for file inputs, canvas.toDataURL for…

how7o