Featured Articles

black and brown industrial machine

WordPress

Gutenberg block for adding AdSense ads

A Gutenberg block for inserting Google AdSense ads into posts. Vibe coding WordPress plugins: I used Google Gemini to create a WordPress Block Editor block which inserts an Adsense ad automatically after the more tag. And wherever you want an advertisement to appear. Sweet! (-:


Latest articles

WordPress

Last updated:

Delete spam comments after three (3) days

How to change Akismet interval to three days instead of 15 days for deleting spam comments using the akismet_delete_comment_interval filter.

Anime Dude with Retro-futuristic Jetpack Soaring Above Neon-lit Cityscape

WordPress

Last updated:

Remove Jetpack email sharing service

Remove Jetpack email sharing service using WordPress plugin or theme functions.php file. It’s often abused by spammers

WordPress

Last updated:

Clear PHP opcode caches before WordPress Updates: ease the updating process

Clear PHP opcode caches before WordPress core-, plugin- and theme updates are applied, easing the updating process. Popular PHP opcode caches are OPcache, WinCache and APC. This little WordPress Must Use Plugin tries to flush opcode caches, making your live a bit easier when updating WordPress Core, Plugins and Themes.

silver pocket watch at 10 00

WordPress

Last updated:

Measure WordPress loading time and queries

How to measure WordPress loading time and executed database queries? During an HTTP request, WordPress executes a lot of queries on your MySQL database. Not just the database queries take time, also loading and executing PHP takes time.

Security

Last updated:

“How we broke PHP, hacked Pornhub and earned $20,000”

It all started by auditing Pornhub, then PHP and ended in breaking both… We have gained remote code execution on pornhub.com and have earned a $20,000 bug bounty on Hackerone. We have found two use-after-free vulnerabilities in PHP’s garbage collection algorithm. Those vulnerabilities were remotely exploitable over PHP’s unserialize function.

Microsoft Driver fro SQL Server 2.0 architecture (SQLSRV and PDO_SQLSRV)

Windows Server

Last updated:

How to install Microsoft’s SQL Server Driver for PHP

This post walks you through the steps necessary to install the SQL Server driver and SQLSRV extension for PHP, on Windows Server IIS of course. Using modern PIE installation method.

Keys

Useful

Last updated:

Generate pseudorandom passwords with OpenSSL

OpenSSL comes in handy when you need to generate passwords or random strings. For example for system accounts and services. In this short post I’ll give you a quick example on how to generate random passwords with OpenSSL in Linux (Bash), Windows and PHP.

blue elephant plush toy on black laptop computer -- Photo by Ben Griffiths

Web applications

Last updated:

Optimize PHP OPcache configuration

Optimize PHP OPcache configuration and make it perform even better. After realpath_cache_size, the OPcache cache mechanism is the next important step to fine-tune. With just a few tweaks you tune OPcache to perform much better

blue elephant plush toy on black laptop computer -- Photo by Ben Griffiths

Web applications

Last updated:

PHP 5.6 default_charset change may break HTML output

A change in PHP’s default_charset php.ini setting causes HTML output to break if you try to set a different charset in your HTML head. It also might break functions like htmlentities() and htmlspecialchars().

blue elephant plush toy on black laptop computer -- Photo by Ben Griffiths

Web applications

Last updated:

How to set a good PHP realpath_cache_size

Learn how to optimize PHP performance by checking and setting PHP realpath_cache_size. The realpath_cache_size size represents the total number of bytes in the path strings stored, plus the size of the data associated with the cache entry