Hosting Drupal core from subdirectory

This article is a reference if you would like to host your Drupal (v7) core from a sub directory.  This can be very useful for admins who are hosting multiple virtual hosts on a single server and the user does not have access to Apache's httpd.conf file.

Lets begin!

There are 2 requirements.

  1. Place a .htaccess file in the root of your home directory
  2. Edit your "/sites/default/settings.php" file to look for the $base_path variable.


Installing PHPUnit

This article requires that you have already configured your web server, php and have pear installed.

Install PHPUnit

The following is a good example if you want to use PHPUnit with your NetBeans installation.  In this case both PHPUnit and PHPUnit_SkeletonGenerator are needed.  We threw in DbUnit just for fun.

Installing PEAR on Windows

Before we begin

Before continuing make sure that you have you web server configured with a recent copy of PHP installed.
This operation is practically the same for Linux, Windows and MAC.  However, this article focus on Windows.

Installing PEAR for Windows

Here's a quick breakdown of what we are going to do.  We are simply going to accept the default settings for a system-wide configuration.

Steps Involved

Using PEAR behind a proxy

What is PEAR?

PEAR is an extension library of PHP.  If you don't know what any of this is still, then this article my not be much use to you.


Setting up PEAR behind a proxy 

The command is simple whether you are using Linux, PC or MAC.  Before proceeding make sure that you have your webserver configured, PHP installed and PEAR already installed as well.




Subscribe to Xeno Innovations, Inc. RSS