admin has written 153 articles

open_basedir restriction message

Overview When attempting to access a file in PHP, the script will yield a warning similar to: Warning: fopen(): open_basedir restriction in effect. File(/var/www/myresource) is not within the allowed path(s): (/home/virtual/site2/fst:/var/www/html:/usr/local:/usr/bin:/usr/sbin:/etc:/tmp:/proc:/dev:/.socket) in /home/virtual/site2/fst/var/www/html/myfile.php on line 3 Cause This is caused by mistakenly referencing a path within a pivot root inconsistent with PHP. PHP runs with a…

Accessing uploaded files

Overview By default, uploaded files are stored under /tmp, which is outside the pivot root of your account’s filesystem. These files may be accessed only by PHP. In certain circumstances, you may want to keep a copy of uploaded files for debugging. Solution Upload path can be adjusted by changing PHP’s tunable setting: upload_tmp_dir. Use the value within the…

.htaccess Guide

Overview An .htaccess file contains directives that the web server will apply to a collection of resources before a page is displayed. For example, a .htaccess file may change PHP configuration, deny access, change the page displayed, and even redirect a resource to another URL. These are denoted by a directive. A directive consists of a directive…

Forcing HTTP redirect to SSL

Overview Converting HTTP to HTTPS resources can be accomplished in several ways. It goes without saying that you should setup and test your SSL certificate before performing any of the following methods. Strict Transport Security Modern browsers support a security standard called “HTTP Strict Transport Security“, or HSTS for short. HSTS sends a header with…

Accessing e-mail

Overview E-mail may be accessed either through webmail within the control panel or remotely from a desktop client such as Outlook, Thunderbird, or Mail. Important login information Your login will always be user@domain for e-mail. For example, if your domain is example.com and your username myadmin, then the proper e-mail login is myadmin@example.com and not myadmin. Your password is the same password…

Changing webmail locations

Webmail locations may be changed from their default settings within the control panel under Mail > Webmail. Click Change Link to enter a new subdomain. This subdomain must not be present under Web > Subdomains > List Subdomains. Once changed, this will affect all users that access webmail for the given domain.

Converting e-mail address types

Overview In certain situations, an e-mail address that delivers to an account on the server may want to be converted to an e-mail address that forwards externally to another address and vice-versa. Solution Login to the control panel Visit Mail > Manage Mailboxes Under Change Mode, select View/Edit Mailboxes Select the mailbox to edit by the edit icon within the Actions…