Support / KnowledgeBase

 
Search the KnowledgeBase Search
feedCurrently Browsing: PHP and Coding
Launch

How do I increase the PHP upload limits? Applies to: All DV Difficulty: Medium Time Needed: 10 Tools Required: SSH, root access, vi knowledge Applies to: All Grid Difficulty: Medium Time Needed: 10 Tools Required: SSH, root access, vi knowledge Applies to: Premium WordPress Difficulty: Medium Time Needed: 10 Tools Required: FTP ... Applies To: All DV, Grid

Launch

CGI and PHP Resource Limits Applies to: Grid Difficulty: Easy Time Needed: 10 Tools Required: None Applies to: Premium WordPress Difficulty: Easy Time Needed: 10 Tools Required: None Overview On the Grid platform, the following limits are in place for all PHP and CGI processes on your website(s): 120 seconds o ... Applies To: Grid, Premium WordPress

Launch

Working with a hacked or compromised server Applies to: Grid Difficulty: Medium Time Needed: 20 Tools Required: SFTP Applies to: All DV Difficulty: Medium Time Needed: 20 Tools Required: SFTP NOTE: Remember that it is your responsibility to maintain the security of any scripts or applications you choose to install and use on you ... Applies To: All DV, Grid

Launch

How can I edit the php.ini file? Applies to: Grid Difficulty: Medium Time Needed: 20 Tools Required: AccountCenter access, SSH enabled, FTP client, plain text editor Applies to: DV Difficulty: Easy Time Needed: 10 Tools Required: Plesk or SSH access Overview The php.ini file is the default configuration file for runn ... Applies To: All DV, Grid

Launch

Is mod_gzip installed on the Grid? Applies to: Grid Difficulty: Medium Time Needed: 10 Tools Required: FTP, plain text editor or SSH access, vi knowledge Overview Since the Grid runs the newer Apache 2, mod_gzip has been replaced by the more flexible and configurable mod_deflate. Essentially, this means that if you are ... Applies To: Grid

Launch

How do I set the path for open_basedir? Applies to: Grid Difficulty: Medium Time Needed: 10 Tools Required: Plain text editor, FTP client or AccountCenter access Applies to: DV Difficulty: Medium Time Needed: 10 Tools Required: Plesk Applies to: DV 4.0 Difficulty: Medium Time Needed: 10 Tools Required: SSH, root access, vi know ... Applies To: (dv) 4.0, DV, Grid

Launch

How can I install ionCube loader libraries? Applies to: Grid Difficulty: Medium Time Needed: 20 Tools Required: SSH, FTP Applies to: DV Difficulty: Medium Time Needed: 20 Tools Required: None Applies to: DV 4.0 Difficulty: Medium Time Needed: 20 Tools Required: None IonCube Loader libraries are already installed on this service ... Applies To: (dv) 4.0, DV, Grid

Launch

How do I enable the server-status page on my server? Applies to: All DV Difficulty: Medium Time Needed: 10 Tools Required: SSH, root access, vi knowledge Overview The status module allows a server administrator to find out how well their server is performing. An HTML page is presented that gives the current server statistics in an easily ... Applies To: All DV

Launch

Password protecting directories Applies to: Grid Difficulty: Easy Time Needed: 20 Tools Required: AccountCenter access or SSH, FTP client Applies to: All DV Difficulty: Easy Time Needed: 10 Tools Required: Plesk administrator access or SSH, FTP client Overview You can restrict access to a web folder on your (mt) ser ... Applies To: (dv) 4.0, DV, Grid

Launch

Generate API key Applies to: API, All Service Types Difficulty: Easy Time: 5 Tools needed: AccountCenter access An API key is required when you wish to develop applications to help manage and monitor your (mt) Media Temple hosting services. Generate your API key Sign into your AccountCenter. From the ... Applies To: API

Launch

Using PEAR on your server Applies to: Grid Difficulty: Medium Time Needed: 20 Tools Required: SSH Applies to: DV Difficulty: Medium Time Needed: 10 Tools Required: SSH Overview PEAR is short for PHP Extension and Application Repository and is pronounced just like the fruit. The purpose of PEAR is to provide: ... Applies To: DV, Grid

Launch

MIME Types Applies to: All Services Difficulty: Easy Time Needed: 10 Tools Required: SSH Use and configure MIME types Various mime types are pre-configured for use on our Grid & DV servers. If you would like to add a custom mime-type for use on your website, you can do so by using an .htaccess ... Applies To: All DV, Grid

Launch

Using .htaccess rewrite rules Applies to: Grid Difficulty: Easy Time Needed: 10 Tools Required: Plain text editor, FTP Applies to: All DV Difficulty: Easy Time Needed: 10 Tools Required: Plain text editor, FTP Applies to: (ve) Difficulty: Easy Time Needed: 10 Tools Required: Plain text editor, FTP Overview The A ... Applies To: (ve), All DV, Grid

Launch

Making directories browsable, solving 403 errors Applies to: Grid Difficulty: Medium Time: 10 Tools needed: FTP, plain text editor or SSH, vi knowledge Applies to: All DV Difficulty: Medium Time: 10 Tools needed: FTP, plain text editor or SSH, vi knowledge Overview Make a directory web-browsable. For example, if you have several file ... Applies To: All DV, Grid

Launch

Installing PECL extensions Applies to: Grid Difficulty: Medium Time Needed: 20 Tools Required: SSH, vi knowledge Applies to: DV Difficulty: Medium Time Needed: 20 Tools Required: SSH, vi knowledge Overview PECL is a repository for PHP Extensions, providing a directory of all known extensions and hosting faciliti ... Applies To: All DV, Grid

Launch

Prevent search engines from indexing your websites Applies to: Grid Difficulty: Easy Time Needed: 10 Tools Required: FTP client, plain text editor Applies to: All DV Difficulty: Easy Time Needed: 10 Tools Required: FTP client, plain text editor Overview Web Robots, also known as Web Wanderers, Crawlers, or Spiders, are programs that t ... Applies To: All DV, Grid

Launch

Sourcing spam on your DV server Applies to: DV 4.0 Difficulty: Medium Time Needed: 30 Tools Required: Plesk administrator, SSH, root or sudo access, vi knowledge Introduction This article has been mirrored from the Parallels Knowledge Base as a courtesy to our DV server customers. As they are the authoritative source ... Applies To: All DV

Launch

Edit PHP Safe Mode on a DV Server Applies to: DV Difficulty: Easy Time: 10 Tools needed: SSH Applies to: DV 4.0 Difficulty: Easy Time: 10 Tools needed: SSH For a discussion of Safe Mode and security, please see PHP Safe Mode, Problems, and Workarounds first. Disable Safe Mode Globally in SSH You can edit your php.ini ... Applies To: All DV

Launch

How do I enable CloudFlare? Applies to: Grid Difficulty: Easy Time Needed: 10 Tools Required: AccountCenter access Applies to: All DV Difficulty: Easy Time Needed: 10 Tools Required: AccountCenter access Applies to: (ve) Difficulty: Easy Time Needed: 10 Tools Required: AccountCenter access Overview CloudFlare ... Applies To: (dv) 4.0, (ve), Grid

Launch

PHP Error Logging via .htaccess Difficulty: Medium Time: 10 Minutes Tools needed: SSH Access Overview The following article will demonstrate how to enable advanced PHP error logging functionality for a domain on a Linux server. This will work on any (mt) Media Temple hosting service. PHP Error Logging The web serve ... Applies To: (dv) 4.0, (ve), DV, DV Developer, Grid

Launch

How can I specify the PHP version on the Grid? Applies to: Grid Difficulty: Easy Time Needed: 10 Tools Required: AccountCenter access, plain text editor, FTP client Overview At this time, the Grid offers multiple versions of PHP, in the form of PHP-Stable, PHP-Latest, and FastCGI (recommended). You may change or see your PHP versi ... Applies To: Grid

Launch

Using server side includes (SSI) Applies to: Grid Difficulty: Medium Time: 20 Tools needed: FTP, plain text editor Applies to: DV Difficulty: Medium Time: 20 Tools needed: FTP, plain text editor Overview This article explains how to use SSI (Server Side Includes) in your web pages from the designated files. SSI is a s ... Applies To: All DV, Grid

Launch

CloudTech Security Audit Applies to: All DV Difficulty: Easy Time Needed: 5 Tools Required: AccountCenter access Overview CloudTech On-Demand is an à la carte premium support offering. It provides specialized assistance for the Grid and DV servers. CloudTech helps clients of all sizes and technical abilities to ... Applies To: All DV

Launch

Using Cron Applies to: DV Difficulty: Easy Time Needed: 10 Tools Required: Plesk administrator access Applies to: DV 4.0 Difficulty: Easy Time Needed: 10 Tools Required: Plesk administrator access Applies to: Grid Difficulty: Easy Time Needed: 10 Tools Required: AccountCenter access Overview C ... Applies To: (dv) 4.0, DV, Grid

Launch

PHP Safe Mode, Problems, and Workarounds Applies to: Grid Difficulty: Medium Time Needed: 20 Tools Required: SSH, vi knowledge Applies to: All DV Difficulty: Easy Time Needed: 10 Tools Required: SSH, vi knowledge Overview This article is about PHP Safe Mode, Security, and Safe Mode Workarounds. Default Settings Safe Mode ... Applies To: (dv) 4.0, DV, Grid

Launch

How do I redirect my site using a .htaccess file? Applies to: All Service Types Difficulty: Medium Time Needed: 10 Tools Required: FTP, plain text editor Overview This document will explain how to create a .htaccess file to redirect your site or site content. This will not redirect any emails for your domains. READ ME FIRST As a conf ... Applies To: All Service Types

Launch

Creating custom error pages Applies to: Grid Difficulty: Medium Time: 20 Tools needed: FTP Applies to: All DV Difficulty: Medium Time: 20 Tools needed: FTP Overview This article explains how to set up custom error documents for your server. Instead of a plain 404 Not Found or 500 Internal Server Error page, you c ... Applies To: All DV, Grid

Launch

What is a domain warning for 1-Click installations? Applies to: Grid Difficulty: Easy Time Needed: 10 Tools Required: AccountCenter access and DNS control Note: This article assumes that you will be taking your site live upon installation. If you're site is still in development, you may continue to use your access domain to preview your si ... Applies To: Grid

Launch

How do I enable FastCGI? Applies to: Grid Difficulty: Easy Time Needed: 10 Tools Required: AccountCenter access Applies to: DV 4.0 Difficulty: Easy Time Needed: 10 Tools Required: Plesk administrator access Applies to: DV Difficulty: Easy Time Needed: 10 Tools Required: Plesk administrator access Overview R ... Applies To: (dv) 4.0, Grid

Launch

Is ImageMagick installed on the Grid? Applies to: Grid Difficulty: Medium Time Needed: 10 Tools Required: SSH Overview ImageMagick is a software suite to create, edit, and compose bitmap images. It can read, convert, and write images in a variety of formats. The functionality of ImageMagick is typically utilized from the co ... Applies To: Grid

Launch

What is a website? Applies to: All Service Types Difficulty: Easy Time Needed: 10 Tools Required: None Overview This article is intended for the first-time website owner; perfect for the noob to get her/his toes wet and a pleasant refresher for the seasoned developer. What is a website? A website is a ... Applies To: All Service Types

Launch

Using Environment Variables in PHP Service Type: Grid Difficulty: Medium Time Needed: 10 Tools Required: None Environment variable definition PHP environment variables allow your scripts to glean certain types of data dynamically from the server. This supports script flexibility in a potentially changing server environme ... Applies To: Grid

Launch

How do I add a subdomain to CloudFlare? Applies to: Grid Difficulty: Easy Time Needed: 10 Tools Required: AccountCenter access Overview You can easily add a subdomain to your CloudFlare service. This article will show you how! A subdomain is a domain that is a subsection of what is often called a parent domain. For example, ... Applies To: Grid

Launch

Basic troubleshooting & tips for CloudFlare Applies to: Grid Difficulty: Easy Time Needed: 10 Tools Required: AccountCenter access Applies to: All DV Difficulty: Easy Time Needed: 10 Tools Required: AccountCenter access Applies to: (ve) Difficulty: Easy Time Needed: 10 Tools Required: AccountCenter access Overview CloudFlare ... Applies To: (ve), All DV, Grid

Launch

Create timestamped website backups Overview This article will walk you through how to create timestamped website back-up of your website on the Grid. READ ME FIRST This article is provided as a courtesy. Installing, configuring, and troubleshooting third-party applications is outside the scope of support provided by (mt) Media ... Applies To: Grid

Launch

Create a temporary "Under Construction" page Applies to: Everything Difficulty: Easy Time Needed: 7 Tools Required: FTP or SSH Overview Having an "Under Construction" page for your website can be useful in a variety of cases. The main goal of such a page is to hide your usual website while it is in an undesirable state. Provide a ... Applies To: All Service Types

Launch

Using .htaccess files Applies to: Grid Difficulty: Medium Time Needed: 20 Tools Required: FTP, plain text editor Applies to: All DV Difficulty: Medium Time Needed: 20 Tools Required: FTP, plain text editor Introduction The .htaccess file is a powerful tool for modifying your Apache configuration on a per-d ... Applies To: All DV, Grid

Launch

How do I redirect my site using a META Tag? Applies to: All Service Types Difficulty: Medium Time Needed: 10 Tools Required: FTP or SSH, plain text editor Overview This document will explain how to create a META Tag to redirect your site or site content. This will not redirect any emails for your domains, however. READ ME FIRST ... Applies To: All Service Types

Launch

Why is allow_url_fopen disabled on the Grid? Applies to: Grid Difficulty: Medium Time Needed: 10 Tools Required: FTP, plain text editor or SSH access, vi knowledge Overview The PHP parameter allow_url_fopen has been disabled in our PHP environment for the Grid. If enabled, allow_url_fopen allows PHP's file functions to retriev ... Applies To: Grid

Launch

How can I enable Zend on the Grid? Applies to: Grid Difficulty: Hard Time Needed: 20 Tools Required: SSH access or FTP and AccountCenter access Overview Zend Guard Loader is a free runtime application that enables PHP to run the scripts encoded by Zend Guard. Zend is a trademark of Zend Technologies Ltd. NOTE: If your sc ... Applies To: Grid

Launch

Increase PHP security with PHPSecInfo Applies to: Grid Difficulty: Easy Time Needed: 10 Tools Required: FTP client Applies to: All DV Difficulty: Easy Time Needed: 10 Tools Required: FTP client Overview PHPSecInfo provides the security equivalent of the phpinfo() function. It is not a replacement for secure development t ... Applies To: All DV, Grid

Launch

How do I install Drupal using the 1-Click Applications tool? Applies to: Grid Difficulty: Easy Time Needed: 20 Tools Required: AccountCenter access Overview Drupal is a free and open source content management system (CMS) written in PHP and distributed under the GNU General Public License. This article will show you how to install Drupal using th ... Applies To: Grid

Launch

Prevent hotlinking with a .htaccess file Applies to: Grid Difficulty: Medium Time Needed: 15 Tools Required: FTP client, plain text editor Applies to: All DV Difficulty: Easy Time Needed: 10 Tools Required: FTP client, plain text editor Overview Hotlinking refers to linking directly to non-html objects on other servers, suc ... Applies To: All DV, Grid

Launch

Compressing web pages with mod_deflate Applies to: All DV Difficulty: Medium Time Needed: 20 Tools Required: SSH, vi knowledge Overview The mod_deflate module allows the Apache2 web service to compress files and deliver them to clients (browsers) that can handle them. With mod_deflate you can compress HTML, text or XML files ... Applies To: All DV

Launch

How can I create a phpinfo.php page? Applies to: Grid Difficulty: Easy Time Needed: 10 Tools Required: FTP, plain text editor Applies to: All DV Difficulty: Easy Time Needed: 10 Tools Required: FTP, plain text editor Overview You can use a phpinfo() page to view the current PHP information for your server. This file out ... Applies To: All DV, Grid

Launch

How do I set the upload_tmp_dir? Applies to: All DV Difficulty: Medium Time Needed: 10 Tools Required: SSH, root access, vi knowledge Overview The temporary directory is used for storing files when a file is uploaded. This directory must be writable by whichever user PHP is running as. If not specified, PHP will use th ... Applies To: All DV

Launch

Resolve Apache error: "PHP Fatal error: [ionCube Loader]" Applies to: All DV Difficulty: Medium Time Needed: 20 Tools Required: SSH, root or sudo access, vi knowledge Symptoms When you are trying to start Apache, the following error appears in the Apache error log: PHP Fatal error: [ionCube Loader] The Loader must appear as the first entry in ... Applies To: All DV

Launch

Understanding basic vi (visual editor) Applies to: Grid Difficulty: Medium-Hard Time Needed: 20 Tools Required: SSH enabled, SSH client Applies to: All DV Difficulty: Medium Time Needed: 10 Tools Required: SSH, root or sudo access Overview vi (visual editor) is included with all (mt) Media Temple services. vi is a full sc ... Applies To: All DV, Grid

Launch

Troubleshooting common issues with cron jobs Applies to: Grid Difficulty: Medium Time Needed: 15 Tools Required: SSH, vi knowledge Applies to: All DV Difficulty: Easy Time Needed: 10 Tools Required: SSH, vi knowledge Overview Cron jobs are commands that your service runs at a specified interval and, as such, can be difficult to ... Applies To: All DV, Grid

Launch

Block a specific IP address from accessing your website Applies to: Grid Difficulty: Medium Time Needed: 15 Tools Required: FTP client, plain text editor Applies to: All DV Difficulty: Easy Time Needed: 10 Tools Required: FTP client, plain text editor Overview If you have annoying visitors, site scrapers, or spammers, you may find it usef ... Applies To: All DV, Grid

Launch

Installing Perl modules on the Grid Applies to: Grid Difficulty: Medium Time Needed: 20 Tools Required: SSH, vi knowledge Overview The following article will show you how to install Perl modules on the Grid. You can find many Perl modules by visiting http://search.cpan.org. NOTE: Whenever you see ##### please replace it w ... Applies To: Grid

Launch

Why am I experiencing session errors? Applies to: Grid Difficulty: Medium Time Needed: 10 Tools Required: SSH, vi knowledge or FTP, plain text editor Symptoms Randomly being logged out of your PHP application. Sessions are not saving when transitioning from HTTP to HTTPS protocols. If a PHP session needs to begin in HTTP a ... Applies To: Grid

Launch

Which PHP modules are included with your version of PHP? Applies to: Grid Difficulty: Easy Time Needed: 10 Tools Required: None Overview The Grid has PHP pre-installed and available for your use. Current version Visit the link below to view a phpinfo page for the latest version of PHP5 running on the Grid. PHP5 - phpinfo() NOTE: We recomme ... Applies To: Grid

Launch

Grid Using SetHandler to process other extensions as PHP Applies to: Grid Difficulty: Medium Time Needed: 10 Tools Required: FTP, plain text editor or SSH, vi knowledge Overview There might be times when you want your webpages to appear like they are html but are actually being processed as PHP. This article briefly describes three ways to ac ... Applies To: Grid

Launch

How do I use symlinks to redirect my site? Applies to: Grid Difficulty: Medium Time Needed: 20 Tools Required: SSH Overview This article will show you how to make the content displaying for example.com appear when visiting alt-example.com. A symlink, short for symbolic link, is one of the best ways to do this. Before you start ... Applies To: Grid

Launch

How do I disable the CloudFlare service? Applies to: All Service Types Difficulty: Easy Time Needed: 10 Tools Required: AccountCenter access Overview The CloudFlare service can easily be disabled for any domain, at any time, in your AccountCenter. Instructions Log into your AccountCenter. On the Overview page, scroll down to ... Applies To: (dv) 4.0, (ve), Grid

Launch

Why am I getting a 500 Internal Server Error message? Applies to: All Service Types Difficulty: Medium Time Needed: 20 Tools Required: Plain text editor, FTP client Overview 500 Internal Server Error is a generic error message, given when no more specific message is suitable. There are a number of causes for a 500 Internal Server Error to ... Applies To: All Service Types

Launch

How do I enable .phps file to be color highlighted? Applies to: Grid Difficulty: Easy Time Needed: 10 Tools Required: SSH, vi knowledge Overview Due to the way PHP is configured on our Grid platform, there is a work around to get a .phps file displaying colorized. Instructions You will need to add the following to your .htaccess and creat ... Applies To: Grid