Web applications
Last updated:
Redirect old URL to new URL or send 404 page with PHP
Use a PHP redirect script to redirect old PHP URLs to new ones. This examples uses a 301 Moved Permanently redirect, perfect for SEO.
PHP Runtime Optimization, Cross-Platform Architecture & Hardening
Welcome to the PHP infrastructure and runtime optimization hub on saotn.org. In modern enterprise environments, PHP serves as the execution engine for critical web applications and content management systems like WordPress. However, achieving maximum request throughput and absolute stability requires deep server-side configuration, efficient process allocation, and tight security controls—whether you are deploying on open-source infrastructure or integrated Windows stacks.
This section delivers practical, hands-on administration blueprints for managing PHP environments across both GNU/Linux and Windows Server hosts. From fine-tuning process managers and setting up caching engines to executing secure version upgrades, these guides provide verified solutions to eliminate performance bottlenecks and harden your application layer.
Core PHP Infrastructure & Performance Pillars
To help you architect a high-availability deployment, our technical PHP documentation is structured around key operational areas:
Linux PHP-FPM Process Tuning: Maximize your server’s request capacity under heavy traffic. Learn how to audit and optimize PHP-FPM pool configurations (www.conf), balance dynamic vs. on-demand process managers, and eliminate gateway timeouts.
Windows & IIS FastCGI Architecture: Bridge the gap between the Windows ecosystem and the PHP engine. Master the nuances of high-performance FastCGI handler settings, environment path variables, and reliable process recycling.
Advanced Caching & Extensions: Slash execution latency and resource consumption. Discover how to leverage object caching bridges, fine-tune Zend OPcache configurations, and implement specialized windows extensions like WinCache to dramatically improve database delivery.
Runtime Hardening & Security (php.ini): Protect your execution environment from web-borne attack vectors. Implement strict server-side boundaries by disabling high-risk functions, isolating open base directories, and optimizing execution limits.
Browse the chronological feed below for concrete walk-throughs on PHP memory optimization, real-path cache sizing, and real-world application layer performance tuning.
Web applications
Last updated:
Use a PHP redirect script to redirect old PHP URLs to new ones. This examples uses a 301 Moved Permanently redirect, perfect for SEO.
WordPress
Last updated:
How to display commas in WordPress tags? And why have commas in WP taxonomies?
Useful
Last updated:
A useful PHP script to check if your website is up and online available. It uses PHP and cURL. This script comes in handy because website uptime and availability is important, and you want your website to be always online available.
Web applications
Last updated:
Exploit PHP’s mail() function for remote code execution. Apparently, if you are able to control the 5th parameter of the mail() function ($options), you have the opportunity to execute arbitrary commands.
Web applications
Last updated:
Outdated but fun: PHP 7 with OPcache in IIS Express for Microsoft WebMatrix 3: create your DevOps with Microsoft WebMatrix and IIS Express
WordPress
Last updated:
Learn how to override wp-mail() and send secure email using authenticated SMTP and StartTLS from WordPress.
WordPress
Last updated:
How to identify, block, mitigate and leverage xmlrpc.php scans, brute-force, and user enumeration attacks on WordPress sites… Secure WordPress xmlprc.php interface and reduce service disruption.
Web applications
Last updated:
Learn how to speed-up Joomla performance on Windows Server IIS using these 8 simple, but important, tips. Add caching, gzip compression, set your sessions & optimize MySQL database functions.
Windows Server
Last updated:
On IIS, Contact Form 7 captcha has one HUGE disadvantage: temporary captcha files placed in wp-content/uploads/wpcf7_captcha, are not automatically removed. Here is how to remove Contact Form 7 temporary captcha files on IIS…
Codebase
Last updated:
Change file attributes with PHP chmod to make files read-only or normally accessible on Windows Server IIS.
Web applications
Last updated:
PHP script to make your MySQL database smaller, leaner and faster by optimizing all tables with mysqli multi_query().
Codebase
Last updated:
Check the connectivity of multiple MySQL servers, and connect to the servers in a loop. Here are two example code snippets
Codebase
Last updated:
Async PHP calls with XMLHttpRequest
Codebase
Last updated:
PHP MySQLi extension supports multiple queries which are concatenated by a semicolon. We can use this to optimize all MySQL tables in one single multi_query statement.
Useful
Last updated:
Learn how to fix your PHP config instead of turning off CURLOPT_SSL_VERIFYPEER in php.ini and overcome certificate validation errors with cURL and PHP.
Codebase
Last updated:
As of PHP 5.3.2 you have to use the SQLSRV API functions to connect to an Microsoft SQL Server database from PHP. For example, use sqlsrv_connect() to create a connection resource and open a connection. Learn how to connect to a Microsoft SQL Server database using PHP 5.3+ and SQLSRV.
Web applications
Last updated:
The advantage of having your website content hosted on a Content Delivery Network (CDN) is having your content distributed and stored across the Globe. Utilizing the network of the Content Delivery Network provider.
Windows Server
Last updated:
In this article you’ll learn how to install and set up PHP with the Windows Cache Extension (WinCache) on windows IIS web servers. WinCache enabled PHP gives a great PHP performance boost for your WordPress-, Drupal or Joomla website. This post will show you it’s not hard to set up high performance PHP hosting on IIS.
Web applications
Last updated:
Block and filter unwanted web HTTP traffic with blocklists, on both IIS and Apache. Protect your website easily with this PHP blocklist class. Create your own HTTP web blocklist filter.
Windows Server
Last updated:
When you host your PHP website on Windows Server IIS, you may receive an “No input file specified” error message, when a HTTP request is made to non-existing .php files. When this happens you probably have no Request Restrictions configured in IIS PHP handler settings. Here is how to fix the “no input file specified error” with PHP and IIS.