PHP Development Guidelines

PHP Development Guidelines Best practices for PHP development from the EE guys.

Comments Off on PHP Development Guidelines

Apache Icons

Some icons which can be used to enhance mod_autoindex http://www.famfamfam.com/lab/icons/

Comments Off on Apache Icons

WordPress – Increasing maximum upload size

<VirtualHost *:80> DocumentRoot  "/blah/blah/blah" ServerName    www.blahblahblah.net ServerAlias   blahblahblah.net ServerAdmin   webmaster@blahblahblah.net CustomLog     logs/access/www.blahblahblah.net.log combined ErrorLog      logs/error/www.blahblahblah.net.log # if upload_max_filesize and post_max_size are NOT the same Wordpress # will set the maximum…

Comments Off on WordPress – Increasing maximum upload size

How to Move WordPress Blog to New Domain or Location

To update WordPress options with the new blog location, use the following SQL command: UPDATE wp_options SET option_value = replace(option_value, 'http://www.old-domain.com', 'http://www.new-domain.com') WHERE option_name = 'home' OR option_name = 'siteurl';…

Comments Off on How to Move WordPress Blog to New Domain or Location

htaccess surpress / display PHP errors

# supress php errors php_flag display_startup_errors off php_flag display_errors off php_flag html_errors off php_value docref_root 0 php_value docref_ext 0 # display php errors php_flag display_startup_errors on php_flag display_errors on php_flag…

Comments Off on htaccess surpress / display PHP errors

Vertical text in an image

<?php header ("Content-type: image/png"); // imagecreate (x width, y width) $text = str_replace('_', ' ', $_GET['text']); $text = ucwords($text); $img_handle = @imagecreatetruecolor (30, 180) or die ("Cannot Create image"); //…

Comments Off on Vertical text in an image

301 redirection with Apache config or .htaccess file

<VirtualHost *:80> DocumentRoot "/home/apache/http/example.co.uk/www" ServerName www.example.co.uk ServerAlias example.co.uk ServerAlias example-ltd.co.uk www.example-ltd.co.uk ServerAlias example.net www.example.net ServerAlias example.com www.example.com ServerAdmin webmaster@www.example.co.uk #Log files CustomLog logs/access/www.example.co.uk.log combined ErrorLog logs/error/www.example.co.uk.log # redirect all non-www…

Comments Off on 301 redirection with Apache config or .htaccess file