Accessing Plesk directories outside httpdocs / php open_basedir error
Submitted by Robert Rhead on Thu, 06/23/2011 - 23:13
PHP open_basedir errors occur when a script tries to access a directory outside of httpdocs. For security reasons Plesk only allows access to the httpdocs and tmp directories.
So what if you need to access a different directory?
The easiest way is to amend the vhost.conf file of the
specific domain.
Open the vhost.conf file if it exists. If not...create it. The vhost.conf file is found under /PATH-TO-DOMAIN/YourDomain.tld/conf/vhost.conf
Add these lines:-
Drupal multisite in a Linux / Parallels / Plesk 8 setup
Submitted by Robert Rhead on Thu, 06/23/2011 - 23:00
You have Plesk 8 running on your Apache server and would like to create multiple websites using one Drupal codebase.
Let me tell you...this was a bitch. But don't panic...it's do-able.
Adding custom body classes to the standard Drupal output
Submitted by Robert Rhead on Thu, 06/23/2011 - 18:44
Here's a great trick if you need to add custom classes to the body tag output of your Drupal theme. This goes above the standard body tag output using a line like this in your page.tpl.php
<body class="<?php print $body_classes; ?>">
Which only creates the usual body classes like:
<body class="front logged-in page-node one-sidebar sidebar-right">
Theming simple field type views in Drupal
Submitted by Robert Rhead on Thu, 06/23/2011 - 18:20
If you're into theming Drupal...or more specifically Drupal content output, then at some point you will want to make your Views output look a little prettier. Often the standard html output is far from useful and you will at some point feel the need to alter this. While this is relatively easy with node style output, it is often not so clear with the field style...and was for me a
big 'A-ha' moment.
So let's take a closer look at Views field theming.
Create a subdomain in Plesk with www prefix
Submitted by Robert Rhead on Thu, 06/23/2011 - 15:37
Subdomains set up in Plesk VPS enviroments are usually only available without the www prefix on the domain name. This means that the subdomain subdomain.example.com will work where www.subdomain.example.com returns a "Server not found" error.
Technically a domain name with and without the prefix is classed as two separate domains, and could therefore house two different websites. Generally it's best if your website is available with and without the www prefix. There are SEO issues with this which I will cover later.