KMP http://www.net24.co.nz/kb/ en-us KnowlageBase RSS Generator Why does my FTPS client prompt me to accept the Net24 certificate? http://www.net24.co.nz/kb/article/AA-00281 Issue: Why does my FTPS client prompt me to accept the Net24 certificate?

Do not be concerned - all Net24 Certificates are valid! The issue is that, by default, almost all FTP clients do not use the Windows Certificate store.

Solution Part One : Configure your FTPS Client to utilise the Windows store.

This procedure varies with the client you are using.

For CuteFTP, under the "Tools" menu, select "Global Options" and expand the "Security" section and select "SSL Security". Make sure that the "Accept Certificates in the Windows Trusted Root Certificate Authority store" option is selected.

For Filezilla,upgrade to a recent version. Later versions of Filezilla now utilise the Windows store.

Solution Part Two: If this still does not work then you may need to update the WIndows root certificate list

Using Internet Explorer, browse the website : http://www.microsoft.com/en-us/download/default.aspx and accept the Installation prompt.

Choose the update that matches the Operating system you are using.



]]>
Mon, 14 Apr 2014 20:40:49 +1200
Outlook on Windows XP is not connecting properly to Exchange Mailbox http://www.net24.co.nz/kb/article/AA-00490 Issue

Outlook is not connecting properly to Exchange Server. General issue appears to be an authentication one.

Cause

Windows XP libraries do not appear to support authentication used in Outlook 2007 or above clients.

Resolution/Workaround

There is none that we can find.

If Windows XP must be used, then configure the Outlook client to connect via IMAP as per the following screen shots.


Click "More Settings"  and then select the advanced tab as per below


Switch tabs to the "Outgoing Server" tab.


Click on the "OK" button and then click on the "Test Account Settings" to verify that everything is correct before clicking on the "Next" button.


]]>
Fri, 10 May 2013 01:52:05 +1200
Configuring Outlook 2007 to work with our Exchange 2010 servers http://www.net24.co.nz/kb/article/AA-00489

Configure Outlook 2007 Manually with Exchange 2010

This article knowledgebase article only applies to Voyager Hosted Exchange customers.  

Applicable To

This article knowledgebase article only applies to Voyager Hosted Exchange customers.  

Summary

This procedure will help guide you through configuring Outlook 2007 manually with exchange 2010.

Configuration Steps

1.     Create a new mail profile for Outlook 2007
        Start -> Control Panel -> Mail -> Show Profiles -> Click Add.
        Give this profile an appropriate name like "Voyager".

2.     Next a window will appear to configure your mail profile (see picture below).
        Choose to Manually configure server settings or additional server types.





3.     Choose E-mail Service (see picture below).
        Select Microsoft Exchange.



4.  Microsoft Exchange Settings (see picture below)

          Microsoft Exchange Server:      go.hx.net.nz
          Use Cached Exchange Mode:   This should be checked
          User Name:                             Provided during your signup
          Before Clicking Next, Choose More Settings.




5.     After a few seconds a message is displayed:
         "The action could not be completed. The connection to the Microsoft exchange server is unavailable. Outlook must be online or connected to complete this section."
            Click "OK". A window with Microsoft Exchange Server name and Mailbox name pops up. Click "OK".

6.     A new dialog box will pop-up; Go to "Connection" tab. Check the box near "Connect to my Exchange mailbox using HTTP"
         Note: This option will not show up if you don't have the hot-fix installed. You should either have Service Pack 2 
This will highlight the 'Exchange Proxy Settings'



7.  Click "Exchange Proxy Settings" and enter go.hx.net.nz
     



8.     Click OK then Apply, click OK then Next and Finish

9.     You will now be prompted for your username and password. For your username type in "HX\user" where "user" is the name you were provided when you signed up. Enter the password given to you at signup. Click OK.

10.     When starting Microsoft Office Outlook, use this profile select: "Prompt for a profile to be used" and click Apply

Open Outlook 2007 and launch the newly created "Voyager" profile.
***If there was a pre-existing mail profile, you can specify a default mail profile by opening the control panel, select the Mail icon, select Show Profiles, select Always Use this Profile and use the drop down box to specify the profile created above.

Prerequisites

Install Outlook 2007: 

]]>
Mon, 06 May 2013 22:51:59 +1200
I keep getting prompted for my username and password when using Outlook 2007 http://www.net24.co.nz/kb/article/AA-00477

Configure Outlook 2007 to Remember Logon Credentials

When accessing a Microsoft Exchange Server that is located outside of your network environment, sometimes Microsoft Outlook 2007 prompts for username and password credentials each time you start Outlook, even when checking "Remember my Password" at the logon prompt.
 
This guide helps you configure Microsoft Outlook 2007 to remember logon credentials when using My Hosted Exchange.
 
Do you see this everytime you start Microsoft Outlook 2007?
Configure Microsoft Outlook 2007 to remember logon credentials when using My Hosted Exchange Server 2007.
Close Microsoft Outlook. Ensure it is completely closed (and not working in the background) by checking for Microsoft Outlook icons in your system tray (where your Windows clock is normally displayed). If you are unable to close Microsoft Outlook completely or are not sure if the program has exited, restart Microsoft Windows.
 
Next, navigate using Windows Explorer to the following folder:
%userprofile%\AppData\Roaming\Microsoft\Protect

You should be presented with a window, like this one.
Configuring Microsoft Outlook 2007 to remember username and passwords when accessing Microsoft Exchange Server, configure appdata roaming microsoft protect folder
 
Rename the folder to something else (don't delete it) as shown below.
Rename the existing folder storing your Microsoft Outlook 2007 credentials as shown here.
 
Now, restart Microsoft Outlook 2007 and enter your username / password credentials.
Microsoft Outlook should now remember your username and password as entered.
 
That's it.
Now your email software should be configured and ready for use with our Hosted Microsoft Exchange service.
 

If for some reason this does not work then proceed through the following steps...

1.  Exiting (not just closing) Outlook, Removing credentials from Credential Manager (Control Panel -> Credential Manager), Starting Outlook

2. Ensuring Outlook is not in cached mode or at least turning this off while the issue is present and possibly turning it back on later...

3. Making a new profile.


]]>
Sun, 28 Apr 2013 23:12:50 +1200
Backing up or restoring of a VPS http://www.net24.co.nz/kb/article/AA-00409 Why backup a VPS?

Net24 performs daily backups of all VPS servers each night during the early morning, however in addition to this you may want to backup or take a snapshot of the VPS yourself at a certain time, for example just prior to making a major change. This would allow you to revert the entire server to the previous state if your changes need to be reversed for some reason.

Backing up a VPS

All VPS customers are able to manually backup their VPS at any time using their Virtuozzo Control Panel.

To access your VPS backups area, login to your Virtuozzo Control Panel, the details for which are included in your initial VPS provisioning email.

Once logged in, click on "Maintenance".

You can have up to 15 backups stored at any one time, including a maximum of 2 Full backups. The rest will be incremental backups, which take up a lot less space, but still allow you to revert the entire server to that previous state. Net24's weekly Full backups mean after the VPS has been active for a couple of weeks you will always have 2 Full backups, and many daily incrementals, allowing for restoration to a specific day.

If you currently have less than 15 backups stored, you will be able to click on "New Backup", and then "Backup" to begin backing up the server - depending on the size of the VPS, the time taken may vary but you can click on "Details" to ensure it has completed successfully. If you have reached the limit of 15, you can select a specific incremental backup and select to Remove it, and go ahead with your New Backup when ready.

Restoring a VPS

If you wish to restore your VPS to a specific time/date, from the Maintenance page just tick the particular backup you wish to revert to, and click "Restore Virtual Environment", then confirm that you wish to Restore. Again depending on the size of the VPS this will involve a short period of downtime as the server is restored from the backup and then started.


]]>
Wed, 02 May 2012 04:30:33 +1200
Unable to login to RDP - certificate error http://www.net24.co.nz/kb/article/AA-00346

Issue

RDP into Windows VPS fails with the following error:
 

Remote Desktop cannot connect to the remote computer because the authentication certificate received from the remote computer is expired or invalid.
In some cases, this error might also be caused by large time discrepancy between the client and server computers.


Solution

One of the certificates installed inside the VPS is likely to be expired, preventing the connection.

It is necessary to delete the expired certificate using the command line.

1. Get a list of certificates from Remote Desktop store with this command:

C:\Windows\system32> certutil -store "Remote Desktop" | findstr "Serial Before After"

It will output something like this, look for the certificate with the NotAfter date which has passed:

certutil -store | findstr "Serial Before After"
Serial Number: 06376c00aa00648a11cfb8d4aa5c35f4
 NotBefore: 5/29/1996 4:02 AM
 NotAfter: 1/1/2040 5:59 AM
Serial Number: 46fcebbab4d02f0f926098233f93078f
 NotBefore: 4/17/1997 6:00 AM
 NotAfter: 10/25/2016 5:59 AM
Serial Number: 1e02240d
 NotBefore: 12/14/2001 8:03 AM
 NotAfter: 12/14/2002 8:03 AM
Serial Number: 198b11d13f9a8ffe69a0
 NotBefore: 10/1/1997 1:00 PM
 NotAfter: 12/31/2002 1:00 PM

2. Delete the expired certificate with this command (replacing the bold serial number with your own of course):

C:\Windows\system32> certutil -delstore "Remote Desktop" 198b11d13f9a8ffe69a0

It will output something like this:

certutil -delstore Remote Desktop 198b11d13f9a8ffe69a0
Remote Desktop
Deleting Certificate 3
CertUtil: -delstore command completed successfully.

The next time you connect via RDP a new self signed certificate should be created allowing you to login.


Article from:
http://kb.parallels.com/en/112975




]]>
Wed, 14 Dec 2011 00:10:23 +1300
Plesk Panel Documentation http://www.net24.co.nz/kb/article/AA-00313 Parallels offers helpful documentation for Users and Administrators of Plesk Panel 10 at their website.

Parallels Plesk Panel 10 Documentation

]]>
Wed, 03 Aug 2011 23:31:38 +1200
Plesk Panel Video Tutorials http://www.net24.co.nz/kb/article/AA-00312 Parallels have a collection of video tutorials available on their website to help you with basic tasks such as adding web sites, creating databases, adding email address and more.

Parallels Plesk Panel Video Tutorials

]]>
Wed, 03 Aug 2011 23:28:14 +1200
Using a robots.txt file to prevent search engines from spidering dynamic variables and pages http://www.net24.co.nz/kb/article/AA-00289 Issue

By default, when a search engine spider visits your web site it follows all variable links, queries, search boxes and dynamic pages on your web site This can end up in an endless loop causing excessive load on your web site and generating high traffic.

Solution

The problem can be solved by uploading a robots.txt file to your web site which will prevent the search engines from following any URLs that begin with /? (these are the common dynamic page references).

Insert this text into your robots.txt file:

User-agent: *
Allow: /*?$
Disallow: /*?



]]>
Wed, 29 Jun 2011 02:43:09 +1200
CentOS: Install Yum http://www.net24.co.nz/kb/article/AA-00253

Issue

Yum is not installed..


Cause

Parallels do not include it in the default packages for a CentOS container/VPS.


Solution

**NOTE** Content inside the grey boxes in the following sections can be copied and pasted to your command line.

1. Login to your container/VPS via ssh as the root user.

2. Determine which version of CentOS you are running.

cat /etc/redhat-release


The output will be either:

CentOS release 6.2 (Final)

or:

CentOS release 5.7 (Final)

or:

CentOS release 5.6 (Final)

or:

CentOS release 5.5 (Final)


3. Paste the commands for your CentOS version to your command line.

CentOS 6.3:

rpm -Uvh --nodeps http://ucmirror.canterbury.ac.nz/linux/CentOS/6/os/$(uname -i)/Packages/yum-metadata-parser-1.1.2-16.el6.$(uname -i).rpm http://ucmirror.canterbury.ac.nz/linux/CentOS/6/os/$(uname -i)/Packages/yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm

rpm -Uvh http://ucmirror.canterbury.ac.nz/linux/CentOS/6/os/$(uname -i)/Packages/gpgme-1.1.8-3.el6.$(uname -i).rpm http://ucmirror.canterbury.ac.nz/linux/CentOS/6/os/$(uname -i)/Packages/pygpgme-0.1-18.20090824bzr68.el6.$(uname -i).rpm http://ucmirror.canterbury.ac.nz/linux/CentOS/6/os/$(uname -i)/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm http://ucmirror.canterbury.ac.nz/linux/CentOS/6/os/$(uname -i)/Packages/python-urlgrabber-3.9.1-8.el6.noarch.rpm http://ucmirror.canterbury.ac.nz/linux/CentOS/6/os/$(uname -i)/Packages/python-pycurl-7.19.0-8.el6.$(uname -i).rpm http://ucmirror.canterbury.ac.nz/linux/CentOS/6/os/$(uname -i)/Packages/rpm-python-4.8.0-27.el6.$(uname -i).rpm http://ucmirror.canterbury.ac.nz/linux/CentOS/6/os/$(uname -i)/Packages/yum-3.2.29-30.el6.centos.noarch.rpm

CentOS 6.2:

rpm -Uvh --nodeps http://vault.centos.org/6.2/os/$(uname -i)/Packages/yum-metadata-parser-1.1.2-16.el6.$(uname -i).rpm http://vault.centos.org/6.2/os/$(uname -i)/Packages/yum-plugin-fastestmirror-1.1.30-10.el6.noarch.rpm

rpm -Uvh http://vault.centos.org/6.2/os/$(uname -i)/Packages/gpgme-1.1.8-3.el6.$(uname -i).rpm http://vault.centos.org/6.2/os/$(uname -i)/Packages/pygpgme-0.1-18.20090824bzr68.el6.$(uname -i).rpm http://vault.centos.org/6.2/os/$(uname -i)/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm http://vault.centos.org/6.2/os/$(uname -i)/Packages/python-urlgrabber-3.9.1-8.el6.noarch.rpm http://vault.centos.org/6.2/os/$(uname -i)/Packages/python-pycurl-7.19.0-8.el6.$(uname -i).rpm http://vault.centos.org/6.2/os/$(uname -i)/Packages/rpm-python-4.8.0-19.el6.$(uname -i).rpm http://vault.centos.org/6.2/os/$(uname -i)/Packages/yum-3.2.29-22.el6.centos.noarch.rpm

CentOS 5.7:

rpm -Uvh --nodeps http://vault.centos.org/5.7/os/$(uname -i)/CentOS/yum-fastestmirror-1.1.16-16.el5.centos.noarch.rpm http://vault.centos.org/5.7/os/$(uname -i)/CentOS/yum-metadata-parser-1.1.2-3.el5.centos.$(uname -i).rpm

rpm -Uvh http://vault.centos.org/5.7/os/$(uname -i)/CentOS/libxml2-2.6.26-2.1.12.$(uname -i).rpm http://vault.centos.org/5.7/os/$(uname -i)/CentOS/m2crypto-0.16-8.el5.$(uname -i).rpm http://vault.centos.org/5.7/os/$(uname -i)/CentOS/python-elementtree-1.2.6-5.$(uname -i).rpm http://vault.centos.org/5.7/os/$(uname -i)/CentOS/python-iniparse-0.2.3-4.el5.noarch.rpm http://vault.centos.org/5.7/os/$(uname -i)/CentOS/python-sqlite-1.1.7-1.2.1.$(uname -i).rpm http://vault.centos.org/5.7/os/$(uname -i)/CentOS/python-urlgrabber-3.1.0-6.el5.noarch.rpm http://vault.centos.org/5.7/updates/$(uname -i)/RPMS/rpm-python-4.4.2.3-22.el5_7.2.$(uname -i).rpm http://vault.centos.org/5.7/os/$(uname -i)/CentOS/yum-3.2.22-37.el5.centos.noarch.rpm

CentOS 5.6:

rpm -Uvh --nodeps http://vault.centos.org/5.6/os/$(uname -i)/CentOS/yum-fastestmirror-1.1.16-14.el5.centos.1.noarch.rpm http://vault.centos.org/5.6/os/$(uname -i)/CentOS/yum-metadata-parser-1.1.2-3.el5.centos.$(uname -i).rpm

rpm -Uvh http://vault.centos.org/5.6/os/$(uname -i)/CentOS/libxml2-2.6.26-2.1.2.8.el5_5.1.$(uname -i).rpm http://vault.centos.org/5.6/os/$(uname -i)/CentOS/python-elementtree-1.2.6-5.$(uname -i).rpm http://vault.centos.org/5.6/os/$(uname -i)/CentOS/python-iniparse-0.2.3-4.el5.noarch.rpm http://vault.centos.org/5.6/os/$(uname -i)/CentOS/python-sqlite-1.1.7-1.2.1.$(uname -i).rpm http://vault.centos.org/5.6/os/$(uname -i)/CentOS/rpm-python-4.4.2.3-22.el5.$(uname -i).rpm http://vault.centos.org/5.6/os/$(uname -i)/CentOS/m2crypto-0.16-6.el5.8.$(uname -i).rpm http://vault.centos.org/5.6/os/$(uname -i)/CentOS/python-urlgrabber-3.1.0-6.el5.noarch.rpm http://vault.centos.org/5.6/os/$(uname -i)/CentOS/yum-3.2.22-33.el5.centos.noarch.rpm

CentOS 5.5:

rpm -Uvh --nodeps http://vault.centos.org/5.5/os/$(uname -i)/CentOS/yum-fastestmirror-1.1.16-14.el5.centos.1.noarch.rpm http://vault.centos.org/5.5/os/$(uname -i)/CentOS/yum-metadata-parser-1.1.2-3.el5.centos.$(uname -i).rpm

rpm -Uvh http://vault.centos.org/5.5/updates/$(uname -i)/RPMS/libxml2-2.6.26-2.1.2.8.el5_5.1.$(uname -i).rpm http://vault.centos.org/5.5/os/$(uname -i)/CentOS/m2crypto-0.16-6.el5.6.$(uname -i).rpm http://vault.centos.org/5.5/os/$(uname -i)/CentOS/python-elementtree-1.2.6-5.$(uname -i).rpm http://vault.centos.org/5.5/os/$(uname -i)/CentOS/python-iniparse-0.2.3-4.el5.noarch.rpm http://vault.centos.org/5.5/os/$(uname -i)/CentOS/python-sqlite-1.1.7-1.2.1.$(uname -i).rpm http://vault.centos.org/5.5/os/$(uname -i)/CentOS/python-urlgrabber-3.1.0-5.el5.noarch.rpm http://vault.centos.org/5.5/updates/$(uname -i)/RPMS/rpm-python-4.4.2.3-20.el5_5.1.$(uname -i).rpm http://vault.centos.org/5.5/os/$(uname -i)/CentOS/yum-3.2.22-26.el5.centos.noarch.rpm
]]>
Tue, 21 Jun 2011 02:49:56 +1200
Upgrading to Ironstor software from older legacy OBS software http://www.net24.co.nz/kb/article/AA-00255 If you already have the legacy OBS Online Backup Manager software installed on your computer and you wish to upgrade to the new Ironstor system then you will need to follow the steps below to uninstall the old software and settings before installing the new Ironstor Cloud Backup Manager.

Windows

1. Install the new Ironstor CBM
2. Next uninstall the new version to remove all legacy settings: 

    Open [Start] -> [Control Panel] -> [Add/Remove Programs]
    Select [Ironstor Cloud Backup Manager] from the list and press the [Remove] button

3. Repeat the installation of Ironstor CBM

MacOS

1. Remove all program files by opening a terminal session and typing the following commands. (You can open Terminal by typing 'Terminal' into Spotlight)

# cd $OBM_HOME/bin # sudo ./uninstall.sh

2. Remove all backup setting by removing ~/.obm

# rm –rf ~/.obm

3. Restart your computer

4. Install the new Ironstore CBM

]]>
Fri, 18 Feb 2011 02:55:21 +1300
How to use CURL with PHP to get content from SSL-enabled sites http://www.net24.co.nz/kb/article/AA-00246 Issue

You wish to use CURL to get information from secure https:// sites but get validation errors. 

Cause

The CURL libraries no longer include a list of certificates to validate against.

As such, these need to be obtained and then referenced in your code.

An example is given below.

Resolution

Obtain CA Certificate bundle in PEM format from http://curl.haxx.se/ca/cacert.pem and save this to a location within the httpdocs directory structure.

Within your code reference this.

An example :

<?php
...

// Set the URL to visit
$url = "https:<somesite/page";

// In this example we are referring to a page that handles xml
$headers = array( "Content-Type: text/xml",);

// Initialise Curl
$curl = curl_init();
if ($curl === false)
{
    throw new Exception(' cURL init failed');
}

// Configure curl for website
curl_setopt($curl, CURLOPT_URL, "https://<somesite>");

// Set up to view correct page type
curl_setopt(#curl, CURLOPT_HTTPHEADER, &$headers);

// Turn on SSL certificate verfication

curl_setopt($curl, CURLOPT_CAPATH, "/usr/local/www/vhosts/<yourdomainname>/httpdocs/cacert.pem");
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 1);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, TRUE);

// Tell the curl instance to talk to the server using HTTP POST
curl_setopt($curl, CURLOPT_POST, 1);

// 1 second for a connection timeout with curl
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 5);

// Try using this instead of the php set_time_limit function call
curl_setopt($curl, CURLOPT_TIMEOUT, 60);

// Causes curl to return the result on success which should help us avoid using the writeback option
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);

$result = curl_exec($curl);

...
?>



]]>
Thu, 27 Jan 2011 21:57:00 +1300
Ironstor Cloud Backup Manager User Guide http://www.net24.co.nz/kb/article/AA-00245 The attached PDF below contains installation, configuration and troubleshooting information for the Ironstor Cloud Backup Manager.

]]>
Thu, 27 Jan 2011 00:26:33 +1300
Ironstor Technical Frequently Asked Questions http://www.net24.co.nz/kb/article/AA-00244 The attached PDF below contains Technical Frequently Asked Questions about the Ironstor Cloud Backup Service.

]]>
Thu, 27 Jan 2011 00:24:06 +1300
How to perform a MySQL dump with PHP http://www.net24.co.nz/kb/article/AA-00241 Issue

Generally you would use phpMyAdmin within the Plesk Control Panel to perform a backup of your MySQL database ( Exporting and importing a MySQL database ) but sometimes this process can fail or time out if you have a reasonably large database. The work around for this is to use a simple PHP script to invoke a mysql dump command and place the resulting backup file into your private directory within your FTP area for download.

Solution

Create the following PHP file either directly from the Plesk File Manager or on your local computer and then upload it to the httpdocs directory. You could call it mysqldump.php

Copy the following line into your PHP file:

<?php 
set_time_limit(600);
system("mysqldump -h localhost -u YOURUSERNAME -pYOURPASSWORD YOURDATABSENAME > /usr/local/www/vhosts/YOURDOMAIN.CO.NZ/private/BACKUPFILENAME.sql");
?>

Replace YOURUSERNAME with your database username, YOURPASSWORD with your database password (note that you do NOT put a space between -p and YOURPASSWORD) and YOURDATABASENAME with your database name and specify a custom backup filename if you wish.

Now run the command by visiting the mysqldump.php URL in your browser. e.g. http://www.domain.co.nz/mysqldump.php - Be aware that it may take a moment to backup the database, so please ensure you only visit the URL once and allow it to complete. 

You should now have the resulting backup file ready for download via FTP in your private directory. Note that any files within your private directory contribute to  your overall disk quota so remember to remove the file once you have downloaded the backup. Best practice would be to also delete the mysqldump.php file from your hosting account because it contains your database login credentials and also to avoid any accidental execution in future.

]]>
Thu, 16 Dec 2010 23:08:27 +1300
Input of Date data fails http://www.net24.co.nz/kb/article/AA-00238 Issue

When dates are input this produces an error similar to :

The conversion of char data type to smalldatetime data type resulted in an out-of-range smalldatetime value


Solution

When you are working with dates in SQL server use the internationalised ISO date format, which is "YYYYMMDD" (no separators). This type of date will be accepted regardless of the language setting, and therefore will produce predictable results on any SQL server instance.

You can find out more about this here:

http://support.microsoft.com/kb/173907

]]>
Tue, 16 Nov 2010 01:29:08 +1300
How to extract an uploaded ZIP or TAR file http://www.net24.co.nz/kb/article/AA-00229
Issue

Many applications come pre-packaged in a compressed ZIP or TAR file. Instead of unpacking these files on your local computer and then uploading the many files via FTP you can upload the compressed file and extract the files directly on the server to save you time. Unfortunately Plesk doesn't have a facility to do this from the control panel, but you can easily extract files using this following simple PHP script.

Solution

Create the following PHP file either directly from the Plesk File Manager or on your local computer and then upload it to the httpdocs directory. You could call it unzip.php or untar.php.

Select the appropriate method and then copy the line of code into the PHP file and then replace 'example.zip' or 'example.tar.gz' with the filename you wish to extract.

Unzip

<?php system("unzip example.zip") ?>

Untar

<?php system("tar -zxvf example.tar.gz") ?>

 

Upload the file you wish to extract and ensure your PHP file is in the same directory, usually in the httpdocs folder. Now run the command by visiting the untar.php URL in your browser. e.g. http://www.domain.co.nz/untar.php - Be aware that it may take a moment to extract the archive, so please ensure you only visit the URL once and allow it to complete.

You will then want to delete the unzip.php or untar.php file from your hosting account, to avoid any accidental future extraction of your archives. If you've also finished with the original compressed file, delete this to save on your disk space.

]]>
Mon, 20 Sep 2010 02:50:39 +1200
Debian/Ubuntu IPTables Firewall Configuration http://www.net24.co.nz/kb/article/AA-00227

Issue

The firewall does not automatically load when the server starts.

Cause

Debian/Ubuntu servers do not have any default IPTables configuration files or /etc/init.d scripts.

Solution

Create /etc/iptables.up.rules. Example below to allow SSH (22), SMTP (25), HTTP (80), HTTPS (443), POP3 (110) and MySQL (3306)

First create your /etc/iptables.up.rules file by running this command:

iptables-save > /etc/iptables.up.rules

Then edit that file and use the example content below to create your rules.

*filter

# Drop any traffic not explicitly allowed in the rules below.
:INPUT DROP
:FORWARD DROP
:OUTPUT DROP

# Accept inbound traffic for already established connections.
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT

# Allow connection to the services running on this server.
-A INPUT -p tcp -m tcp --dport 22 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 25 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 443 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 110 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 3306 -j ACCEPT

# Effectively allow all outbound traffic.
-A OUTPUT -m state --state NEW,RELATED,ESTABLISHED -j ACCEPT

COMMIT

## If the firewall needs to be disabled, run the following command:
##
## iptables-save | sed "/-/d;/^#/d;s/DROP/ACCEPT/" | iptables-restore


Create /etc/network/if-pre-up.d/iptables with the following content:.

#!/bin/bash

/sbin/iptables-restore < /etc/iptables.up.rules


Make /etc/network/if-pre-up.d/iptables executable.

chmod +x /etc/network/if-pre-up.d/iptables




]]>
Wed, 15 Sep 2010 04:17:25 +1200
'Service Unavailable' error being displayed on web site http://www.net24.co.nz/kb/article/AA-00222
Issue

When browsing your web site, your normal page is now displaying a 'Service Unavailable' error message.

Cause

Each web site runs in it's own IIS Application Pool. An application pool isolates web sites from each other even though they are being hosted on a common server. Each application pool is given its own set of server resources. That way, if a web site crashes, it won’t effect sites in other application pools.

If your web site is showing the 'Service Unavailable' error then it means that your Application Pool has crashed. Application Pools can crash for a number of reasons, such things as buggy code, memory leaks, or random unexpected errors encountered by your scripts. If it only happens once every six months, then it may not be anything to worry about. If it is happening several times a week then it is something you will probably want to look into further.

Solution

The immediate solution is to restart your Application Pool in the Plesk Control Panel. Follow the steps listed in this article to Start your Application Pool.

]]>
Wed, 11 Aug 2010 00:37:52 +1200
Restarting the IIS Application Pool http://www.net24.co.nz/kb/article/AA-00221

Issue

Each web site runs in it's own IIS Application Pool for script isolation. If your IIS Application Pool has stopped or crashed you will see a 'Service Unavailable' notice when browsing your web site.

Solution

Start the IIS Application Pool using Plesk.

To start the Application Pool follow these steps:

  1. Login to Plesk Server Administrator.
  2. Select the domain name you are having the problem with.
  3. Click on the IIS Application Pool button.

  4. Click on the Start button.


After a few seconds the page will reload and the Work Process will have been started. Your web site should now be back online.

]]>
Wed, 11 Aug 2010 00:25:23 +1200
Problem with /tmp directory mounted with 'NOEXEC' http://www.net24.co.nz/kb/article/AA-00220
Issue

You have encountered an issue installing an application or PHP Module that is attempting to execute files that have been copied into the /tmp directory.

Reason

As a security precaution, /tmp and /var/tmp are mounted with noexec, nsuid and nodev to prevent the many simple exploits uploaded via vulnerable PHP applications from being able to execute commands in /tmp and/or /var/tmp.

Solution

In some cases you may need to have /tmp executable. Depending on what function you are using, there are a few options to bypass this restriction.

If you are using apt-get/aptitude, you can run a simple one-liner command to use /var/local/tmp instead of /tmp:

echo "APT::ExtractTemplates::TempDir \"/var/local/tmp\";" | tee /etc/apt/apt.conf.d/50extracttemplates && mkdir /var/local/tmp/


If you are attempting to install PECL extensions, setup a new temporary directory where the extensions are compiled by running the following commands:

mkdir -p ~/tmp/pear/cache

mkdir -p ~/tmp/pear/temp

pear config-set download_dir ~/tmp/pear/cache

pear config-set temp_dir ~/tmp/pear/temp

If you're simply running ./configure to compile something, most Linux utilities will honor the TMPDIR option. TMPDIR is the canonical Unix environment variable that points to user scratch space. This will denote the scratch area for temporary files instead of the common default of /tmp. Other forms sometimes accepted are TEMP, TEMPDIR, and TMP but these are used more commonly by non-POSIX operating systems

Finally, if you are still having trouble you can bind /tmp and /var/tmp to another directory with executable permissions using the following example :

Do the substitute directories exist? If not then create them:

mkdir ~/tmp
mkdir ~/var/local/tmp

Then bind /tmp and /var/tmp to these new directories:

mount --bind ~/tmp /tmp

mount --bind ~/var/tmp /var/local/tmp


Keep in mind that if you reboot your VPS after you have done this, /tmp and var/tmp will return to 'noexec'

When you are finished, umount the new ~/tmp directory with the following command:

umount /tmp
unmount /var/tmp



 

]]>
Tue, 10 Aug 2010 23:52:16 +1200
Expanding the disk for Windows Server 2008 VMs http://www.net24.co.nz/kb/article/AA-00218
Issue

If you have arranged to have your virtual disk space increased for your Cloud VM you will need to expand the partition in Windows Server 2008 before you can make use of the space.

Solution

In the example below, we have increased the VMs 20GB disk by 10GB and will now go through the steps so that Windows recognises this new space.

1. Navigate the Start Menu and find Server Manager.

2. Find the Storage node, expand it and select Disk Management. Right click Disk Management and use either Refresh or Rescan Disks, both should work fine. When the refresh is finished, you should see the newly added extra 10 GB as unallocated space on the disk you expanded. In our case it's Disk 0, as thats the only virtual disk that is attached to this particular server.

3. Right click the c:\ volume, and select Extend Volume and the "Extend Volume Wizard" should appear. This is quite straight forward, but click next and you will be presented with a the tool that allows the volume expansion.

4. By default, the wizard will select all available space in the Selected column, but you can adjust those settings if you like. When you have done a selection you're comfortable with, click Next and a summary screen will appear outlining the changes you have made. If you are satisfied with your choices, click Finish

]]>
Tue, 10 Aug 2010 22:14:31 +1200
Using the Plesk Windows Scheduler to call an ASP or .NET page http://www.net24.co.nz/kb/article/AA-00213
Issue

You would like to use the Plesk Windows Scheduler to call a particular ASP or ASP.NET script on your web site that will perform a function.

Solution

1. Click on 'Scheduled Tasks' in Plesk

2. Click on 'Add New Task'

3. Enter a description and notification email if required

4. In the 'Path to executable file' field, enter the following path: C:\Windows\system32\cscript.exe

5. In the 'Arguments' field enter the following: D:\vhosts\mysite.co.nz\httpdocs\schedule.vbs  (replacing mysite.co.nz with your domain name)

6. Because cscript.exe won't execute an asp file, we'll need to create a vbs script, that will then call the asp script. In the schedule.vbs script, we'll use the xmlhttp request to open a web page. Copy and paste the script below and save to a file called schedule.vbs and upload this to your site.

Call RunIt()
Sub RunIt()

Dim RequestObj
Dim URL
Set RequestObj = CreateObject("Microsoft.XMLHTTP")

'Request URL...
URL = "http://www.mydomain.co.nz/myScript.aspx"

'Open request and pass the URL
RequestObj.open "POST", URL , false

'Send Request
RequestObj.Send

'cleanup
Set RequestObj = Nothing
End Sub

7. Now you can create your myscript.aspx page, or whatever you would like to name it to perform the tasks you require to be scheduled.

]]>
Thu, 05 Aug 2010 04:23:31 +1200
Why does the Windows RRAS VPN Service not work properly? http://www.net24.co.nz/kb/article/AA-00212 Issue

The Windows RRAS VPN service will not install and/or will not work properly once installed.

Cause

VPN Server functionality is enabled on a per-VPS basis as the Virtuozzo system needs to set up rules to enable the correct connection translations to your VPS.

Solution

Contact Net24 Customer Service to enable VPN server functionality for your VPS.


]]>
Tue, 03 Aug 2010 22:54:36 +1200
Where is the "Compress old files" option - NTFS Compression functionality? http://www.net24.co.nz/kb/article/AA-00211

Issue

NTFS compression support has been disabled.

Cause

Normally file compression starts automatically when the disk space is close to its quota. Since Virtuozzo doesn't support ntfs compression, the compressed virtual-private-server will not start after this. To avoid this, we have disabled automatic compression within all virtual-private-servers.


]]>
Tue, 03 Aug 2010 22:52:42 +1200
What updates should I apply to my VPS? http://www.net24.co.nz/kb/article/AA-00210 Issue

What updates should I apply to my VPS?

Solution

Any operating system updates are handled by Net24 as part of our server patching regime.

Any applications you install after the creation of your VPS will need to be managed yourself.

As such, if you installed IIS, .NET and SQL server you would ONLY apply updates for these applications.


]]>
Tue, 03 Aug 2010 22:51:52 +1200
Setting up passive FTP in IIS7 http://www.net24.co.nz/kb/article/AA-00209 Issue

How to configure Passive Mode FTP in IIS7

Solution

You need to define a port range in IIS7 and the Windows Firewall.

IIS7 Port range configuration

The port range is defined at the Root level of the IIS7 Manager under "FTP Firewall Support".
"0-0" is the default port (20).
Enter in a range here that defines what passive port range you require.
Enter in the IP address of your VPS under the "External IP Address of Firewall" section.

Windows Firewall Port range configuration

Open up "Windows Firewall with Advanced Security".
Under "Inbound Rules" configure the "FTP Connection" rule setup by IIS7 to allow the same port range you defined in IIS7.


]]>
Tue, 03 Aug 2010 22:50:56 +1200
Running installation program reports a lack of disk space http://www.net24.co.nz/kb/article/AA-00208 Issue

I get an error stating that there is a lack of disk space when I attempt to run an installation program.

Solution

DEP (Data Execution Prevention) in the OS sometimes prevents a self-extractor program from running.

To fix:

Run My Computer -> Properties -> Advanced -> Performance Settings -> Data Execution Prevention
Browse and add the installer exe to the list of allowed programs.


]]>
Tue, 03 Aug 2010 22:49:01 +1200
Maximum number of connections exceeded when connecting with RDP to VPS http://www.net24.co.nz/kb/article/AA-00207

Issue

You are no longer able to establish a Remote Desktop Connection (RDP) to your VPS and you receive the following error:

The terminal server has exceeded the maximum number of allowed connections.

Cause

The problem occurs when all the available terminal service sessions are in use. Often this is caused when users do not correctly log off and simply close the RDP window, which leaves the session open.

Solutions

You can always establish a connection to the virtual console of the VPS, regardless if it is in use. To connect to the console you need to add the /console switch to the RDP executable. You can update the RDP shortcut in the start menu to always connect to the console or run it once as shown by the steps below.

To connection to the console of the VPS follow these steps:

  1. Click the Windows Start button.
  2. Select Run.
  3. In the Run dialog box enter:
    mstsc.exe /console
    
  4. Click Ok.

The RDP application will start and any RDP connections will be established to the console. If there is already a connection to the console this existing connection will be closed automatically.

Logging off Inactive Users

Once logged in you may wish to logout any inactive sessions and free up terminal services connections. To do this right click on the task bar and select Task Manager. From the Users tab you can select the user and then select Logoff.

]]>
Tue, 03 Aug 2010 22:47:51 +1200
Internet Explorer 8 is not supported with Virtuozzo http://www.net24.co.nz/kb/article/AA-00205 Issue

Installing Internet Explorer 8 causes your VPS to malfunction.

Reason

At this time Parallels Virtuozzo does not support Internet Explorer 8. Internet Explorer is deeply integrated with the Windows kernel and therefore cannot be installed directly inside the VPS.

If you have attempted to install Internet Explorer 8 inside your VPS, please contact Net24 Customer Service for further assistance.


]]>
Tue, 03 Aug 2010 04:37:27 +1200
I can't RDP in to my VPS Server http://www.net24.co.nz/kb/article/AA-00204

Issue

I can't connect to my VPS server over RDP although I can access it via the Virtuozzo Power Panel.
(https://vpsXXX.win.vps.isx.net.nz:4643)

Cause

There may be two causes for this :

1. The Windows Firewall is preventing access due to configuration changes
2. The Service is stopped.

Solutions

The solution to both issues above is similar.

Log in to the Virtuozzo Power Panel and then choose services.

Either :

Start the Terminal Services service if this is stopped
and/or
Stop the Windows Firewall service.

This should allow you to log in.

If you stopped the Windows firewall service, resolve the configuration issue and start the service.


]]>
Tue, 03 Aug 2010 04:28:00 +1200
How do I install Windows server components? http://www.net24.co.nz/kb/article/AA-00203 Issue

I can't install Windows Server components as installation requires a CD or other source.

Solution

Map a network share from your VPS to \\210.5.54.254\Files
If the system prompts you for credentials use a login name of "Guest" with a password of "Net24".

Point the Windows installation directory prompts at the directories below this mapped drive.


]]>
Tue, 03 Aug 2010 04:25:11 +1200
How do I add VPN-server capability to my VPS? http://www.net24.co.nz/kb/article/AA-00202 Issue

Adding RRAS fails or otherwise does not work.

Cause

VPN Server (or client) functionality is not enabled by default because of the extra processing and memory required to handle these connections.

Solution

Call or email our support centre and ask to have VPN functionality enabled. You will need to mention your vps id number.

We will confirm this has been done and give you your private IP address.

Add the DHCP Service or configure RRAS later to use static addresses. (You will need to connect to our Windows support share as described in the How do I Install Windows Server Components article).

Make sure that you configure the "Administrator" user to be granted remote (dialin) access. Choose Allow. If you do not do this now you will be locked out of your VPS and will have to use the Power Panel web-based access to stop the RRAS service in order to let yourself back in.

You can then add the RRAS service. Select the VPN option (VPN or dialup and then select VPN only).
Select the correct interface for Internal (the one matching the IP address we give you).

Congratulations! You now have a working VPN server!


]]>
Tue, 03 Aug 2010 04:24:09 +1200
Error "530 Valid Hostname is expected" using FTP to IIS7 http://www.net24.co.nz/kb/article/AA-00201 Issue

When connecting to IIS7 using FTP you get the following error.

530 Valid Hostname is expected

Reason

When you set up name-based FTP services IIS7 wants the sitename defined with the username so that IIS7 can associate the username with the site they wish to log in to.

Solution A

If you want more than one FTP site on your VPS you will need to :

Configure all FTP clients such that :
Host: Mysite.com
User: Mysite.com|Username

Note the "|" that seperates the Sitename and the Username.

Solution B

If you only have one FTP site remove the "Host Name" defined in the "Bindings" property of the FTP site.


]]>
Tue, 03 Aug 2010 04:22:43 +1200
Configuring IIS to run 32-bit applications on 64-bit Windows http://www.net24.co.nz/kb/article/AA-00200 Issue

If you wish to run a 32-bit web application under a Windows x64 VPS then you must switch IIS to run in 32-bit mode.

Solution

IIS 6.0 is able to run 32-bit Web applications on 64-bit Windows using the Windows-32-on-Windows-64 (WOW64) compatibility layer.

To enable IIS 6.0 to run 32-bit applications on 64-bit Windows

  1. Open a command prompt and navigate to the %systemdrive%\Inetpub\AdminScripts directory.
  2. Type the following command:
    cscript.exe adsutil.vbs set W3SVC/AppPools/Enable32BitAppOnWin64 "true"

  3. Press ENTER.

]]>
Tue, 03 Aug 2010 04:21:34 +1200
Can I change the login name to the Virtuozzo Power Panel? http://www.net24.co.nz/kb/article/AA-00199

Issue

The Virtuozzo Power Panel allows offline and online management of your VPS, including starting, stopping and file management of your VPS. Because of this control you may wish to change the default Administrator login name to tighten security.

Solution

When you login to the Power Panel your login is authenticated against the Windows user database in your VPS. Any user belonging to the 'Administrators' group can login to the Power Panel. Therefore if you wish to change the login to the Power Panel for the 'Administrator' user, simply rename the 'Administrator' account in your VPS.

You can also create additional users, add these to the 'Administrators' group and these users can then also login to the Power Panel.


]]>
Tue, 03 Aug 2010 04:17:51 +1200
Adjusting the memory used by SQL Server 2005 http://www.net24.co.nz/kb/article/AA-00198

Issue

Microsoft SQL Server 2005 or Express is using all of the available memory on your VPS. SQL Server memory usage may continue to steadily increase and not decrease, even when activity on the server is low.

Reason

By default, SQL Server dynamically grows and shrinks the size of its buffer pool (cache) depending on the physical memory load reported by the operating system. When MSSQL is installed, the maximum server memory value is set by default to approximately 2,000 GB. If your VPS is only running MSSQL, this value is fine. If you are running additional applications such as IIS, SMTP and other services on your server, you will want to adjust this value so that MSSQL shares memory with other applications on the server.

How to adjust the memory used by SQL Server 2005

The steps below apply to both SQL Server 2005 and SQL Express.

  1. Log into Microsoft SQL Server Management Studio Express or Workgroup either directly on your VPS or from your local machine
  2. Right click the SQL server name and select Properties


  3. Select the Memory tab


  4. Adjust the Minimum server memory and Maximum server memory
  5. Click OK

]]>
Tue, 03 Aug 2010 04:17:13 +1200
Ubuntu VPS server does not have a sources.list file http://www.net24.co.nz/kb/article/AA-00196

Issue

Some Ubuntu VPS servers do not come with an /etc/sources.list file.
(Version 8.04 includes this in the /etc/apt directory)

Solution.

A generic template file is used for creating VPS servers and as such, the sources.list file is left for customers to create as they wish.

You may use any valid repository server in this file.

Important Note

If you create your own sources.list file it is important that you exclude kernel and/or kernel module updates as these updates are performed by Net24 and will affect the stability of your VPS should you install updates yourself.


]]>
Tue, 03 Aug 2010 04:14:02 +1200
I can't find particular Iptables modules http://www.net24.co.nz/kb/article/AA-00195

Issue

Some iptables modules are missing and are not defined in the modules.dep file

Cause

We have a default set of iptables modules defined as not every user needs the full list.
This saves VPS memory for those users who only need basic firewalling functionality.

Solution

Email service@net24.co.nz with your VPS number and details of which iptables modules you require to be enabled.

The additional modules are listed here :

  • ip_conntrack
  • ip_conntrack_ftp
  • ipt_conntrack
  • ipt_helper
  • ipt_LOG
  • ipt_state
  • ipt_TOS
  • iptable_nat
  • ip_nat_ftp

]]>
Tue, 03 Aug 2010 04:12:51 +1200
Plesk Server Administrator documentation http://www.net24.co.nz/kb/article/AA-00193 This page contains a list of Plesk Server Administrator Guides for both Windows and Unix Plesk Systems.


]]>
Tue, 03 Aug 2010 04:10:38 +1200
How do I add a PTR record for my IP address? http://www.net24.co.nz/kb/article/AA-00192 Issue

If you are using your VPS to send email, you may find that some mail servers are rejecting email from your VPS because they are unable to do a reverse DNS lookup on the VPS IP address.

A PTR record allows a reverse DNS lookup to be performed on your IP address to resolve the hostname of your server or mail server.

Solution

A PTR record is created by the holder of the IP block, in this case, Net24.

To have a PTR record created for your IP address submit a support ticket http://www.net24.co.nz/support.php and include your VPS ID, IP address that the PTR record should be created for and the hostname of your mail server.


]]>
Tue, 03 Aug 2010 04:02:55 +1200
Pre-sales Frequently Asked Questions http://www.net24.co.nz/kb/article/AA-00191 This FAQ covers frequently asked sales questions about Net24's Shared Hosting service. Should you have any additional questions, please contact customer service service@net24.co.nz

Are there any setup fees?

There are no setup fees for any of our web hosting plans!

Are your servers based in NZ?

Yes our servers are NZ based. We operate our own servers from our Christchurch based data centre. You can view more information about our network here: http://www.net24.co.nz/network.htm

Can I pay by cheque or bank payment?

Yes. We operate on a monthly invoice basis and accept payment by credit card, cheque or bank payment (Internet Banking, Automatic Payment)

Can I test and preview my site before going live on your server?

Yes. The Plesk Server Administrator allows you to preview your web site using the web server address. This will display your web site exactly as if you were accessing the site via the actual domain name. A site preview can be generated from the Plesk Server Administrator by clicking on the Site Preview button.

Do you offer telnet or shell access?

No, Net24 does not provide shell access for shared web hosting plans due to security reasons.

Do you support anonymous ftp?

Net24 does not provide anonymous FTP at this time.

Do you support shared SSL?

We support shared SSL on our Windows plans. Shared SSL is not supported on our Unix plans. We can issue RapidSSL domain certificates from $85NZD.

Do your plans support sub domains?

Yes they do. You can create unlimited sub domains for a domain name under any web hosting plan for both Unix and Windows platforms.

Do your servers run UNIX or Windows?

We operate both platforms. Our Unix web hosting plans run on the FreeBSD platform.

How many domain names can I host under one plan?

We support unlimited domain aliases under one account. That is, a domain name that points to the home directory of your web site. Domain aliases cannot be used to host multiple web sites under the one plan. A separate web hosting plan will need to be purchased for each web site you wish to host.

What kind of servers are you using?

Currently, our latest deployed servers are HP Blades with Quad-Core Intel ® Xeon® processors with RAID 1, 5 and 10 (depending on application) arrays with Battery-Backed Write Cache.

Will you help me transfer my web site?

Yes, we offer a transfer assistance program for static HTML web sites to help you relocate your web site from another provider. We know that transferring a web site to a new web hosting provider is not always straight forward and during the transfer you will want to make sure your web site is not offline and your email services remain unaffected.

Our transfer assistance program is free of charge and a dedicated Account Manager will help you every step of the way.

See our Transfer Assistance Program for more information.

]]>
Tue, 03 Aug 2010 03:52:23 +1200
Uploaded files receiving incorrect permissions http://www.net24.co.nz/kb/article/AA-00189

Issue

When uploading files to a Unix server, you may receive errors about file permissions similar to these below.

Warning: move_uploaded_file(<Filename>) [function.move-uploaded-file]: 
failed to open stream: Permission denied in <PathToYourScript> on line XXX

Warning: move_uploaded_file() [function.move-uploaded-file]: 
Unable to move '<TemporaryFilename' to '<Filename>' in <PathToYourScript> on line XXX

Cause

This results from a bug in the way the CGI version of PHP (which we use for enhanced security) handles permissions when using the move_uploaded_file function.

Solution

There is no solution at present however we do offer a workaround.

For all instances where the move_uploaded_file function is being used, insert a chmod function immediately after the function. See the example below

if(@move_uploaded_file($uploaded_file_name,$destination_file_name))
{ 
      @chmod($destination_file_name,<NewPermissionsInUnixFormat>); 
      # Code that follows a successful upload; 
}
else 
{
       #Code to handle move_uploaded_file function error;
}

]]>
Tue, 03 Aug 2010 03:50:14 +1200
PHP not working on subdomains http://www.net24.co.nz/kb/article/AA-00188 Issue

When you create a subdomain in Plesk, such as host.mydomain.co.nz, and try to access a PHP page on this subdomain the following error is displayed:

Forbidden

You do not have permission to access this document.

Web Server at mydomain.co.nz

Solution

The problem occurs because some services are not enabled for the subdomain. Net24 runs PHP under a suexec environment with FastCGI, therefore it is necessary to enable both CGI and FastCGI as well as the PHP option.

You can check these options in Plesk by going to 'mydomain.co.nz > Subdomains', then click on the subdomain to display the Manage subdomain page. The screenshot below shows the options which should be enabled to allow PHP to function correctly.



]]>
Tue, 03 Aug 2010 03:49:17 +1200
PHP Function mysql_pconnect fails with an error message http://www.net24.co.nz/kb/article/AA-00187 Issue

Php function mysql_pconnect fails with an error message of :

Fatal error: Call to undefined function mysql_pconnect() in pathname-to-php-file on line linenumber


Cause

Because we employ php as a fastcgi script to enhance security for your website, there are no persistent connections available as there are when php is configured as an apache module.

Solution

You will need to recode your application to use the mysql_connect function (or some other suitable function) instead.

]]>
Tue, 03 Aug 2010 03:19:07 +1200
Password protecting a directory with an .htaccess file http://www.net24.co.nz/kb/article/AA-00174 Overview

It may be necessary to password protect a directory or folder on your web site to prevent general public access or to prevent public download of Access databases stored within a folder.

Usually you can easily password protect a directory using the Plesk Server Administrator following the instructions here.

However, in some cases you may like to automate and control access to a directory by using a script to add usernames and passwords to an access list / password file or if you need to protect a directory on a sub domain you will need to use a .htaccess file as the Plesk Protected Directories feature is not available for sub domains.

The .htaccess file method only applies to Unix hosting plans.

Method

Firstly, you will need to know the full path to your document root. This article will help you find this.

Then, in the directory you want to protect with HTTP authentication, create or upload a file named: .htaccess (remember to include the "." before the "htaccess"). Alternatively you can upload a text file called htaccess.txt and rename this once it has been uploaded to .htaccess

The .htaccess file should contain the following 4 lines:

AuthType Basic
AuthName "Some Description"
AuthUserFile /[home dir full path]/httpdocs/.htpasswd
Require valid-user


For example, if your domain was example.com, then the third line would read:

AuthUserFile /usr/local/www/vhosts/example.com/httpdocs/.htpasswd


The third line is the path to your password file.

Next, you need to create the password file itself. In the example above, .htpasswd is the file that will contain your access list. It is a special file that contains usernames and encrypted passwords that only the web server can read.

Since you don't have access to the Unix command line, you'll need to use an online tool to create the encrypted passwords. Try http://www.htaccesstools.com/htpasswd-generator/ and enter a username and password. It will create an output like user:ZHdYGYUr0N8PI.

Next create your htpasswd file, either as .htpasswd or as a htpasswd.txt file. Edit this file and enter the username and password combination. You can enter one per line.

So your htpasswd file will look something like this:

user:ZHdYGYUr0N8PI


Upload this file to the path specified in your .htaccess file. If you have named the file as a txt file, remember to rename after uploading to .htpasswd.

Now when you enter the URL to your protected directory you should be prompted for the login and password.

Hidden files

The .htaccess and .htpasswd files are hidden files. So after uploading, you won't see them under your FTP client. To view them, you can either turn on 'Show Hidden Files' in your FTP client or use the File Manager under the Plesk Server Administrator. The File Manager can also be used to easily edit and rename the files.


]]>
Tue, 03 Aug 2010 03:18:33 +1200
How do I add PEAR modules? http://www.net24.co.nz/kb/article/AA-00186 Issue

I wish to add PEAR modules to my website but these don't appear to be installed on your servers.
How do I do this?

Cause

There are many PEAR modules available and we're not able to support each and every one of these.
As such we have not installed any PEAR modules on our servers.

Resolution

As PEAR modules are simply PHP libraries, you can install these on your site by downloading them and pointing your php scripts to include them as described within the page below.

http://articles.techrepublic.com.com/5100-10878_11-5163311.html


]]>
Fri, 30 Jul 2010 05:21:20 +1200
What is the path to Sendmail? http://www.net24.co.nz/kb/article/AA-00185 The path to Sendmail on the Unix shared hosting plans is:

/usr/sbin/sendmail



]]>
Fri, 30 Jul 2010 05:18:56 +1200
Understanding email header injection exploits http://www.net24.co.nz/kb/article/AA-00184

Overview

Botnets are constantly scanning the web to locate PHP scripts which are vulnerable to a email header injection exploit. All PHP scripts which send email based on input data, such as when a user supplies a "From" or a "To" address, may be vulnerable. In addition, botnet attempts to inject headers into any other fields it finds on a form such as hidden fields. This article discusses this issue in relation to PHP, but is relevant to all scripting languages.

Discussion

A distributed network of machines are employed to scan PHP-based websites in search of scripts which might be vulnerable to an injection-style security exploit. The exploit, if successful, permits the botnet to send emails to arbitrary destinations. A common target of the botnet is the kind of web-based feedback form which submits an email to a user-provided designated address. The botnet script injects malicious email headers into the form's fields, which are then passed to the mail server. The mail server parses those headers and then, if the attack was successful, it sends an email to the address designated in the maliciously injected headers.

Are My Scripts Vulnerable?

If you have a script that relies on user input for generating an email, then your script is potentially vulnerable to this exploit.

You should review the code for any of your scripts that rely on user input for constructing an email. In addition, you should examine any other fields in your scripts that may NOT rely on user input but which are still used in the generation of an email. Note the two error log snippets below.

In Snippet No. 1, the botnet has tried to manipulate form variables, a hidden form variable ('_submit') and other variables such as the session ID.

array(53) {
["HOME"]=> string(1) "/"
["PATH"]=> string(29) "/sbin:/bin:/usr/sbin:/usr/bin"
["_submit"]=> string(29) "yrfockfsy@example.com"
["password"]=> string(29) "yrfockfsy@example.com"
["PHPSESSID"]=> string(445) "yrfockfsy@example.com
Content-Type: multipart/mixed; boundary=\"===============1678997057==\"
MIME-Version: 1.0
Subject: 8526bb87
To: yrfockfsy@example.com
bcc: Homeiragtime@aol.com
From: yrfockfsy@example.com

This is a multi-part message in MIME format.

--===============1678997057==
Content-Type: text/plain; charset=\"us-ascii\"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
fvf
--===============1678997057==--
"


In Snippet No. 2, the botnet has again tried to manipulate form variables, a hidden form variable ('_submit') and other variables such as the session ID but in this case, the submitted values have been changed.

array(53) {
["HOME"]=> string(1) "/"
["PATH"]=> string(29) "/sbin:/bin:/usr/sbin:/usr/bin"
["_submit"]=> string(25) "rfljy@example.com"
["password"]=> string(438) "rfljy@example.com
Content-Type: multipart/mixed; boundary=\"===============1104808547==\"
MIME-Version: 1.0
Subject: da79e5ec
To: rfljy@example.com
bcc: Homeiragtime@aol.com
From: rfljy@example.com

This is a multi-part message in MIME format.

--===============1104808547==
Content-Type: text/plain; charset=\"us-ascii\"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit

twjgdcbd
--===============1104808547==--

"
["PHPSESSID"]=> string(25) "rfljy@example.com"


Solution

To prevent an email header injection attack, you need to filter all input data including any other fields on your forms (such as hidden fields) that may be used by your scripts in the creation of an email. The actual filtering implementation is a matter of programming style.

You can prevent the attack by performing a data validation procedure that will not allow a script to run until the unwanted strings have been removed. For example, the following pattern can be used with PHP's preg_match function. If the function returns false, you can prevent the user from proceeding.

Pattern for filtering email addresses:

"/^([a-z0-9._-](\+[a-z0-9])*)+@[a-z0-9.-]+\.[a-z]{2,6}$/i"


Using the pattern for email addresses, you might do the following:

$emailPattern = "/^([a-z0-9._-](\+[a-z0-9])*)+@[a-z0-9.-]+\.[a-z]{2,6}$/i";
if (!preg_match($emailPattern, $emailFieldToTest))
{
print 'Please review the email address you entered. There seems to be a problem';
}


Why does this Exploit Work? Is PHP Insecure?

This exploit has nothing to do with the behavior of PHP and, therefore, is not a shortcoming of PHP. The exploit "works" because of the MIME and SMTP standards.

A basic MIME message is broken into two parts; a header and a body. The header and body are separated by a blank line, i.e., \r\n\r\n (although most mail clients will accept UNIX and other line delimiters, like \n\n or even \n\r\n\r). MIME is also multi-part which means that messages can be embedded in other messages. This is done by having the top level header declare a boundary, which is then used to process further header/body pairs.

If someone is able to inject content into this top level header, they can now essentially control the structure of the entire message. This is done by creating their own boundary, thus defining what's a body and what's a header.

The other significant point of weakness that's taken advantage of is the fact that MIME (and subsequently SMTP) can deal with multiple headers of the same name. Meaning, if there is a To: followed by a To: they are interpreted "correctly" with no errors.

Putting it all together, this allows an attacker to define additional recipients for a message, not to mention adding Bcc: and Cc: headers using multiple headers of the same name. In addition the attacker can define body parts to be sent as the content of the message by defining a multi-part message. So even user input intended as content is vulnerable to the injection of a header instruction. That is why all input data must be filtered.

Conclusion

This article examined the specifics of a particular script exploit and is not meant to protect all PHP scripts from all exploits. As often happens, once one security hole has been closed, another one is found. The important lesson is the need to know exactly how your script will behave and, most importantly, exactly what data you expect to receive from the script.

A solid architecture would assure that:

  1. You know what you are sending out
    Keep track of forms you've put on your site and develop a policy for accepting form submittal (for instance time outs, multiple forms per user id, multiple submissions, not accepting forms you don't expect, etc). This can be implemented using tokens.
  2. You know what you should be getting back
    This is crucial. Just because a <select> field contains certain values, don't think you can't get back something totally different such as PHP code, SQL, etc.
    • Know the fields you need to have back to accept the form as valid.
    • Restrict exactly what values you'd accept as input.
    • Always minimize taking data from forms (or any external source) and using it directly in database queries, or other inner and intimate parts of your application.

]]>
Fri, 30 Jul 2010 05:16:41 +1200
Unable to delete directory in FTP or Plesk Server Administrator http://www.net24.co.nz/kb/article/AA-00183 Issue

When you try to delete a directory using FTP or the file manager in Plesk Server Administrator you receive an access denied message.

Cause

The issue can occur if the IIS Worker Process has a lock on the directory or files and folders contained within the directory. Until this lock is released it will be impossible to remove the directory.

Solution

The lock can be removed by recycling the IIS Worker Process using Plesk. Once recycled you can then delete the directory using either FTP or the Plesk file manager.

To recycle the Worker Process follow these steps:

  1. Login to Plesk Server Administrator.
  2. Select the domain name you are having the problem with.
  3. Click on the IIS Application Pool button.

  4. Click on the Recycle button.

After a few seconds the page will reload and the Work Process will have been recycled (however no confirmation of this is displayed). At this point you can delete the directory.

]]>
Fri, 30 Jul 2010 04:58:39 +1200
Unable to access Plesk Server Administrator http://www.net24.co.nz/kb/article/AA-00182 Issue

When trying to connect to the Plesk Server Administrator you receive a connection failed or timeout error.

Solution

The Plesk Server Administrator listens for SSL connections on port 8443, because this is not a standard web service port some firewalls may block access. To resolve this problem check your computers software firewall and any hardware firewall or security appliances which may sit in front of your computer.


]]>
Fri, 30 Jul 2010 04:46:16 +1200
Server Side Includes (SSI) not working under Windows hosting http://www.net24.co.nz/kb/article/AA-00181

Issue

Server Side Includes (SSI) aren't working under a Windows hosting account and .shtml files don't appear to run.

Reason

Net24 does not support server side includes on Windows hosting accounts; there is a history of security problems with SSI on Windows.

Demand for SSI on Windows is usually low because customers requiring Windows hosting will predominantly be using ASP or ASP.NET server side scripting languages and customers will use the include functions of these languages.

For this reason we have chosen not to support SSI on windows and expose the servers to another attack vector.

Solution

The solution is to use ASP virtual includes such as the example below:

<!--#include virtual="/<virtual path>/<filename.ext>"-->

Rename the page extension to .asp as .shmtl will not run on the server.

If you must use server side includes and do not require any Windows hosting technologies such as asp and asp.net then contact us and we will move your account to a Unix hosting plan that does support SSI.


]]>
Fri, 30 Jul 2010 04:44:09 +1200
Sending email from your web application http://www.net24.co.nz/kb/article/AA-00180 Issue

What SMTP server should be used to send email from my web application?

Solution

From all shared web hosting servers please use: mx.hosting.isx.net.nz

If you are using Persits AspEmail with ASP/ASP.NET and using the SMTP queuing feature, then it's not necessary to specify an SMTP server; the AspEmail queue processor is configured to relay mail the correct SMTP server.

PHP on both Windows and Unix hosting servers are also configured to send mail using the correct SMTP server; manual configuration is not necessary.


]]>
Fri, 30 Jul 2010 04:43:08 +1200
Previewing your web site by editing your hosts file http://www.net24.co.nz/kb/article/AA-00179 Issue

For various reasons it may be necessary to update the Hosts file on your computer to properly resolve a web site by its domain name. The most common reason for this is to allow you to view or publish web content immediately after purchasing a new domain name or transferring an existing domain name to our service.

New and transferred domain names have a delay period that can be anywhere from a few hours to a few days. During this period of time the new or transferred domain information propagates around the internet, and is generally unavailable.

If you need to preview your site immediately and cannot use the Plesk Site Preview feature then you can edit a file on your computer as a temporary work around.

Solution

Windows & Mac contain a file called 'hosts' that will force resolution of your domain name. Edit this file using the following procedure.

Click here for instructions for Windows or Mac instructions.

Windows 

1. Locate the hosts file on your computer

Use Windows explorer to navigate to the following directory:

Windows 95/98/Me c:\windows\hosts

Windows NT/2000 c:\winnt\system32\drivers\etc\hosts

Windows XP Home/Pro c:\windows\system32\drivers\etc\hosts

2. Open the hosts file for editing

Open your hosts file in Notepad. It should look something like this when you open it:



We will start typing on a new line at the bottom of the file. To do so, click your mouse so that the cursor is at the very end of the last line and hit <Enter> to start a new line.

Enter the following two lines of text like this example:

123.123.123.123 yourdomainname.com

123.123.123.123 www.yourdomainname.com

Important Note

You must replace the 123.123.123.123 number with the IP Address of the web server detailed in your Net24 setup email. Replace 'yourdomainname.com' and 'www.yourdomain.com' with the domain name of your web site.

Your Hosts file should looks something like this when you are done.


Close the Hosts file and save it when asked. If your browser is currently open, close it so that the changes take effect. It is not necessary to restart your computer.

Mac OS X - Snow Leopard and Lion

1. Open the Terminal.app

Either by typing Terminal in the Spotlight, or by going into Applications -> Utilities -> Terminal.

2. Open the hosts file

Open the hosts by typing on the Terminal that you have just opened:

sudo nano /private/etc/hosts

Type your user password when prompted.

3. Edit the hosts file

The hosts file contains some comments (lines starting with the # symbol), as well as some default hostname mappings (e.g. 127.0.0.1 – localhost).
Simply append your new mappings underneath the default ones. You can navigate the file using the arrow keys.

Enter the following two lines of text like this example:

123.123.123.123 yourdomainname.com

123.123.123.123 www.yourdomainname.com

Important Note

You must replace the 123.123.123.123 number with the IP Address of the web server detailed in your Net24 setup email. Replace 'yourdomainname.com' and 'www.yourdomain.com' with the domain name of your web site.

4. Save the hosts file

When you're done editing the hosts file, press control-o to save the file. 
Press enter on the filename prompt, and control-x to exit the editor.

5. Flush the local DNS cache

You'll now need to type the following command into the terminal to flush your local DNS cache

dscacheutil -flushcache

You can now preview your web site in your browser!



]]>
Fri, 30 Jul 2010 04:38:15 +1200
Password protecting directories http://www.net24.co.nz/kb/article/AA-00175 Overview

It may be necessary to password protect a directory or folder on your web site to prevent general public access or to prevent public download of Access databases stored within a folder.

You can easily password protect a directory using the Plesk Server Administrator following the instructions below:

Password Protecting a Directory for Unix Hosting Accounts

  1. Login to the Plesk Server Administrator.
  2. Select the domain name you wish to setup password protected directories for.
  3. Click on the Protected Directories button.
  4. Click Add New Directory button.
  5. Specify the path to the directory that you wish to password protect.
    This can be any directory existing in the site, for example: /admin. If the directory that you would like to protect has not yet been created, specify the path and the directory name and Plesk will create it for you.
  6. Leave the default Directory Location values set to Non-SSL and SSL.
  7. In the Header Text box, type a resource description or a welcoming message that your users will see when they visit the protected area.
  8. Click OK. The directory you specified will be protected.
  9. To add authorised users, click Add New User.
  10. Specify the login name and password that will be used for accessing the protected area. The password should be from 5 to 14 characters in length. Click OK.
  11. To add more authorised users for this protected resource, repeat the steps 9 and 10.

Password Protecting a Directory for Windows Hosting Accounts

  1. Login to the Plesk Server Administrator.
  2. Select the domain name you wish to setup password protected directories for.
  3. Click on the Protected URLs button.
  4. Click Add New Directory button.
  5. Specify the path to the directory that you wish to password protect.
  6. This can be any directory existing in the site, for example: /admin.
  7. In the Realm access text box, type a resource description or a welcoming message that your users will see when they visit the protected area.
  8. Click OK. The directory you specified will be protected.
  9. To add authorised users, click Add New User.
  10. Specify the login name and password that will be used for accessing the protected area. The password should be from 5 to 14 characters in length. Click OK.
  11. To add more authorised users for this protected resource, repeat the steps 9 and 10.

]]>
Fri, 30 Jul 2010 03:47:18 +1200
Joomla Search-Engine-Friendly URLS display an unformatted page http://www.net24.co.nz/kb/article/AA-00173 Issue

When Search Engine Friendly URLs are enabled in Joomla, the pages lose their formatting and CSS styles.

Solution

This is most likely caused by an incomplete mod_rewrite configuration.

Follow the steps detailed in the following Joomla article. Take particular note of the requirement to rename htaccess.txt to .htaccess in your /httpdocs directory.

http://docs.joomla.org/How_do_you_implement_Search_Engine_Friendly_URLs_%28SEF%29%3F


]]>
Fri, 30 Jul 2010 03:30:01 +1200
How to enable JavaScript http://www.net24.co.nz/kb/article/AA-00172 Overview

Many Net24 applications take advantage of JavaScript to provide you, the user, with a better interface; this requires JavaScript to be enabled within your browser. The browser specific instructions below will walk you through the process:

Internet Explorer (6, 7, 8)

  1. Select 'Tools' from the top menu.
  2. Choose 'Internet Options'.
  3. Click on the 'Security' tab.
  4. Click on 'Custom Level'.
  5. Scroll down until you see the section labeled 'Scripting'.
  6. Under 'Active Scripting' select 'Enable' and click OK.
  7. Reload the page to access the Net24 Application using Javascript.

Mozilla Firefox (1.5+ Windows)

  1. Select 'Tools' from the top menu.
  2. Choose 'Preferences'.
  3. Click on the 'Content' tab.
  4. Select the 'Enable JavaScript' checkbox and click OK.
  5. Reload the page to access the Net24 Application using Javascript.

Mozilla Firefox (1.5+ Apple)

  1. Select 'Firefox' from the top menu.
  2. Choose 'Preferences'.
  3. Click on the 'Content' tab.
  4. Select the 'Enable JavaScript' checkbox and close the window.
  5. Reload the page to access the Net24 Application using Javascript.

Mozilla Firefox (1.5+ Linux)

  1. Select 'Edit' from the top menu.
  2. Choose 'Preferences'.
  3. Click on the 'Content' tab.
  4. Select the 'Enable JavaScript' checkbox and click CLOSE.
  5. Reload the page to access the Net24 Application using Javascript.

Apple Safari (1.0+)

  1. Select 'Safari' from the top menu.
  2. Choose 'Preferences'
  3. Choose 'Security'.
  4. Select the 'Enable JavaScript' checkbox.
  5. Reload the page to access the Net24 Application using Javascript.

Opera (8.0+)

  1. Select 'Tools' from the top menu.
  2. Choose 'Preferences'.
  3. Click on the 'Advanced' tab.
  4. Select 'Content' from the left hand list.
  5. Select the 'Enable JavaScript' checkbox and click OK.
  6. Reload the page to access the Net24 Application using Javascript.


Still Experiencing Problems?

If you are still experiencing JavaScript related problems after enabling JavaScript within your browser, then the problem may be with a personal firewall or security software installed on your computer. Please check the troubleshooting documentation provided with these products.



]]>
Fri, 30 Jul 2010 03:24:58 +1200
How to enable directory write access to the IIS Worker Process http://www.net24.co.nz/kb/article/AA-00171

Issue

My application needs to write files to a directory on my site, but I am receiving an error when it tries to do this.

Solution

The default permissions on your directory structure enables read access only to your application. You can change the permissions on directories using the Plesk Server Administrator. The following steps can be used:

  1. Login to the Plesk Server Administrator.
  2. Select the domain name you wish to change the permissions on.
  3. Click on the 'Web Directories' button
  4. Next to the directory you wish to change the permission on click on the yellow padlock icon
  5. On the Access Permissions page click on the 'Plesk IIS User' and 'Plesk WP User' and allow 'Modify' access for each user.
  6. Click 'OK' to save these changes.

]]>
Fri, 30 Jul 2010 03:22:18 +1200
How to enable custom error pages in Plesk - Windows http://www.net24.co.nz/kb/article/AA-00170

Overview

Custom error pages allow you to show a customised page for all web server errors, but most commonly, 404 Not Found and 500 Internal Errors. This allows you to show a more user friendly or branded page when a page is not found or in the event of 500 Internal Errors, capture or notify the webmaster so that the errors can be corrected.

This article will show you how to enable custom error pages in Plesk under Windows. There is a different method for Unix hosted accounts, see How To Enable Custom Error Pages In Plesk - Unix

Enabling Custom Error Pages in Plesk Windows

  1. Turn on support for custom errors documents in Plesk
    1. Once logged into Plesk, click on your domain name and then click the Setup icon.
    2. Select the Custom Error Documents check box.
    3. Click OK
  2. Click the Web Directories icon.
  3. Click the Error Documents tab and click the required document in the list.
    • To use the default document provided by the web server for this error page, select Default in the Type menu.
    • To use a custom HTML or ASP document already located in the error_docs directory on a domain, select File in the Type menu and specify the file name in the Location field.
    • To use a custom HTML or ASP document located in directory other than error_docs on a domain, select URL in the Type menu and enter the path to your document in the Location field. The path should be relative to the virtual host root (that is, <vhosts>\<domain>\httpdocs).
      For example, you have created a file not_found.aspx and saved it in the my_errors directory located in the httpdocs. To use this file as an error document, the following path should be entered in the Location field: /my_errors/not_found.aspx
  4. Click OK after making your changes and your changes should take effect within a minute.
Remember

You can use both FTP and File Manager to upload your custom error document to the server. By default, all error documents are stored in the /error_docs/ directory.


]]>
Fri, 30 Jul 2010 03:19:53 +1200
How to enable custom error pages in Plesk - Unix http://www.net24.co.nz/kb/article/AA-00169 Overview

Custom error pages allow you to show a customised page for all web server errors, but most commonly, 404 Not Found and 500 Internal Errors. This allows you to show a more user friendly or branded page when a page is not found or in the event of 500 Internal Errors, capture or notify the webmaster so that the errors can be corrected.

This article will show you how to enable custom error pages in Plesk under Unix. There is a different method for Windows hosted accounts. See How To Enable Custom Error Pages In Plesk - Windows

Methods For Enabling Custom Error Pages

There are two methods for using custom error pages for Unix hosted accounts.

If you only wish to modify the default HTML error pages follow the first method using Plesk. If you wish to redirect common error pages to a PHP page you will need to use the second method which uses a .htaccess file.

Enabling Custom Error Pages in Plesk - Unix

  1. Turn on support for custom errors documents in Plesk
    1. Once logged into Plesk, click on your domain name and then click the Setup icon.
    2. Select the Custom Error Documents check box.
    3. Click OK
  2. Login via FTP and edit the custom HTML error pages within the /error_docs directory
Remember

You can use both FTP and File Manager to upload your custom error document to the server. By default, all error documents are stored in the /error_docs/ directory.


Enabling Custom Error Pages With a .htaccess File

Create a .htaccess file with a text editor and for each error you want to redirect, add the following directive to the .htaccess file:

ErrorDocument 000 /path/to/file
 

where 000 is the error number e.g. 400, 404, 500) and /path/to/file is the location of your new error document. For example, if you have created an error page at http://www.example.com/errors/404.php then set the path as /errors/404.php

Example:

ErrorDocument 404 /errors/404.php
 

Do this for each custom error document, example:

ErrorDocument 400 /errors/bad-request.php
ErrorDocument 401 /errors/unauthorised.php
ErrorDocument 403 /errors/forbidden.php
 

Save and upload the .htaccess file to the document root of your site or to any folders where you need to change the default document that is loaded when the folder is accessed.


]]>
Fri, 30 Jul 2010 03:13:28 +1200
Exporting and importing a MySQL database http://www.net24.co.nz/kb/article/AA-00168 If you wish to move your MySQL database from one server to another, you can export and then import the tables and contents of your database using phpMyAdmin.

Is your database large?

If you have a very large database sometimes the backup process can time out or fail within phpMyAdmin. The work around to this is to use a simple PHP script, uploaded to your home directory to run a mysqldump command. If you use the process below and the backup times out, here's how to perform a backup using PHP: How to perform a MySQL dump with PHP

Exporting a MySQL Database

  1. Firstly, manage your database with phpMyAdmin by logging into Plesk and clicking on the Databases icon. Click on your database, and then the DB WebAdmin icon.
  2. Once phpMyAdmin has loaded (if it hasn't, check to make sure you allow pop-ups) click on your database in the left column.


  3. Click on the Export tab


  4. Select the tables that you wish to export. In the example below, we have selected all tables, table1, table2 and table3.


  5. Scroll to the bottom of the page, and select Save as file and click Go


  6. Save the resulting SQL dump file to a location on your computer.

Importing a MySQL Database

  1. Firstly, make sure you have created your new database in Plesk. Then manage your new database with phpMyAdmin by logging into Plesk and clicking on the Databases icon. Click on your database, and then the DB WebAdmin icon.
  2. Once phpMyAdmin has loaded (if it hasn't, check to make sure you allow pop-ups) click on your database in the left column.


  3. Click on the Import tab


  4. Browse to your saved SQL dump file, and click Go to import tables and content to the new database.


]]>
Fri, 30 Jul 2010 03:10:01 +1200
Document Roots for Windows and Unix websites http://www.net24.co.nz/kb/article/AA-00167 Using the table below you can locate the document root for your website, which may be required for the configuration of certain web applications.

Windows Shared Hosting

Plesk Server Adminstrator Version Path
All Plesk Versions
d:\vhosts\ <domain.co.nz>\httpdocs\
Legacy Windows Servers without Plesk
d:\sites\ <domain.co.nz>\

Unix Shared Hosting

Plesk Server Administrator Version Path
All Plesk Versions /usr/local/www/vhosts/<domain.co.nz>/httpdocs/


Where <domain.co.nz> is your website address without the www prefix.


]]>
Fri, 30 Jul 2010 02:56:34 +1200
Directory index files on Unix and Windows servers http://www.net24.co.nz/kb/article/AA-00166

This article lists the directory index files the web servers are configured to serve. A directory index file is the default page the server will display to the client when no page is defined in the URL.

You can have more than one index file in each directory; the server will decide which index file to display based on the order listed below.

Unix Shared Hosting Servers

Index files and order for Unix shared web hosting servers.

Case Sensitive Note

As with all files on Unix operating systems, the index files are case sensitive and must be all lower case.


Order Index File Name
1 at_domains_index.html
2 index.html
3 index.html.var
4 index.shtml
5 index.cfm
6 index.php
7 index.htm


Windows Shared Hosting Servers

Index files and order for Windows shared web hosting servers.

Order Index File Name
1 at_domains_index.html
2 index.html
3 index.htm
4 index.cfm
5 index.shtml
6 index.shtm
7 index.stm
8 index.php
9 index.php3
10 index.asp
11 index.aspx
12 default.htm
13 default.asp
14 default.aspx


]]>
Fri, 30 Jul 2010 02:54:23 +1200
Choosing and protecting passwords http://www.net24.co.nz/kb/article/AA-00165 Passwords are a common form of authentication and are often the only barrier between a user and your personal information. There are several programs attackers can use to help guess or "crack" passwords, but by choosing good passwords and keeping them confidential, you can make it more difficult for an unauthorized person to access your information.

Why do you need a password?

Think about the number of personal identification numbers (PINs), passwords, or passphrases you use every day: getting money from the ATM or using your debit card in a store, logging on to your computer or email, signing in to an online bank account or shopping cart...the list seems to just keep getting longer. Keeping track of all of the number, letter, and word combinations may be frustrating at times, and maybe you've wondered if all of the fuss is worth it. After all, what attacker cares about your personal email account, right? Or why would someone bother with your practically empty bank account when there are others with much more money? Often, an attack is not specifically about your account but about using the access to your information to launch a larger attack.

One of the best ways to protect information or physical property is to ensure that only authorized people have access to it. Verifying that someone is the person they claim to be is the next step, and this authentication process is even more important, and more difficult, in the cyber world.

Passwords are the most common means of authentication, but if you don't choose good passwords or keep them confidential, they're almost as ineffective as not having any password at all. Many systems and services have been successfully broken into due to the use of insecure and inadequate
passwords, and some viruses and worms have exploited systems by guessing weak passwords.

How do you choose a good password?

Most people use passwords that are based on personal information and are easy to remember. However, that also makes it easier for an attacker to guess or "crack" them. Consider a four-digit PIN number. Is yours a combination of the month, day, or year of your birthday? Or your address or phone number? Think about how easily it is to find this information out about somebody. What about your email password—is it a word that can be found in the dictionary? If so, it may be susceptible to "dictionary" attacks, which attempt to guess passwords based on words in the dictionary.

Although intentionally misspelling a word ("daytt" instead of "date") may offer some protection against dictionary attacks, an even better method is to rely on a series of words and use memory techniques, or mnemonics, to help you remember how to decode it. For example, instead of the password "hoops," use "IlTpbb" for "I like To play basketball." Using both lowercase and capital letters adds another layer of obscurity. Your best defense, though, is to use a combination of numbers, special characters, and both lowercase and capital letters. Change the same example we used above to "Il!2pBb." and see how much more complicated it has become just by adding numbers and special characters.

Longer passwords are more secure than shorter ones because there are more characters to guess, so consider using passphrases when you can. For example, "This passwd is 4 my email!" would be a strong password because it has many characters and includes lowercase and capital letters, numbers, and special characters. You may need to try different variations of a passphrase—many applications limit the length of passwords, and some do not accept spaces. Avoid common phrases, famous quotations, and song lyrics.

Don't assume that now that you've developed a strong password you should use it for every system or program you log into. If an attacker does guess it, he would have access to all of your accounts. You should use these techniques to develop unique passwords for each of your accounts.

Here is a review of tactics to use when choosing a password:

  • Don't use passwords that are based on personal information that can be easily accessed or guessed.
  • Don't use words that can be found in any dictionary of any language.
  • Develop a mnemonic for remembering complex passwords.
  • Use both lowercase and capital letters.
  • Use a combination of letters, numbers, and special characters.
  • Use passphrases when you can.
  • Use different passwords on different systems.

How can you protect your password?

Now that you've chosen a password that's difficult to guess, you have to make sure not to leave it someplace for people to find. Writing it down and leaving it in your desk, next to your computer, or, worse, taped to your computer, is just making it easy for someone who has physical access to your office. Don't tell anyone your passwords, and watch for attackers trying to trick you through phone calls or email messages requesting that you reveal your passwords.

Many programs offer the option of "remembering" your password, but these programs have varying degrees of security protecting that information. Some programs, such as email clients, store the information in clear text in a file on your computer. This means that anyone with access to your computer can discover all of your passwords and can gain access to your information. For this reason, always remember to log out when you are using a public computer (at the library, an internet cafe, or even a shared computer at your office). Other programs, such as Apple's Keychain and Palm's Secure Desktop, use strong encryption to protect the information. These types of programs may be viable options for managing your passwords if you find you have too many to remember.

There's no guarantee that these techniques will prevent an attacker from learning your password, but they will make it more difficult.

Provided by: US-CERT http://www.us-cert.gov/
Authors: Mindi McDowell, Jason Rafail, Shawn Hernan

]]>
Fri, 30 Jul 2010 02:48:33 +1200
Changing the Default Document or Directory Index file http://www.net24.co.nz/kb/article/AA-00164 A directory index file is the default page the server will display to the browser when no page is defined in the URL.

You can have more than one index file in each directory; the server will decide which index file to display based on the order listed in the default server configuration. You can find the order listed in this article here.

In some cases, your application may use a default page that is not already pre-configured in the default document list on the server. If this is the case, then you will need to tell the server what page is your index page using the following methods:

Specifying the default page for Unix hosting

  1. Create a .htaccess file with a text editor and the following lines to specify the default page:
    DirectoryIndex filename.html
  2. Save and upload the .htaccess file to the document root of your site or to any folders where you need to change the default document that is loaded when the folder is accessed.

Specifying the default page for Windows hosting

  1. Login to the Plesk Server Administrator.
  2. Select the domain name you wish to modify
  3. Click on the Web Directories button.
  4. Click on the Preferences icon
  5. Type in your default document filename into the 'Default documents search order' box and click Add
  6. Find the added document a the bottom of the list and click the Up button to move your document to the highest preference in the list.
  7. Click OK to save changes

]]>
Fri, 30 Jul 2010 02:47:02 +1200
Causes of 500 Internal Server Error http://www.net24.co.nz/kb/article/AA-00163

Issue

When you try to access your website your receive the following error message:

Internal Server Error
The server encountered an internal error or misconfiguration and was
unable to complete your request.

Please contact the server administrator to inform of the time the error
occurred and of anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Causes

There are a number of issues which can cause this problem.

  1. World writeable access to httpdocs directory while running PHP
    Under Net24's PHP hosting environment, PHP does not run as an Apache module, but instead runs under suexec mod_fcgid. For security suexec mod_fcgid does not permit the document root to be world writable. If your httpdocs permissions show the following...
    drwxrwxrwx  10 user  group  512 Oct  1 11:54 httpdocs
    

    ..you then have world writable permission set on the directory. The permissions should be as per below (chmod 750):

    drwxr-x---  10 user  group  512 Oct  1 11:54 httpdocs
    

    The permissions can be changed using the Plesk File Manager.

    Also check that the .phpwrapper file within the httpdocs directory has the correct permissions applied.
  2.  

  3. Disk quota exceeded
    If there is not enough space available under your account, applications that depend on Fast-CGI, such as PHP, may cause this error. A small amount of free space is required for Fast-CGI to initalise. To resolve this issue remove some files under your account or contact Net24 Customer Service to increase your disk quota.

]]>
Fri, 30 Jul 2010 02:45:08 +1200
Can this application be hosted by Net24? http://www.net24.co.nz/kb/article/AA-00162 There are many applications that can be run under Net24's shared hosting plans. When looking at whether an application can be hosted you will need to check the system requirements published by the application's developer and check whether these are met by our hosting plans.

Common applications can include content management systems like Joomla, blogging applications like WordPress, and Shopping Carts such as osCommerce.

With the help of our customers we have compiled a list of common applications that are known to be supported by our plans and also those that have special setup considerations. In some cases we have noted applications that are not supported because of a known issue that prevents them from running under our plans.

Known Supported Applications

Application not listed below?

This list is by no means complete, and if your application is not listed here it does not necessarily mean that it isn't supported. If you successfully host a common application that is not in our list, please let us know and we will gladly add it for the benefit of other customers. Let us know


Content Management Systems

Shopping Carts

Blogging

Forums


]]>
Fri, 30 Jul 2010 02:43:05 +1200
Adding Additional MIME Types http://www.net24.co.nz/kb/article/AA-00160 Overview

Whenever content is returned from a web server it includes a MIME Content Type header, which provides information to the client about the type of data which is being returned. Using this header the client is able to determine the best way to handle the content, which may include opening a helper application. For files returned directly from the server the MIME type is defined by the extension of the file.

The following table shows some MIME type examples:

Type / Subtype File Extension
application/msword doc
application/pdf pdf
video/mpeg mpeg
video/x-flv flv
audio/mpeg mp3
image/jpeg jpg
text/html html

Net24 has a predefined server wide list of common MIME types configured on Windows IIS and Unix Apache servers. However if you have files on your site for which a MIME type is not defined, the content of these files may not be displayed correctly by the client.

The predefined list can not be modified, but additional MIME types can be easily added to individual site following the instructions below:

Adding MIME Types Under Unix Hosting Accounts

  1. Determine the MIME type required for the file. A list of registered MIME types and extensions can be found at: http://www.iana.org/assignments/media-types/
  2. Create a .htaccess file with a text editor and add each MIME type using the Apache AddType directive.
    Example:
    AddType application/x-shockwave-flash swf
    

    The AddType tells the server to add a new MIME type. The application/x-shockwave-flash is the actual MIME type and the swf is the extension of the file. You can add as many MIME types as required, simply repeat the line for each MIME type.

  3. Save and upload the .htaccess file to the document root of your site; the new MIME types will active immediately.

Adding MIME Types Under Windows Hosting Accounts

  1. Determine the MIME type required for the file. A list of registered MIME types and extensions can be found at: http://www.iana.org/assignments/media-types/
  2. Login to the Plesk Server Administrator.
  3. Select the domain name you wish to add the MIME type for.
  4. Click on the Web Directories button.
  5. Select the Mime Types tab and enter the new file extension and MIME type and click OK.

]]>
Fri, 30 Jul 2010 02:36:52 +1200
WS FTP - Managing your files http://www.net24.co.nz/kb/article/AA-00159

]]>
Fri, 30 Jul 2010 02:26:42 +1200
WS FTP - Transferring files http://www.net24.co.nz/kb/article/AA-00158
]]>
Fri, 30 Jul 2010 02:26:05 +1200
WS FTP - Configuring your site http://www.net24.co.nz/kb/article/AA-00156

]]>
Fri, 30 Jul 2010 02:24:58 +1200
Smart FTP - Managing your files http://www.net24.co.nz/kb/article/AA-00155

]]>
Fri, 30 Jul 2010 02:22:07 +1200
Smart FTP - Transferring files http://www.net24.co.nz/kb/article/AA-00154

]]>
Fri, 30 Jul 2010 02:19:53 +1200
Smart FTP - Configuring your site http://www.net24.co.nz/kb/article/AA-00153
]]>
Fri, 30 Jul 2010 02:13:25 +1200
Filezilla - Managing your files http://www.net24.co.nz/kb/article/AA-00152

]]>
Fri, 30 Jul 2010 02:11:49 +1200
Filezilla - Transferring files http://www.net24.co.nz/kb/article/AA-00151

]]>
Fri, 30 Jul 2010 02:10:22 +1200
Filezilla - Configuring your site http://www.net24.co.nz/kb/article/AA-00150

]]>
Fri, 30 Jul 2010 02:08:57 +1200
CuteFTP - Managing your files http://www.net24.co.nz/kb/article/AA-00149

]]>
Fri, 30 Jul 2010 02:07:51 +1200
CuteFTP - Transferring files http://www.net24.co.nz/kb/article/AA-00148

]]>
Fri, 30 Jul 2010 02:04:11 +1200
CuteFTP - Configuring your site http://www.net24.co.nz/kb/article/AA-00147

]]>
Fri, 30 Jul 2010 02:02:17 +1200
CuteFTP - Setting your preferences http://www.net24.co.nz/kb/article/AA-00146

]]>
Fri, 30 Jul 2010 02:00:49 +1200
Direct Payment Solutions Overview http://www.net24.co.nz/kb/article/AA-00145 Download a PDF overview of the Net24 DPS Payment Gateway Service, including available plans and prices.

]]>
Fri, 30 Jul 2010 01:53:48 +1200
How to rebuild Geom mirror in FreeBSD http://www.net24.co.nz/kb/article/AA-00102 This article discusses how to rebuild a Geom mirror after a faulty drive has been replaced.

Root Privileges Required

All commands listed in this article need to be executed with root privileges.

Step 1 - Identify Replaced Drive

  1. Log in to your server and as root run the following command:
    # gmirror list
  2. This will produce output similar to the following
    Geom name: gm0
    State: DEGRADED
    Components: 2
    Balance: round-robin
    Slice: 4096
    Flags: NONE
    GenID: 0
    SyncID: 3
    ID: 3594034660
    Providers:
    1. Name: mirror/gm0
       Mediasize: 159999999488 (149G)
       Sectorsize: 512
       Mode: r2w2e5
    Consumers:
    1. Name: ad4
       Mediasize: 160000000000 (149G)
       Sectorsize: 512
       Mode: r1w1e1
       State: ACTIVE
       Priority: 0
       Flags: DIRTY
       GenID: 0
       SyncID: 3
       ID: 4064102945

    In this example we can see the status of the mirror is degraded and the only active drive is 'ad4'.

  3. To find out which drives are available and the corresponding device name run the atacontrol list command.
    # atacontrol list

    This will produce a list of drives with device names which are connected to your server.

    ATA channel 2:
        Master:  ad4 <WDC WD1602ABKS-18N8A0/02.03B04> SATA revision 2.x
        Slave:       no device present
    ATA channel 3:
        Master:  ad6 <WDC WD2502ABYS-02B7A0/02.03B03> SATA revision 2.x
        Slave:       no device present

    From this we can see that device '*ad6*' is the device name of the new drive we can use to rebuild the mirror. You should already be aware of the device name from alerts generated by your server when the drive failed; the replacement drive will show up with the same device name.

Step 2 - Rebuild Mirror

  1. Now that we have verified device name of the new drive we can easily rebuild the array using the following commands:
    # gmirror forget gm0
    # gmirror insert gm0 <device>

    Where <device> is the device name of the new drive we determined above. In the example above <device> would be 'ad6'.

  2. To verify the drive has been added to the mirror and the mirror is being rebuild run the '*gmirror list'* command.
    # gmirror list
    Geom name: gm0
    State: DEGRADED
    Components: 2
    Balance: round-robin
    Slice: 4096
    Flags: NONE
    GenID: 0
    SyncID: 3
    ID: 3594034660
    Providers:
    1. Name: mirror/gm0
       Mediasize: 159999999488 (149G)
       Sectorsize: 512
       Mode: r3w2e5
    Consumers:
    1. Name: ad4
       Mediasize: 160000000000 (149G)
       Sectorsize: 512
       Mode: r1w1e1
       State: ACTIVE
       Priority: 0
       Flags: NONE
       GenID: 0
       SyncID: 3
       ID: 4064102945
    2. Name: ad6
       Mediasize: 251059544064 (234G)
       Sectorsize: 512
       Mode: r1w1e1
       State: SYNCHRONIZING
       Priority: 0
       Flags: DIRTY, SYNCHRONIZING
       GenID: 0
       SyncID: 3
       Synchronized: 3%
       ID: 2247886846

    We can see here the new drive has been added and the mirror is being rebuilt (3% complete). Rebuild times can take anywhere from 20 minutes to a few hours depending on the size of the drives and the amount of application I/O on your system.

    The first few lines show that overall state of the mirror, once the state changes from 'DEGRADED' to 'COMPLETE' the rebuild is complete.

]]>
Fri, 30 Jul 2010 01:45:38 +1200
What CreateObject functions are disabled? http://www.net24.co.nz/kb/article/AA-00143 Issue

CreateObject is enabled but the following functions of CreateObject are disabled:

  • CreateObject(.NET)
  • CreateObject(COM)
  • CreateObject(CORBA)
  • CreateObject(Java)
  • CreateObject(WebService)

Reason

These particular CreateObject functions are disabled because they allow a user to break out of the sandbox security which is imposed by ColdFusion. This is possible because ColdFusion is a java application and you can access underlying API and classes with CreateObject (such as java.io.file) which is not protected by sandbox security.

For this reason, we won't enable these specific CreateObject functions for our shared ColdFusion plans. Enabling the above CreateObject functions would give customers the ability to read and write files from other customer's directories, make changes to the server settings and remove all the security that ColdFusion sandbox security would normally enforce.


]]>
Fri, 30 Jul 2010 01:43:54 +1200
What CF tags are disabled under ColdFusion hosting? http://www.net24.co.nz/kb/article/AA-00142 The following CF Tags are disabled for security reasons under our ColdFusion shared hosting plans:

  • CFExecute
  • CFObject
  • CFObjectCache
  • CFRegistry
  • CFSchedule
  • CFReport - Unsupported due to configuration issues.
  • CFDump - Unsupported due to CreateObject dependency.

The following CF Functions are disabled for security reasons under our ColdFusion shared hosting plans:

  • CreateObject(.NET)
  • CreateObject(COM)
  • CreateObject(CORBA)
  • CreateObject(Java)
  • CreateObject(WebService)
  • GetProfileString
  • SetProfileString
]]>
Fri, 30 Jul 2010 01:43:02 +1200
Timeout errors when using CFFTP tag http://www.net24.co.nz/kb/article/AA-00141 Issue

When creating an FTP session with CFFTP tag you receive the following error:

An error occurred during the FTP putfile operation. Error: putFile operation exceeded TIMEOUT. java.io.IOException: putFile operation exceeded TIMEOUT

Cause

The default timeout for FTP commands is 30 seconds.

Solution

Increase the timeout by adding the value, timeout="valueinseconds", to the CFFTP "open" command.

Here is an example:

<cfftp action="open" connection="objConnection3" timeout="300" attributeCollection="#objFTPProperties#" />

Note that you will also need to add the same value, requesttimeout="valueinseconds" to the CFSETTING tag.

<cfsetting requesttimeout="300" />

]]>
Fri, 30 Jul 2010 01:42:05 +1200
Syntax Error in INSERT INTO or SELECT statement http://www.net24.co.nz/kb/article/AA-00140 Issue

You receive a syntax error when performing an INSERT or SELECT, but the syntax appears correct. An example of the error you may receive is shown below:

Error Occurred While Processing Request
Error Executing Database Query.
Syntax error in INSERT INTO statement.
 
The error occurred in D:\vhosts\domain.co.nz\httpdocs\insertdb.cfm: line 97

95 :       <cfelse>
96 :       NULL
97 :   </cfif>
98 :   )
99 :   </cfquery>

SQL               INSERT INTO table (category, type, address , password) VALUES 
                  ( 'Health and Fitness' , 'Company Name', 'Address', 'password123')

DATASOURCE        datasource
VENDORERRORCODE   3092

Cause

ColdFusion has a list of reserved keywords, which are typically part of the SQL language and are not normally used for names of columns or tables. In the example error above, password is a reserved keyword, so the insert fails. If you use these reserved keywords you must escape them. You may not have encountered this issue with earlier versions of ColdFusion, which allowed the use of some non-escaped reserved keywords.

A list of reserved keywords can be found at:
http://livedocs.adobe.com/coldfusion/7/htmldocs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=ColdFusion_Documentation&file=00000316.htm

Solution

Escape reserved keyword for a column name or table name by enclosing them in square brackets.

Example:

INSERT INTO table (category, type, address, [password]) VALUES 
                  ( 'Health and Fitness', 'Company Name', 'Address', 'password123')

However a better solution is to avoid using reserved keywords, by using a naming convention for tables and columns which avoid conflicts.

The following link discusses naming conventions for database objects:
http://www.devx.com/dbzone/Article/10866


]]>
Fri, 30 Jul 2010 01:40:50 +1200
Permission Denied error when using CFFTP tag http://www.net24.co.nz/kb/article/AA-00139 Issue

When using the CFFTP tag, you receive the error:

"Security: The requested template has been denied access to localhost:1024" occurs.

Cause

FTP supports two connection modes, Active and Passive. Net24's shared hosting servers support passive FTP connections only so an error will result if you attempt to connect with Active.

Solution

Enable Passive mode within every use of the CFFTP tag to force ColdFusion to connect with Passive.

Here is an example:

<cfftp action="open" username="anonymous" connection="My_query" password="myemail" server="remote" stopOnError="yes" passive="yes"> 
<cfftp action="getfile" stopon remote local connection="My_query" username="anonymous" password="myemail" passive="yes">
]]>
Fri, 30 Jul 2010 01:39:10 +1200
How do I add a DSN to the ColdFusion Administrator? http://www.net24.co.nz/kb/article/AA-00138 Issue

You have uploaded an Access Database or created a MySQL Database for your ColdFusion hosting account and need to register a DSN in the ColdFusion Administrator to access the database.

Solution

The DSN will need to be created by Net24 in the ColdFusion Administrator. Contact customer service at service@net24.co.nz with the name, location of your database (Access DB) and username and password if applicable and we will provision a DSN.


]]>
Fri, 30 Jul 2010 01:37:48 +1200
WCF web service results in an error "This collection already contains an address with scheme http." http://www.net24.co.nz/kb/article/AA-00137 Issue

When attempting to run a .NET web service based on WCF in .NET 3.5 you receive an error such as:

This collection already contains an address with scheme http.
There can be at most one address per scheme in this collection.

Reason

In a shared hosting environment IIS is configured to answer for multiple hostnames. This is typically the problem that causes the error above since IIS has more than one http binding configured to answer requests for a given web site.

IIS supports specifying multiple IIS bindings per site, which results in multiple base addresses per scheme. A WCF service hosted under a site allows binding to only one baseAddress per scheme and since IIS doesn't know which one is the correct name to answer the WCF service throws an exception.

Solution

Specifying a <baseAddressPrefixFilter> in the web.config file will result in only the matching base address for that scheme to be passed through to IIS.

To apply this fix open the web.config file for the service within Visual Studio and within the <system.serviceModel> tags add the following XML:


<serviceHostingEnvironment>
<baseAddressPrefixFilters>
<add prefix="http://hostname.co.nz/wcfservice"/>
</baseAddressPrefixFilters>
</serviceHostingEnvironment>


Once these lines are added, redeploy the service and refresh the service in the browser. The error should now be gone.


]]>
Fri, 30 Jul 2010 00:59:32 +1200
Validation of viewstate MAC failed http://www.net24.co.nz/kb/article/AA-00136 Issue

You may receive following ASP.NET exception on your website:

[HttpException (0x80004005): Validation of viewstate MAC failed. If this application
is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies
the same validationKey and validation algorithm. AutoGenerate cannot be used in a
cluster.]

Cause

If you click a postback control/link while the Page hasn't loaded completely, you might get the "Validation of ViewState MAC failed" exception. In this case be sure to check following post on ASP.NET Forums where this has been discussed in depth: http://forums.asp.net/1173230/ShowPost.aspx

Because GridView using DataKeyNames requires ViewState to be encrypted. And when ViewState is encrypted, Page adds <input type="hidden" name="_VIEWSTATEENCRYPTED" id="_VIEWSTATEENCRYPTED" value="" /> field just before closing of the <form> tag. But this hidden field might not bet yet rendered to the browser with long-running pages, and if you make a postback before it "gets down", browser initiates postback without this field (in form post collection)

End result is that if this field is omitted on postback, Page doesn't "know" that viewstate is encrypted and causes the prementioned Exception. E.g Page expects to be fully-loaded before you can make a postback. A similar problem is with event validation since __EVENTVALIDATION field is also rendered on the end of the form.

Workaround

The following workaround can be used to resolve this issue. Add the following to the applications web.config:

<pages enableEventValidation="false" viewStateEncryptionMode ="Never" />
]]>
Fri, 30 Jul 2010 00:56:01 +1200
Slow or error response when using MSXML2.XMLHTTP http://www.net24.co.nz/kb/article/AA-00135 Issue

You may encounter a very slow or error response when attempting to communicate with an external site using Server.CreateObject("MSXML2.XMLHTTP").

If you encounter an error, the error may be similar to the one shown below:

msxml3.dll error '800c0008'

The download of the specified resource has failed. 

Solution

Utilise Server.CreateObject("MSXML2.ServerXMLHTTP") instead.

Cause

The specific cause is unknown, however the XMLHTTP Request object was written with a client application in mind, e.g. IE or a VB app. The client would make calls to a server or a resource remote to it and would get data back. The ServerXMLHTTP Request object was written with the server environment in mind. If you are doing these requests from from an ASP page then you should use ServerXMLHTTP. It was written with a server and/or multi-threaded environment in mind. The XMLHTTP Request object was not written or intended to be used in this manner.


]]>
Fri, 30 Jul 2010 00:53:44 +1200
How to enable parent paths http://www.net24.co.nz/kb/article/AA-00134 Issue

Your script requires parent paths or you receive the following error when using ASP.

Active Server Pages, ASP 0131
Disallowed Parent Path
The Include file '../<filename.ext>' cannot contain '..' to indicate the parent directory.
/<path>/<filename.ext>, line <number>

Cause

This error occurs because parent paths are disabled for the website or application and relative parent paths are used in include statements, as the example shows below:

<!--#include file="../<filename.ext>"-->


Solution

Parent Paths are turned off by default but can be enabled from within the Plesk Control Panel by following the steps below.

  1. Login to the Plesk Server Administrator.
  2. Select the domain name you wish to change the permissions on.
  3. Click on the 'Web Directories' icon
  4. Click the 'Preferences' icon
  5. Tick 'Allow to use parent paths' to enable parent paths


]]>
Fri, 30 Jul 2010 00:51:02 +1200
Scheduled backup jobs not running on Windows http://www.net24.co.nz/kb/article/AA-00133 Issue

On a Microsoft Windows computer the scheduled backup jobs are not running.

Solutions

To resolve this problem, please check the following:

  1. Firstly, check to make sure the Backup Set is scheduled to run on your computer. Login to the Online Backup Manager and select the Backup Set in the left hand column. In the Backup Set properties window on the right ensure the check box Run scheduled backup on this computer is ticked.

  2. Check the Online Backup Scheduler service is running. The Windows services list can be found under Control Panel > Administrative Tools > Services.
  3. Check if C:\Program Files\Online Backup Manager\home.txt contains the home directory for your backup account (e.g. C:\Documents and Settings{YourUsername}\.obm).
  4. Check if C:\Program Files\Online Backup Manager\jvm\bin\SchedulerOBM.exe exists.
  5. Check if C:\Program Files\Online Backup Manager\log\Scheduler\info.log contains the startup loading entry as shown below:
     [2007/12/12 12:42:44] OS Name=Windows XP
     [2007/12/12 12:42:44] OS Version=5.1
     [2007/12/12 12:42:44] Scheduler Version=5.0.1.3e
     [2007/12/12 12:42:44] Java Vendor=Sun Microsystems Inc. Version=1.4.2_10
     [2007/12/12 12:42:44] [info] Starting Scheduler, User:'backup-account', 
                           Home:'C:\Documents and Settings\Administrator\.obm'
    

If your system settings do not reflect the information in the above steps, please download a new installer from the Online Backup Server (You must login to download the installer) and try to re-install the OBM client.

If you have checked all the steps above and they are all correct, please send Net24 Customer Service service@net24.co.nz  the C:\Documents and Settings{YourUsername}\.obm\log\Scheduler\debug.log log file, which contains the debugging information for the scheduler.


]]>
Fri, 30 Jul 2010 00:48:15 +1200
Requesting your backup files on Hard Disk, CD or DVD http://www.net24.co.nz/kb/article/AA-00132 Issue

If your backup files are large and you find it too slow to restore all your backup files through the internet you can request for your backup files to be couriered to you on USB hard disk, CD or DVD.

Solution

Contact customer service on 0800 5000 24 or service@net24.co.nz and request the BackupSets that you would like the data for and we will arrange for the backup files to be couriered to you on portable media.

Once you have received the backup files, follow Section 6.2 (page 43) of the User's Guide for Restoring backup files from removable hard disk, CD, or DVD.

You can download the User's Guide here: http://net24.co.nz/obs_documentation.php


]]>
Fri, 30 Jul 2010 00:46:02 +1200
How do I move files from the retention area to my current area? http://www.net24.co.nz/kb/article/AA-00131 Issue

You have deleted (or moved) files and folders on your computer and now all of these files are in the retention area. You don't want to upload these again. You just want to get the files from retention and put them back into the current data area.

Solution

  1. Log in to the OBS web site http://obs.net24.net.nz with your OBM username and password.
  2. Choose File Explorer and then select the Show Jobs View.
  3. Select by clicking the files/folders from the dated job list and then press the Undelete button


]]>
Fri, 30 Jul 2010 00:44:45 +1200
How do I delete files from the retention area? http://www.net24.co.nz/kb/article/AA-00129 Issue

You may be close to your data limit or just want to remove old files from within the retention area.

Solution

  1. Log in to the OBS web site https://obs.net24.net.nz with your OBM username and password.
  2. Choose File Explorer and then select the Show Jobs View.
  3. Select by clicking on the files/folders you wish to delete from the retension area and then press the Delete button.


]]>
Fri, 30 Jul 2010 00:35:44 +1200
Backup report shows warnings about volume shadow copy http://www.net24.co.nz/kb/article/AA-00128 Issue

The backup report you receive by email, reports the backup is complete but with warnings. When you open up the attached report details file the following line appears:

Warn <Backup Date> Path "<BackupPath> \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy1\
<BackupPath>" does not exist!

Cause

This issue occurs because the Volume Shadow Copy Service is not started on your system and you have chosen to use the Volume Shadow Copy option in the Net24 Online Backup Manager client.

Solution

There are two ways to resolve this issue:

  • Disable the Volume Shadow Copy Option
    To do this go to your individual BackupSet's settings page and changing the 'Enable Volume Shadow Copy' to 'No'.

  • Enable the Volume Shadow Copy Service
    On your computer go to 'Control Panel > Administrative Tools > Services'. Locate the Volume Shadow Copy service from the list, open it, ensure the service 'Startup Type' is set to 'Automatic' and then start the service.

    The screen shot below shows how the sevice should be configured.




]]>
Fri, 30 Jul 2010 00:27:54 +1200
Unable to access database after failed restore using MyLittleBackup http://www.net24.co.nz/kb/article/AA-00127 Issue

After attempting to restore a database using the MyLittleBackup utility, the restore failed with errors and has now left your database inaccessible.

Cause

While restoring your database, the database is put into Single_User access mode which prevents access during the restore. After restore, the database is changed back to Multi_User mode. If a restore fails, the database can be left in Single_User mode preventing normal access to the database.

Why did your restore fail?

The most common reason for a database restore failing is when you have a full text catalog in your database. Remove the full text catalog before running the restore. Once the restore is complete contact customer service with the fields that require full text catalog and we will configure this for you.

Solution

Contact customer service on 0800 5000 24 or service@net24.co.nz to have your database access changed to Mutli_User mode.


]]>
Fri, 30 Jul 2010 00:24:47 +1200
MyLittleAdmin doesn't show edit row icons on some tables http://www.net24.co.nz/kb/article/AA-00126 Issue

When trying to edit some tables there is no edit/drop icons displayed.

Solution

The table needs to have a primary key defined in order to have edit/drop icons available. Create a primary key on these tables and you will then be able to edit rows.


]]>
Fri, 30 Jul 2010 00:21:56 +1200