buy tb500

Archive for May, 2011

Install Fantastico in WHM (cpanel server)

Wednesday, May 25th, 2011

You don’t need to download any files in order to install Fantastico!

Just SSH to your server and enter following commands (you may also copy/paste):

cd /usr/local/cpanel/whostmgr/docroot/cgi
wget -N http://files.betaservant.com/files/free/fantastico_whm_admin.tgz
tar -xzpf fantastico_whm_admin.tgz
rm -rf fantastico_whm_admin.tgz

NOW GO TO YOUR WHM -> Add-Ons (Plugins on v11.x or higher) -> Fantastico De Luxe WHM Admin (scroll down the left menu).

Follow the on screen instructions.

If you get a Source Guardian error when you go to Fantastico for the first time, just run this command:

chmod -R 0755 /usr/local/cpanel/3rdparty/etc/ixed

fter the installation is complete, click on “Settings” and go through the settings. While some settings are not important, some other (marked below with an *) are essential for a proper functioning of Fantastico installations.
Language: Select the language for the admin backend AND default language for users without a language selected.
Email notifications: Enter an email address in order to receive notifications when users perform installations using Fantastico.
Master files settings (*): If you are not an advanced user who modifies the master files, leave this to “Remove”. Change this only if you know what you are doing
PHPsuexec (*): VERY ESSENTIAL!!! Changing this value will not install or de-install phpsuexec for you. It will only tell Fantastico that you have phpsuexec installed or not installed on your server. Change to “installed” if you perform installations which produce an “Internal Server Error”. Notice: Changes will not apply to existing installations! You have to re-install in order to have working installations.
Path to netPBM: Enter the full path to the netPBM binaries in order to enable Gallery installations. As long as this field has no value, your users will not be able to install Gallery.
Select Fantastico licensing and files server: If the Fantastico pages take long to load switch to the server that works best for you. Fantastico will auto-switch if connections time out.
Update preference: Select latest version (sometimes experimental) or stable version (best working).

If your users don’t see a Fantastico link in their CPanel: Go to WHM and edit the “default” Features List. Activate Fantastico.

References

http://www.crucialp.com/resources/tutorials/dedicated-server/how-to-install-installing-fantastico-cpanel-whm.php

Custom wordpress permalinks in windows server 2008

Wednesday, May 25th, 2011

Use the following instructions to create pretty permalinks for your blog posts.

To enable pretty permalinks in Word Press:

  1. Log on to WordPress with Administrator user rights.
  2. In WordPress, click the Options tab.
  3. On the Options page, click the Permalinks subtab.
    This will take you to the page where you can customize how WordPress generates permalinks for blog posts.
  4. On the Permalinks page, select Custom, specify below and enter “/%year%/%monthnum%/%day%/%postname%/” in the Custom structure text box.
  5. Click Update Permalink Structure.

All the blog post links will have URLs that follow the format that you have specified, but if you click any one of those links the Web server will return a 404 – File Not Found error. This is because WordPress relies on a URL rewriting capability within the server to rewrite requests that have “pretty permalinks” to an Index.php file. In the next section, you will create a rule that will provide this capability.

Creating a Rewrite Rule

Open the Web.config file that is located in the same directory where the WordPress files are installed, and paste the following XML section into the system.webServer element:

<rewrite>
<rules>
<rule name=”Main Rule” stopProcessing=”true”>
<match url=”.*” />
<conditions logicalGrouping=”MatchAll”>
<add input=”{REQUEST_FILENAME}” matchType=”IsFile” negate=”true” />
<add input=”{REQUEST_FILENAME}” matchType=”IsDirectory” negate=”true” />
</conditions>
<action type=”Rewrite” url=”index.php” />
</rule>
</rules>
</rewrite>

This rule will try to match any requested URL. If the URL does not correspond to a file or a folder on the file system, it will rewrite the URL to the Index.php file. At that point, WordPress will determine which content to serve based on the REQUEST_URI server variable that contains the original URL before it was modified by this rule.

Testing the Rewrite Rule

After you save the rewrite rule to the Web.config file, open a Web browser and click any one of the permalinks in your WordPress blog. You should see the correct content returned by the Web server for each permalink.

Summary

In this walkthrough you learned how to use the URL Rewrite module to enable “pretty permalinks” in the WordPress blog engine. WordPress is just one example of the many popular PHP applications that can take advantage of the URL Rewrite module in IIS 7, a feature that enables user-friendly and search engine-friendly URLs.

References

http://learn.iis.net/page.aspx/466/enabling-pretty-permalinks-in-wordpress/

How do I create a cron job?

Tuesday, May 24th, 2011

A cron job (run by the cron daemon, or cron service) is a request for the server to run a particular command and/or program via the command line and set points during the hour, day, week, month or year.

The name is derived from Greek chronos (χρόνος), meaning time.

At the moment, there are two ways you can add, edit or delete cron jobs on our servers. The first is the easiest and that’s using the Plesk interface. The second is more complex, using the crontab program, but if you’re used to using the SSH console and have knowledge of VIM, it’s available.

However, if you’re not familiar with the way cronjobs are configured, please read the following section which will explain the syntax and how it’s works.

What does a cron line and how does it work?

A cronjob line if a very simple line with six parts. The first five set the day/time the job is/are run, while the last part is the command to be run. For example:

0 * * * * php /var/www/vhosts/example.com/httpdocs/cron.php

will run the php command-line interpreter, processing the file cron.php (on the website for example.com) at the start of every hour.

The date/time fields have the following meaning:

# +------------ Minute (0 - 59)
# | +---------- Hour (0 - 23)
# | | +-------- Day of the Month (1 - 31)
# | | | +------ Month (1 - 12)
# | | | | +---- Day of the Week (0 - 7) (Sunday is 0 or 7)
# | | | | |
# * * * * * command

Therefore, the option 0 * * * * (from the above example) means ‘on the zeroth minute of any hour on any day of the month, in any month, on any day in the week, run this command‘.

Although can you add a single value, the power of cron comes in it’s ability to allow a number of different syntax options for specifying different values. The following examples will be based on the minutes field, but they can be used in any of the five fields to specific month, day, etc.:

0          - Run it when the minute is zero
*          - Run it on any value (i.e. every minute)
0,15,30,45 - Run it when the minute is 0, 15, 30 or 45 (i.e. every 15 min)
*/15       - Same as above - run it when the minute is divisible by 15
10-15      - Run it every minute between 10 and 15 minutes
30-59/5    - Run it every fifth minute of 30 (i.e. 30, 35, 40, ...)

However, taking the last example, the divisor is not against the minute of the hour, but against the minute within the period selected, therefore while 30-59/5 is when the minute can be divided by 5 between 30 and 59, the option 3-58/5 will not enact on 5, 10, etc., but on 3, 8, 13, etc.

Also, where as the first four fields must match to run the command (i.e. when the minute, hour, day of the month and month match), if the fifth field (day of the week) is also specified, the command will run when either the day of the month OR day of the week match.

To finish off, here are a number of complete examples:

*/15    *     *  *  *   - Run every 15 minutes
3-58/5  *     *  *  *   - Run every 5 minutes on the 3rd and 8th minute
0       */2   *  *  *   - Run every 2 hours, on the hour
25      8,17  *  *  *   - Run at 08:25 and 17:25
0       6     *  *  1   - Run at 06:00 every Monday
30      7     *  1  *   - Run at 07:30 on the first day of the month
0       0     1  *  5   - Run at midnight on the first of the month OR a Friday
*/30    9-17  *  *  1-5 - Run every 30 minutes between 9 to 5, Monday to Friday

Editing your crontab with Plesk

To add a cron job in Plesk:

  • Log onto Plesk using your username and password.
  • From your list of domains, click on the domain you would like to add the cronjob to.
  • Click on Crontab.
  • If you have multiple users on this domain (i.e. you have setup different FTP accounts for sub-domains or web users), from the drop-down select the username you want to create the cronjob for, and then click Set.
  • Click on Add New Task.
  • For each of the first five fields, enter the value as it would be for the cron line (i.e. the date/time fields). All fields are required, so if you don’t have a specific value in that field, enter *.
  • Finally, enter the full command into the Command field.
  • Click OK to save or Cancel to return.
  • If you return back to the page with any errors, please correct the errors and click OK again.

By default, the sever will send any error messages or output from the cronjobs to username@server, e.g. mysite33@gamma.jabservers.co.uk, which will always come to us. If you want to see the output from your cronjob, or notices if it doesn’t run (for whatever reason), you’ll need to change the address the e-mail is set to.

To do this, goto the crontab page and select the user running the crontab, click on Set, and then change Send Crontab messages to address to the e-mail address you want them sent to. Click Set again to commit the change.

Editing your Crontab via SSH

The main limitation with this option is that you can only edit the crontab for the main domain, as you can only log on via SSH using the user for the master FTP account. If you need to change the crontab for a web user or sub-domain, you will have to use the Plesk interface.

To add a cron job via SSH:

Although we will take you through the steps of using VIM on the server, knowledge of VIM is important for using the crontab program – if you do not know how to use VIM, please see how to add a cronjob using Plesk above.

  • Log onto SSH using your chosen program and the username/password for the domain.
  • Run the command ‘crontab -e‘ to edit the crontab.
  • Move to the end of the file, press i to enter Insertion mode, create a new line and then enter the cron line.
  • Press Esc and then enter :wq to write (save) the changes and quit the program.
  • If there is an error in the line, you will be notified and asked if you want to re-edit your changes.
  • If there is no error, you will see the message ‘crontab: installing new crontab‘.

Again, like with Plesk, any errors, notices or output from the cronjob will go to username@server (e.g. mysite33@gamma.jabservers.co.uk), which, as we manage server, or gamma.jabservers.co.uk in the example, the e-mails will come to us.

To change this and tell the cron daemon to send the e-mails to you, add the line ‘MAILTO=example@example.com‘ to the top of your crontab.

How do I enable register_globals (PHP)?

Tuesday, May 24th, 2011

Via .htaccess

For further information about .htaccess files and how they work, take a look at the following article:

How do .htaccess files work in Plesk?

The normal method is to use a .htaccess file to change the PHP settings via the php_flag directive:

php_flag register_globals on

Just create the file .htaccess with the above contents in the directory where you are going to install the application (or in the root of the domain if you want it to take affect over the whole domain). To switch if off, either change on to off or remove the line or file.

How do I change the default index page?

Tuesday, May 24th, 2011

By default, if you request a directory (e.g. http://example.com/ or http://example.com/support/) Apache keeps a list of files it should look for (in order) before it should try and display the contents of the directory. Normally it isn’t allowed to do this, and so will either give a 403 error warning, or, if you are requesting the initial page (such has http://example.com/) then you may see a ‘Test Page’ for Apache and CentOS.

This list of files is set in the master Apache configuration file (httpd.conf – for more information about it, see this article), and looks something like:

DirectoryIndex index.html index.shtml index.cfm index.php index.php3

Therefore, it will look for index.html first. If it cannot find that file, it try and look for index.shtml, and so on. However, if you have (for example) index.htm or default.html, then, as it is not in the list, it will not be called. To change this you will need to add your own DirectoryIndex command within a .htaccess file to extend the list.

Setup

Create a .htaccess file with the following contents (if you want to use index.htm) then upload it to the directory where you want this to work:

DirectoryIndex index.htm

Note that all sub-directories below the directory where you put the .htaccess file will also be affected by this change. Normally it’s placed being placed in the doucment root (httpdocs/) so that it affects all directories on a website.

For more infromation on how .htaccess files work, see this article. Also, if you make a mistake with a .htaccess file, Apache will report a 500 error and your site will be unavailable until either you correct the mistake or delete the file. Only use this if you are sure of what you are going.

How do .htaccess files work in Plesk?

Tuesday, May 24th, 2011

Programs in Linux, such as Apache (the server daemon) and qmail (the mail daemon) are configured using basic text files instead of the centralized-database (registry) used in Windows. This provides advantages in that the configuration for any domain can be distributed among many files.

Apache’s configuration by Plesk is split into four parts:

  • httpd.conf This is the master file and contains all the general and default settings for the whole server and all domains. Here items such as file types and which features are loaded are configured. This file isn’t normally written to by Plesk and therefore allows us to tune the servers.
  • http.include Written to by Plesk, this file configures the default settings for all the IP addresses the server uses as well as creating the general subdomains webmail.example.com and lists.example.com (for Horde webmail and Mailman mailing-lists respectivly).
  • conf/httpd.include Found under each domain’s home folder, it contains the settings specific to each domain, including subdomain and Web User settings.
  • .htaccess Not required for a site to work, these files allow configuration of the server on-the-fly by storing settings within an actual folder. Settings in these files apply to the folder the file is in and any sub-folder.

The first three types are managed by us and Plesk and therefore are difficult to update and change settings for specific area of a website. By using .htaccess you can work with Apache and change some of the settings by yourself.

Why do I need to use it?

Most of the time you probably won’t need to use a .htaccess file. The default settings for a domain are more than enough to run a website, and some of the more advanced settings, such as switching on and off PHP, Python, etc. or the Custom Error Documents option can all be controlled by Plesk.

However, there are times and people that will need to use them in order to change advanced settings not supported by Plesk. For example, (at the time of writing) all stable versions of osCommerce still require the register_globals setting enabled within PHP. This is generally unsafe and not recommended (click here for more information about the setting).

Normally, the only way to enable the setting it to change the php.ini file, which configures PHP for the whole server. But, using features of the PHP module in Apache, you can write a command into a .htaccess file which enables the setting for either the whole domain (if put into the Document Root) or just the directory that holds osCommerce.

So what can I do with it?

You can’t do everything with it. There are a number of options and settings in Apache that can only be managed either with just the httpd.conf file, or both httpd.conf and the httpd.include files. But, you can control things like access rights, type definistions and PHP settings.

Thank you

Import an SQL file directly via the MySQL command-line

Tuesday, May 24th, 2011

If you have a very large database (totaling 10’s or 100’s of megabytes), then uploading via HTTP is not suitable. Instead, it will be quicker and more efficient to import the file directly into the database using the mysql command-line utility on the server.

However, to do this you will need SSH access to the server. If you do not have SSH access, please see our article:

To import an SQL file:

  • First, upload the file via FTP onto your account (into your private/ directory is best as no-one else can access this).
  • Using the SSH client of your choice, log onto the server. You will start at your home directory (/var/www/vhosts/example.com, where example.com is the domain the SSH account is associated with).
  • Run the following command line:
mysql -u username -p database < filename
  • where username is the username created for database. Finally, filename is the filename (and path, if required) to the file you just uploaded.
  • For example, if you created the database forum, with the username forum (and the password f0rum), and uploaded backup.sql to the private/ directory of your domain, you can run the following command:
mysql -u forum -p forum < private/backup.sql
Enter password:

If you see the error “Access denied for user 'username'@'localhost'“, check that you are using the correct username and password – this means that either one of them (or both of them) failed.

Depending on the size (and complexity) of the SQL file, this can take from a few seconds to a few minutes to complete. If you want to cancel command while it is running, press Ctrl & C at the same time.

Also, if you have a zipped or gzipped file, you will need to de-compress it before using it (the mysql command line utility will not understand the compressed file). To do this, run the following:

unzip path/to/file.zip

or

gunzip path/to/file.gz

If you still do not know how to do then just send email email
you can find my email in contact us
Thank You

Import an SQL file via DB WebAdmin in PleskImport an SQL file via DB WebAdmin in Plesk

Tuesday, May 24th, 2011

Over some of the recent major revisions in phpMyAdmin (which is used to manage the MySQL databases), the location of the import utility has changed. In the version currently installed with both Plesk 7.5.x Reloaded and Plesk 8.0.x is can be found in two places:

  • Log onto Plesk using your username and password.
  • Click on the name of the domain the database belongs to.
  • Click on Databases.
  • Click on the name of the database you want to import the file to.
  • Click on DB WebAdmin.
  • Either:
    • Click on the name of the database (above the list of tables on the left) and on the next page click the SQL tab. Or;
    • Click on the SQL box icon above the name of the database (on the left-hand-side) and click on the Import Files tab.
  • In both cases, the import file field will be shown and you can upload an SQL file to be run against the database.

This may take some time. If the browser has stopped responding, then the upload may have failed – try the method below if this keeps happening.

If you have a large file (more than a few megabytes) then this method is not suitable. The next method will work better.

If you need further assist just drop me email

How do I import/export email contacts in SmarterMail?

Tuesday, May 24th, 2011

The following article explains how to import/export email contacts in SmarterMail. Contacts can be imported from either a vCard file (*.vcf), a comma-separated file (*.csv) or a zip archive containing any combination of VCF and CSV files. Contacts can only be exported into a vCard file (*.vcf). When exporting contacts, you have the option of exporting all contacts, or specific contacts.

To import email contacts, please follow these steps:

  1. Open a browser window and go to one of the following URLs:
    • http://mail.yourdomainname.com
    • http://mail#.safesecureweb.com (this address is provided in the setup email)
  2. Login using your email address and password.
  3. From the Folders section on the left, expand Contacts. From the Folders section, expand Contacts.
  4. Click My Contacts.
  5. From the Actions menu, select Import Contacts. From the Actions menu, select Import Contacts.
  6. Browse to the file on your local machine. Browse to the file on your local machine.
  7. Click Ok.

Once the contacts are done importing, they will appear in your contacts list.

To export email contacts, please follow these steps:

  1. Open a browser window and go to one of the following URLs:
    • http://mail.yourdomainname.com
    • http://mail#.safesecureweb.com (this address is provided in the setup email)
  2. Login using your email address and password.
  3. From the Folders section on the left, expand Contacts. From the Folders section, expand Contacts.
  4. Click My Contacts.
  5. From the Actions menu, select Export All Contacts. From the Actions menu, select Import Contacts.
  6. If you prefer to export individual users, check each user and select Export Selected Contacts.

If a single contact is being exported, a .vcf file will be created with the user’s name. If multiple contacts are being exported, a .zip file will be created called vCards.zip.

References

http://www.hosting.com/support/smartermail3/impexpcontacts

This Virtual Directory does not allow contents to be listed.

Friday, May 20th, 2011

This kind of issue will be happen in windows server 2003 IIS6

if you faced the issue then refer to below solution

1- RDC to the server go to IIS then select the domain and right click on the domain then select proprites

2- go to Documents and select the default page

3- go to home directory in properties  and make the appliction pool = the domain name

and excute permission = scripts only

4- go to directory security in properties of the domain in IIS6, click edit under authentication and access control

change the username to domain.com_web  and you can reset the password for this username from right click on my computer and press on manage, then select local users and groups then you will be able to reset the password

after that try to test the site, you will find it fix already

check all the steps, if not fix then drop me email to my email, you can find the email in contact us.

Thank you.