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

Codebase

Last updated:

Optimize all MySQL tables with MySQLi multi_query

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.

Windows Server logo

Windows Server

Last updated:

Delete files recursively with ForFiles in Windows Server

The Forfiles command on Windows selects and executes a command on a file or set of files. Forfiles is ideal for batch processing through scripts, for instance on Windows Server systems. With Forfiles, you can run a command on or pass arguments to multiple files. For example, you could run the type or del command on all files in a tree with the .txt extension.

WordPress

Last updated:

Block WordPress comment spammers manually

The less spammers hit your WordPress blog, the better your blog performs, is one of my opinions. A second is, the less unnecessary plugins you use on your WordPress blog, the better. So, a little while ago I decided to remove plugins like Stop Spammer Registration Plugin and do its work myself.

Windows Server

Last updated:

Create your own CDN using IIS Outbound Rules

Use IIS Outbound Rules and URL Rewrite Module to create a custom created Content Delivery Network (CDN) for static content ofloading and speed-up your website.

GNU/Linux

Last updated:

Installing Debian GNU/Linux 7.0 (Wheezy) on HP EliteBook 8570w

I was FedUp with Fedora Core 17/18 after a day, so I decided to return to my old love: Debian GNU/Linux. It’s been a couple of years, but I’m happy to be back! Just run the netinst installer which will take care of the most.

Web applications

Last updated:

Connect to SqlCe (SQL Server Compact) database from ASP

Here is how to install the Microsoft.SQLSERVER.CE.OLEDB.4.0 Provider and use classic ASP to connect to an SqlCe (SQL Server Compact) database sdf file, as a Microsoft Access database replacement.

Windows Server

Last updated:

Grep for forensic log parsing and analysis on Windows Server IIS

How to use GnuWin32 ported tools like grep.exe and find.exe for forensic log file analysis in Windows Server. Find webshells and backdoors in websites, check visitor’s IP addresses or hits to backdoor/webshell files in IIS log files easy. Command-line log analysis in Windows Server, search for Joomla-, WordPress-, Drupal- and PHP- malware & backdoors in your website with grep and find.

PHP logo by Colin Viebrock

Codebase

Last updated:

Connect to MS SQL Server with PHP 5.3+

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.

Useful

Last updated:

Redirect HTTP to HTTPS

In this post I provide you various HTTP to HTTPS redirection methods, for Windows Server IIS and Linux Apache. Use these examples to your advantage to secure the traffic between your visitors and your website.

Microsoft Internet Information Services (IIS) logo

Web applications

Last updated:

MySQL Connector/NET and Entity Framework

How to let MySQL Connector/NET and Entity Framework play nicely. This blog post is a quicky and an oldy… Since we still receive a reasonable amount of questions about this topic at the customer service of my employer I’m posting this here, with some commonly made mistakes and points of attention.

Microsoft Internet Information Services (IIS) logo

Windows Server

Last updated:

IIS 6.0: stop, start or recycle application pools

Somewhere in my archives, I found this VBScript for stopping, starting and recycling an IIS 6.0 application pool. It doesn’t use adsutil.vbs. It might come in handy, because it’s always very time consuming to start the Computer Management console, click through Services and Applications > Internet Information Services (IIS) Manager > Application Pools to find the Application Pool you want to start, stop or recycle.

Web applications

Last updated:

Create your own PHP based Origin Pull CDN

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.

Microsoft Internet Information Services (IIS) logo

Windows Server

Last updated:

Convert .htaccess to web.config

This post describes some of the IIS URL Rewrite Module web.config equivalents of commonly used Apache .htaccess settings. You’ll learn how to translate .htaccess content to IIS web.config, this is useful when you need to migrate your website from Apache to Windows Server IIS.