Set or remove the read-only attribute assigned to files with PHP chmod

Chmod.php, change file attributes with PHP, to make files read only or normally accessible on Windows IIS servers. Sometimes you need chmod to make files read only on your website, or make them normally accessible in case they already are read only. For instance Drupal's settings.php configuration file, or WordPress Contact Form 7 temporary captcha files, are examples of read-only files.

Validate MIME types with PHP Fileinfo

How to check the file type in PHP and secure file uploads: it is important to validate MIME types in PHP. Especially of files uploaded through an upload form to your website. Using PHP, the best way to validate MIME types is with the PHP extension Fileinfo. Any other method might not be as good or secure as you might think.
Umbraco Project Belle

Configure SQLServer sessionState for Umbraco

Prepare your Umbraco website for high performance web garden or web farm and load balancing environments: Store your sessions out-of-process (OutProc). As opposed to the default in-process (inProc) sessions, where sessions are saved in the worker process. Create a high performing, fast loading Umbraco website.

Optimize all MySQL tables with PHP/MySQLi multi_query

PHP script to make your MySQL database smaller, leaner and faster! The PHP MySQLi extension supports multiple queries, which are concatenated by a semicolon, with mysqli->multi_query. We use this to optimize all MySQL tables, in a single multi-query statement. Neat! Optimizing MySQL tables is important to keep tables small and fast. This boosts MySQL, PHP and website performance and we all love that, don't we?

Add (custom) headers to MailMessage class

How to add custom headers to System.Net.Mail? When sending an email using the MailMessage class (System.Net.Mail namespace) in an ASP.NET website, certain email headers like Message-ID are not always set. When a Message-ID header is missing, email might be blocked by the recipients SMTP server like Gmail. Therefore it is necessary to set such headers.
WordPress.org logo

Clean-up WordPress spam comments and meta data

How to delete WordPress spam comments and meta data with phpMyAdmin. A lot of WordPress spam comments and meta data will keep your WordPress database huge, and slows down your site. It's best to delete spam comments regularly, but if you're facing hundreds of thousands spam comments, here is how to delete them all in bulk.

WordPress plugin “In Over Your Archives” Call-time pass-by-reference fix for PHP 5.4

How to fix PHP Call-time pass-by-reference has been removed in errors. The following PHP fix goes for nearly all PHP Call-time pass-by-reference errors: The WordPress plugin In Over Your Archives is a plugin to display your archive page in a nice way, just like on inoveryourhead.net. The plugin hasn't been updated in quite some time and breaks with PHP version 5.4.

How to load google-code-prettify syntax highlighting without plugins

If you run a WordPress blog where you display (parts of) source code, syntax highlighting is a must! It prettifies the code which makes it easier to read and it distinguishes code from text. However, most syntax highlighting is made available through plugins, and we all know too many plugins bring a lot of overhead to your blog. So, conditional load in WordPress: Load javascript only on posts in WordPress.

Optimize images for the web in bulk

Optimizing and loss-less compressing images is one of those items that always pops up when analyzing your website with Google PageSpeed Insights. Images have to be loss-less compressed to save many bytes of data and thus bandwidth. This speeds up the download time of your website. But, how do we optimize images for the web? Or, what if I have hundreds of images that needs optimization? Let's optimize and loss-less compress images in bulk, read on.
Open-Xchange logo

Mount an Open-Xchange InfoStore on Linux

Open-Xchange is an all-in-one Groupware solution, providing not only email, but also a CalDAV calendar, tasks, file- or InfoStore and an online document editor. All shareable with other users. The InfoStore is used to save documents online, in the cloud. This article is about accessing and mounting your Open-Xchange remote WebDAV InfoStore file share, on Linux with mount.davfs or Dolphin GUI file manager.