Dreamhost PHP
Presently in November 2009, Dreamhost (like most webhosts ) has completely migrated away from PHP4 and is now officially upgraded to and supporting PHP5.
They state themselves on their website – dated 8/26/08 – that is it no longer possible to switch to PHP4 due to it being officially discontinued. Also they note that old domains running under PHP4 will continue to use PHP4 as possible. Â As almost all php4 applications and functions are supported by php5, this essentially is a non issue in 99.9% of all cases but it is worth mentioning nonetheless.
Essentially, for all websites right now you have three choices: PHP FAST CGI, PHP CGI, and PHP Xcache. Normally, you make your choice when you configure your website but you can go back in and adjust this later also.
Dreamhost PHP Configurations
Click here to save $50 with Dreamhost Coupon BEKIND
- PHP 5 FastCGI – FastCGI provides a way to keep frequently run scripts stored memory so that the script is preloaded and ready for use the next time it is needed. Dreamhost pushes this option and its a very good choice as scripts particularly PHP scripts will be a lot faster to initialize and execute.
- PHP 5 CGI – Php run through CGI ( Common Gateway Interface) is much slower so why do they even have it as a choice ? Because Fastcgi is more complex and in some (very rare cases), Â PHP FastCGI could have issues so its good to have this mode to fall back on for debugging.
- XCache  – Dreamhost Private Server required . XCache is a PHP opcode cacher. It improves PHP performance by caching compiled PHP code in memory for later requests. XCache can be used in conjunction with FastCGI. XCache is worth experimenting with if PHP performance is important and you have a complex application.
Important Dreamhost PHP Facts
- Disabled Register Globals – DreamHost has also taken the opportunity to alter default behavior of certain aspects of PHP (like the disabling of register_globals, which automatically creates global variables from submitted form data).
- Output Buffer Tweaks – Dreamhost has taken it on their own initiative to buffer output in PHP to make mog_gzip work better therefore commands like flush(), ob_flush() and ob_implicit_flush() will have no seeming effect on Dreamhost servers. This has been done on shared hosting and not the private servers. If you want to unbuffered output just send a support request and ask that mod_gzip be turned off and give you site name.
- PHPinfo - Don’t forget really the best way to see what is going on with your Dreamhost PHP configuration is to use the command phpinfo() which is commonly used to check configuration settings. Just cut and paste the code below to make a phpinfo() page.
[cc lang=”php”]
[/cc]