admin has written 156 articles

Enabling write-access

Overview The web server operates in a dual-user mode for enhanced security. In order for a web application to access your filesystem, specific permissions must be granted. Solution Change permissions on necessary files to 717 or 777. For WordPress, wp-content/uploads/ and wp-content/themes/  should be changed recursively to allow media uploads and theme editing in-browser. If plugin…

Displaying errors on-screen for debugging

Overview During early development of a PHP application or to debug a problem, errors should be displayed in-browser to help spot typos, undefined variables, misconfiguration, and other logic flaws. Solution Enable display_errors and increase verbosity in error_reporting within PHP. As an example, configuration within a .htaccess  would be: php_flag display_errors On php_value error_reporting 9999999 Caveats Some applications may use a separate…

Warning: An unexpected error occurred.

Overview When attempting to install a plugin or update WordPress, the process will complete successfully with the following message: Warning: An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the support forums. (WordPress could not establish a secure connection to WordPress.org. Please contact…

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.