Drupal: Feeds Aggregator Removes < and > Characters from HTML Tags

March 5th, 2012 No comments

The problem is that aggregator module removes the < (or &lt;) and > (or &gt;) characters from feed contents which caused the html tags to show up in the feeds. You will get this problem only if your system includes a libxml 2.7.x package (ex: Debian 6), as this a known bug with libxml 2.7.x and it’s an old one, like the discussion here http://drupal.org/node/365382 is dated back January of 2009.

As mentioned in the discussion, the fix is to downgrade to libxml to 2.6.x. You can search for binary (rpm/deb/etc) for your distro or you can install it from source. For Debian 6, where we encountered this problem, we just used the package from Debian 5 (download link) which is libxml version 2.6.32 at this time.

Share
Categories: Drupal 6, Drupal 7 Tags:

Drush pm-update error: Failed to get available update data for one project.

March 1st, 2012 No comments

Drush Error: Failed to get available update data for one project.

I noticed the above error when running an updates on one of our sites. Drush pm-update (drush up) downloads the updates without problem but restores them as well due to this error. I think Drush just restore or won’t proceed with updates when there’s any error and it doesn’t give you detailed logs (or not that i know of). I tried searching online for similar issues but i got different results or different cause of problem.

For my case, I was able to identify that drush was failing because of our custom module, as there’s a message on status report page showing that the custom module has “No available releases”. This module was created for this site only and it is not on the drupal.org’s project page. Drush then complain that it cannot find an update for this module and considered that an error.

Quick and easy solution for me was to disable the module, proceed with drush update, then enable back our custom module.

Share
Categories: Drupal 6, Drupal 7, Tips & Tricks Tags:

HowTo: Clear DNS Cache in Windows, Mac, and Linux

January 31st, 2012 No comments

Quick howto on clearing DNS Cache on your computer:

Windows: go to Start, then type cmd and hit Enter. A DOS/shell prompt will appear, then type ipconfig /flushdns and hit Enter.

MacOS: open Terminal and type dscacheutil -flushcache and hit Enter. You can open Terminal from Spotlight if you don’t know where to find it (Applications -> Utilities -> Terminal).

Linux: open Terminal (or whatever app/program you use for console) and restart your dns service. Depending on what’s installed by default on your system, try these any or all these three:

/etc/init.d/nscd restart
/etc/init.d/dnsmasq restart
/etc/init.d/named restart

Notes:
– If you don’t have any of the above installed, try the following: /etc/init.d/networking restart.
– If you run into permission issue try adding “sudo” at the beginning of each command, ex: “sudo /etc/init.d/nscd restart

Also, if you are clearing your cache related to a browser (example: looking at website changes) please take note that your browsers have their own cache as well so you might need to clear them separately.

Share
Categories: HowTo, Tips & Tricks Tags: ,

phpMyAdmin Installation

January 27th, 2012 No comments

For whatever reason that you need to install phpmyadmin here’s a short guide.

Download the latest stable version from www.phpmyadmin.net. Extract to a directory that is accessible from the web. Example: http://mysite.com/phpmyadmin. Create your own config.inc.php file. There’s sample config file (config.sample.inc.php) that comes with it for you to use or customize.

By default, this is what my config.inc.php file looks like on a server running MySQL on localhost. This config prompts me for my database user and password using http auth, then display only the database/s that my user have access to.

< ?php
$i = 0;
$i++;
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['extension'] = 'mysql';
$cfg['Servers'][$i]['AllowNoPassword'] = false;

$cfg['Servers'][$i]['auth_type'] = 'http';
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['controluser'] = '';
$cfg['Servers'][$i]['controlpass'] = '';
$cfg['Servers'][$i]['pmadb'] = '';
?>

You can also install phpmyadmin in using your package manager.

aptitude install phpmyadmin
yum install phpmyadmin

If it’s not available from your package manager or repo, you can easily search for its rpm/deb files (ex: from rpmforge or dotdeb). You can then access your phpmyadmin installation from http://server_hostname_or_ip/phpmyadmin.

Note: Scanning of phpmyadmin installs on server/site is very common, so it is a good practice to rename it to something that isn’t so obvious, put it to a url like http://server_hostname_or_ip/my_secret_pma.

Share

Copy or Duplicate Cpanel Account to New Domain

January 26th, 2012 1 comment

Three simple steps to duplicate a cPanel account into another domain.

1.) Make a full cpanel backup of the first account. Login as root and execute the command below. You can

#> /scripts/pkgacct cpanel_user

** This will be saved in /home/cpmove-cpanel_user.tar.gz

2.) Change the domain and username of the first account. This will become the new or duplicate account.

Go to WHM ->> Account Functions ->> Modify an Account

Select the account/domain to copy. Enter or replace username and domain with new/second domain.

3.) Restore the cpanel backup of first account (created in step #1 above) and you now have both or duplicate accounts.

#> /scripts/restorepkg cpanel_user

** This will restore the account from cpanel backup in home directory (/home/cpmove-cpaneluser.tar.gz)

Share
Categories: cPanel, Tips & Tricks Tags:

HP DL360 G5 No Video Display/Output

January 26th, 2012 No comments

Recently, we upgraded the processors and memory of our HP DL360 G5 servers, and we encountered the issue with video display on systems with older firmware versions. We also noticed that servers with older firmware doesn’t recognize 4GB memory modules and quad-core processors.

Here are the firware version release dates that we’ve tested:
Release Date: 11/01/2008 – all upgrades worked
Release Date: 07/10/2009 – all upgrades worked
Release Date: 05/01/2007 – all upgrades failed

How to Check BIOS/Firware version:
– look at POST info (when server is booting up)
– on a running server (linux), use the dmidecode command (ex: dmidecode | grep Release)

Descriptions of Upgrade Issues:

Memory: Cannot recognize 4GB memory module, system beeps and have red led light which indicates that something is wrong, incompatible, or not working with hardware. Memory were tested and working on the same server model/generation with newer firmware.

Processor: upgrades from dual-core to quad-core gives me no video display and there’s no beep or red led light as well. Cpu was confirmed/tested that it is working on the same server with newer firmware version.

Solution:

If you encounter the above upgrade issues all you have to do is upgrade your firmware. HowTo: Update BIOS/Firmware on HP Servers. There’s a Critical updates released on May 5, 2011 (version 9.30).

Share
Categories: HowTo, Tips & Tricks Tags: ,

HowTo: Update BIOS/Firmware on HP Servers

January 26th, 2012 No comments

Most of the time firmware or bios update on servers is something that most people doesn’t bother to do unless absolutely needed. Firmware or bios updates usually includes bug fixes or additional hardware support, some are critical while others are just enhancements.

Sample situation where you need to apply an update is if you are upgrading processor or memory and your system doesn’t recognize the upgrades, which usually are of higher capacity or specifications. These newer hardware upgrades might be supported on the latest firmware, as long as they’re compatible (of course).

Manual way of updating BIOS used to be a scary task (for me) specially for production systems as you could render it unusable if something goes wrong, and you have to do the trouble of restore process.

Although there are still manual ways to do them (ex: using rompaq), HP has their utility called “HP Smart Update Firmware DVD“, which contains a collection of firmware and other utilities available for HP servers. All you have to do is download/burn the firmware to dvd, load/boot your system from it, do some clicks, spend few minutes watching the update process or progress, and you’re done.

Here’s an overview of Firmware/BIOS update process:
1.) Download and burn “HP Smart Update Firmware DVD“.
2.) Load and boot/reboot the server.
3.) Choose “Automatic” update process and sit back. “Interactive” update process is available as well.

Share
Categories: HowTo, Tips & Tricks Tags: , ,

Recursive FTP

December 29th, 2011 No comments

There are times when the only option for transferring files between servers is via command-line ftp. The default ftp client doesn’t support recursive uploads so you need other client such as lftp. Example below will use the built-in mirror function of lftp to download or upload the entire directory.

Upload the entire directory using the lftp reverse mirror option:

1.)  Connect to you destination server using lftp, similar process with default ftp client

lftp ftp_hostname
user ftp_username ftp_password

2.)  Upload files

mirror -R source_directory destination_directory

Download whole directory lftp mirror option:

1.) Connect to you destination server using lftp

lftp ftp_hostname
user ftp_username ftp_password

2.) Download files

mirror source_directory destination_directory

You can also use wget and ftp to recursively download files/directories:

Example:
wget -m ftp://ftp_username:ftp_password@ftp_hostname/path_to_directory

This will download the entire directory you specified on path_to_directory. There will be a .listing file on each directory, and you can remove them all with this command “find path_to_directory -name .listing -exec rm -f {} \;

Share
Categories: HowTo Tags: ,

Using Drush to Sync or Push Changes from Development Site to Production

December 22nd, 2011 No comments

This is a quick reference in using Drush (v4.5) to easily sync, move, or copy from one environment to another. The traditional way of doing this is by exporting the database and importing it to destination environment, then copying all files excluding the settings files. Drush does the same thing, but it combines or shorten all these commands which saves time rather than doing the long mysqldump (export) and mysql (import) with parameters as well as copying (cp) files.

This Drush alias file example is for a development and staging site on the same server. This process will copy or sync dev to staging. This works in either Drupal 6 or 7. Also, I have my Drush installed using pear (pear install drush/drush) on a Debian 6 server.

1.) Create the Drush alias file (example: /usr/share/php/drush/sitename.aliases.drushrc.php) with details of development and staging Drupal sites.


< ?php
$aliases['dev'] = array(
'uri' => 'http://default',
'root' => '/path/to/development/site',
'db-url' => 'mysql://devmysqluser:devmysqlpass@devmysqlhost/devdatabasename',
'path-aliases' => array(
'%drush' => '/usr/bin/drush',
'%drush-script' => '/usr/share/php/drush/drush.php',
'%dump-dir' => '/path/to/save/database/dumps',
),
);
$aliases['staging'] = array(
'uri' => 'http://default',
'root' => '/path/to/staging/site',
'db-url' => 'mysql://stagingmysqluser:stagingmysqlpass@stagingmysqlhost/stagingdatabasename',
'path-aliases' => array(
'%drush' => '/usr/bin/drush',
'%drush-script' => '/usr/share/php/drush/drush.php',
),
);

2.) To sync or copy database from dev to staging just do this command:

drush sql-sync @sitename.dev @sitename.staging

3.) To sync or copy files, excluding sites/default/settings.php by default, run the following:

drush rsync @sitename.dev @sitename.staging

Append -y to any of the above commands to “Assume 'yes' as answer to all prompts“. Example: drush rsync @sitename.dev @sitename.staging -y

For detailed explanation and more info on available drush alias checkout the official Drush documentations and examples.

Share
Categories: Drupal 6, Drupal 7 Tags: ,

Install R1Soft Agent on Debian 6 (Squeeze)

December 14th, 2011 No comments

I ran into several issues installing R1soft agent on Debian 6 (32/64 bit) systems but I also found all solutions form R1soft docs/wiki.

Here’s the summary of the install process:
1.) Issue with terminal emulator. Need to set the default terminal emulator to what the R1soft agent installer requires – xterm1.
2.) Install kernel headers. Not an issue but is part of install requirements.
ex: aptitude install linux-headers-2.6-amd64 linux-headers-2.6.32-5-common
3.) Copy kernel headers to a temporary location for cki (custom kernel installer) setup.
ex:
rsync -avz /usr/src/linux-headers-2.6.32-5-amd64/ /usr/src/r1build/
rsync -avz /usr/src/linux-headers-2.6.32-5-common/ /usr/src/r1build/

4.) Proceed with R1soft Agent installation and choose to build the kernel module later. After the installation, run “/usr/bin/r1soft-cki –get-module –kernel-dir /usr/src/r1build” to proceed with kernel module compilation.

References:
install-aborted-by-user
Syntax error: Unterminated quoted string
kernel module installer failed

Share