PHP support on zoo will end for most sites on January 9, 2019, and for all remaining sites on March 15, 2019. Sites migrated to silk hosting should see improved performance, security, and deployment flexibility.

Migrating sites to silk

Migrating your exising site involves roughly the following:

  1. Request a silk hosting site. You can obtain a silk account by emailing a request to Systems Architecture & Administration. If you need compatibility with PHP 5.3 and/or Magicscript, make sure to mention this.

  2. Copy your content.

  3. Adapt your site to silk.

    • PHP version: During initial migration, you might want to use the same version of PHP as found on zoo, and can configure your site to use PHP 5.3. Note that PHP 5.3 support will end on May 24, 2019, so you should plan an upgrade before then.
    • Magicscript: Silkv1 hosts support Magicscript, though it is not enabled by default. If required, you can enable Magicscript for your site.
    • Filesystem paths: If your code refers to any resources by their full filesystem path, those paths might need updating. In particular, if your site accesses a WebDB MySQL database, you will probably need a new location to store your database credentials.
    • URLs: Your silk site has URLs starting with http://<netid> If you need to redirect people from an old zoo site or maintain your URLs, you can do so as shown below.

Upgrading PHP

To ease migration from zoo, you might choose for your silk site to use PHP 5.3. PHP 5.3 support will end on May 24, 2019, so the second stage after migration is an upgrade to PHP 5.5 or newer. The work involved varies depending on your site. For most people, moving to PHP 5.5 includes at least updating your WebDB credentials.

  • You can test or permanently change your site to use a different PHP version.
  • Database connections will require changes. PHP 5.3's old MySQL library (mysql) uses MySQL's old authentication scheme. Newer versions support only modern MySQL authentication. You can update an existing WebDB account and reset its password, though this will make any remaining PHP 5.3 pages that use this account stop working. If you need old pages to continue working while you work on upgrading, contact SAA about creating an additional WebDB account for this purpose.
  • Custom database code might need replacing. PHP's old MySQL library (mysql) was removed after PHP 5.5. We suggest migrating to PDO, which feels similar but is more powerful. See Web Publishing with WebDB for links to documentation and a tutorial.
  • Other updates might be required. Check your error log file for warnings and errors after updating PHP. See the PHP documentation for the complete list of changes between each PHP version.

Redirecting page requests

You can redirect people who encounter your old URLs to your silk site by creating/editing a file named .htaccess in your site on zoo, adding something like the following:

# Redirect a specific file
Redirect /~myoldsite/old.html http://<netid>

# Redirect a whole site
Redirect /~myoldsite http://<netid>

# Redirect any file ending in `.html`
RedirectMatch (.*)\.html$ http://<netid>$1

Proxying page requests

You can keep your existing URLs by proxying requests through those servers to your silk site. Create/edit a file named .htaccess in your site on zoo, adding something like the following:

RewriteEngine on
RewriteRule (.*) http://<netid>$1 [L,P]

This will make the entire silk site appear for browsers to be served from the URL where these rules are specified.