How To Make SEO-Friendly URLs Using Apache mod_rewrite And PHP

Author: , December 15th, 2011

Below information copied without permission from Josh Sharp’s site because it is too valuable to lose – great work Josh, and THANKS!

Note: Only rewrite if the requested file is not an existing directory (-d) or a file (-f)

How To Format Numbers Using PHP Or Smarty

Author: , December 1st, 2011

PHP number_format($number, 2, ‘.’, ‘,’); SMARTY {$number|number_format:2:”.”:”,”}

How To Calculate The Number Of Days Between Dates In PHP

Author: , November 9th, 2011

http://www.php.net/manual/en/datetime.diff.php

How To Upgrade PHP to PHP53 On CentOS

Author: , August 22nd, 2011

To get mcrypt installed, read this post: http://www.ericmichaelstone.com/?p=4702

How To Install mcrypt For PHP53 On CentOS

Author: , August 12th, 2011

To get mcrypt support for PHP 5.3, compile and install just the mcrypt extension. First, get the prerequisites:

Download the php source code from php.net, for example:

Now, cd to the proper place and follow these steps:

Create the configuration file for MCrypt /etc/php.d/mcrypt.ini containing:

Restart apache:

Create a file […]

How To Export WordPress From The Command Line CLI

Author: , July 29th, 2011

Create a file called export.php in the wordpress top directory containing the following (remember to add the PHP tags at the top and bottom):

How To Detect File Type In PHP

Author: , July 28th, 2011

For example, $mime_type could equal “image/jpeg”…

http://www.php.net/manual/en/function.finfo-file.php http://www.w3schools.com/php/func_http_header.asp http://www.php.net/manual/en/reserved.variables.server.php

What A Difference! GoodBye FastCGI.

Author: , January 18th, 2011

Since I have completely unloaded FastCGI from Apache since moving to suPHP, I have seen a massive improvement overall. FastCGI is dead as far as I am concerned. Catalyst runs just fine without it. IMHO it is a serious kludge and should not be used. I am sorry I ever laid hands on it to […]

Dumping FastCGI in Favor of suPHP for PHP-based Sites

Author: , January 18th, 2011

After running my PHP instances in FastCGI for a while, I have not been satisfied with the performance, and have switched over to suPHP instead. The security benefits are there, and the memory footprint much smaller, with no drop in performance. In fact, this has solved some odd delays with the FastCGI implementation. I am […]

How To Run WordPress Under FastCGI

Author: , December 30th, 2010

EDIT Jan 23, 2017: The FastCGI website is down so the below links no longer work. mod_fcgid is another possibility, and is the official Apache-supported method, but may be less performant that mod_fastcgi: http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html New write-up to follow when time allows… Thanks to Tara Senn of whoishostingthismail.com for pointing out the broken links to me! […]