Server

How to Use the vi Editor

This help note explains the basics of vi: opening and closing a…

This help note explains the basics of vi:

  • opening and closing a file
  • moving around in a file
  • elementary editing

vi has many other commands and options not described here. The following resources can help you get started using the vi editor, and are available at the UW University Book Store:

  • “vi Tutorial.” Specialized Systems Consultants (SSC).
  • “vi Reference.” Specialized Systems Consultants (SSC).
  • “Learning the vi Editor.” Linda Lamb, 1990.

Starting vi

You may use vi to open an already existing file by typing

      vi filename

where “filename” is the name of the existing file. If the file is not in your current directory, you must use the full pathname.

Or you may create a new file by typing

      vi newname

where “newname” is the name you wish to give the new file.

Server

FIX: Plesk and Sendmail Problem PHP

From the command line, enter this below. /usr/local/psa/bin/domain -u yourdomain.com -mail_service false…

From the command line, enter this below.

/usr/local/psa/bin/domain -u yourdomain.com -mail_service false

You do not need to restart the server. This tells Plesk to not use the mail server to send mail for that domain. It will then go through the correct MX entry for the domain and send it to an external domain. Specially for those who use Google Apps on Plesk.

You will need to do this for every domain hosted on the server.

Joomla

Use joomla default recaptcha plugin in Your Component or Module

1) Get reCaptcha keys from http://www.google.com/recaptcha 2) Set these keys to reCaptcha…

1) Get reCaptcha keys from http://www.google.com/recaptcha

2) Set these keys to reCaptcha plugin and activate it if it’s not.

3) Put below code where you want to show reCaptcha

//php code
JPluginHelper::importPlugin('captcha');
$dispatcher = JDispatcher::getInstance(); $dispatcher->trigger('onInit','dynamic_recaptcha_1');
//html code inside form tag
<div id="dynamic_recaptcha_1"></div>

4) Put this code where you validating/processing the form

$post = JRequest::get('post');
JPluginHelper::importPlugin('captcha');
$dispatcher = JDispatcher::getInstance();
$res = $dispatcher->trigger('onCheckAnswer',$post['recaptcha_response_field']);
if(!$res[0]){
die('Invalid Captcha');
}

Server

Configure RPMforge Repository on CentOS

Open the RPMforge configuration file /etc/yum.repos.d/rpmforge.repo Add the following text to the…

  1. Open the RPMforge configuration file
    /etc/yum.repos.d/rpmforge.repo
  2. Add the following text to the end of the RPMForge repository entry
    priority=3
  3. Check that you got the priorities set correctly
    yum check-update
    You should output similar to the following:
    Loaded plugins: fastestmirror, priorities

    469 packages excluded due to repository priority protections