Web Hosting Notes, Requirements, Comparison

I now have 3 different Apache hosting environments: my openSUSE 10.2 workstation, GoDaddy, and A2Hosting. Signing up for a month is the only way to determine if a web application will work on an ISP’s service. Their hosting environments are all slightly different. Here are the issues I’ve encountered getting a PHP web application running on each system.

openSUSE 10.2

  • Apache2, PHP 5.2, mod_php, mod_rewrite.
  • PHP magic_quotes_gpc is set to off in openSUSE (the proper choice, but not the PHP default as I painfully learned when installing at the ISPs).
  • PEAR supported in the Apache PHP include path.
  • Subdirectories written into by the application (e.g. Smarty template compilation area) need world-write privilege.

GoDaddy Hosting

  • Apache1.3, PHP4 (5.1.4 optional), CGI/fastCGI, mod_rewrite.
  • Cannot use php_flag because using CGI, must use php5.ini instead.
  • Switch from PHP 4 to 5 in .htaccess:
    AddHandler x-httpd-php5 .php
    AddHandler x-httpd-php .php4
  • PHP magic_quotes_gpc on by default, turn off with local php5.ini file.
  • AllowOverride Options disabled, can’t use in .htaccess.
  • Files created by web site users (i.e. by the httpd user) have the same uid/gid as my ftp login user. An excellent configuration approach, as I don’t need to give world write privileges to local data subdirectories.
  • ini_set(‘session.cache_limiter’, ‘private’) causes server 500 error.

A2 Hosting

  • Apache 1.x (server_signature empty), PHP 5.2, mod_php, mod_rewrite.
  • PHP magic_quotes_gpc is on by default, turn off using php_flag (here is the Running PHP as an Apache Module PHP man page describing how to use php.ini directives within .htaccess).
  • Subdirectories written to by the application need world-write privilege. My ftp area is a public_html directory, so A2 uses mod_userdir. The home directory looks similar to my local workstation.
  • ini_set(‘session.cache_limiter’, ‘private’) works fine. Moved this parameter to a php_flag directive.
  • A2 mentions PEAR support on their web page, but they don’t add the directory to the PHP include path and only offer a handful of modules. Will add modules per customer request, but what will happen if they move my account to a different server?

Web Hosting Requirements

  • PHP Extensions: CURL, XMLWriter.
  • Apache Modules: rewrite.

posted in Apache, php, WebHosting by Bozzie

Powered by Wordpress and MySQL. Theme by openark.org