Archive for the ‘linux’ Category

if plesk is not running and you see in /tmp/autoinstaller3.log this:

Package matching php-5.3.3-3.el6_2.5.i686 already installed. Checking for update.
Running rpm_check_debug
Exception: Scriptlet or other non-fatal errors occurred during transaction.

ERROR: Failed to run the Yum utility.
The Yum utility failed to install the required packages.
Attention! Your software might be inoperable.
Please, contact product technical support.

then you have to update php by hand yum update php
then to run /usr/local/psa/admin/bin/autoinstaller --upgrade-installed-components --select-release-current wich will upgrade installed components (as auto upgrade option in plesk does automatically) and plesk interface will start again.

rsync -avopr -e ‘ssh -p ssh_port_number_only_if_different_than_22’ user@server:/(source_path) ./(destination_path)

Can be done easy with epel yum repo. more info about epel:
for centos 5:
rpm -ivh epel-release-5-4.noarch.rpm

yum install imagemagick php-magickwand php-pecl-imagick
restart apache and done

That’s all.

Each and every zone file has a unique serial number and that serial number should increment with each subsequent revision

A serial number is traditionally in the format (YYYYMMDDSS) where SS the sequence number. For example, today is 6/24/2011, so the serial number in a zone file modfied today would be… 2011062400.

So let’s say that you pushed that zone today and when you went back to make an additional change, you accidentally added an additional number to your serials and instead of 2011062400 you ended up with 22011062400.

In order to get everything back in order you will need to manually reset the zone file’s serial number by setting it to the number below. Its highest number you can get using 32 bits.


To to reset your serial number, update your zone file with the serial number listed above and push it out to the slaves. Then change your zone files serial number back to the correctserial number, which will be considered to be greater than the magic number above. Then push dns again.

Check your slave servers and verify the the zone file now has the correct serial.


Original article:

tested on Horde: 3.1.7

don’t be tricked by these errors in log:
[error] [client ….] PHP Deprecated: Assigning the return value of new by reference is deprecated in /usr/share/psa-pear/PEAR.php
the errors can be disabled in /usr/share/psa-horde/config/conf.php

If you get white page [500 error] after login on horde you can try this:
edit files:

/usr/share/psa-horde/imp/lib/IMAP/Client.php line 576
modify     function namespace($additional = array())
with       function plmnamespace($additional = array())
/usr/share/psa-horde/imp/lib/Session.php line 295
modify     $_SESSION['imp']['namespace'] = $imapclient->namespace($user_namespace);
with       $_SESSION['imp']['namespace'] = $imapclient->plmnamespace($user_namespace);

reload the webmail page and logout/login again.

Please let me know if this helps you. Feedback is appreciated.

modify all this files to get everything working properly

./IMAP/Tree.php:78: $ptr = reset($_SESSION[‘imp’][‘plmnamespace’]);
./IMAP/Tree.php:83: $this->_namespaces = (empty($GLOBALS[‘conf’][‘user’][‘allow_folders’])) ? array() : $_SESSION[‘imp’][‘plmnamespace’];
./IMAP/Tree.php:184: foreach ($_SESSION[‘imp’][‘plmnamespace’] as $val) {
./Folder.php:139: $delimiter = reset($_SESSION[‘imp’][‘plmnamespace’]);
./Folder.php:678: foreach ($_SESSION[‘imp’][‘plmnamespace’] as $val) {
./Session.php:259: $_SESSION[‘imp’][‘plmnamespace’] = $ptr[‘imap_config’][‘plmnamespace’];
./Session.php:265: $_SESSION[‘imp’][‘plmnamespace’] = array();
./Session.php:268: $user_namespace = (isset($ptr[‘plmnamespace’]) && is_array($ptr[‘plmnamespace’])) ? $ptr[‘plmnamespace’] : array();
./Session.php:278: $_SESSION[‘imp’][‘plmnamespace’][$val] = array(‘name’ => $val, ‘delimiter’ => $box[0]->delimiter);
./Session.php:295: $_SESSION[‘imp’][‘plmnamespace’] = $imapclient->plmnamespace($user_namespace);
./Session.php:296: if (!is_array($_SESSION[‘imp’][‘plmnamespace’])) {
./Session.php:318: $_SESSION[‘imp’][‘plmnamespace’] = null;
./IMP.php:1195: reset($_SESSION[‘imp’][‘plmnamespace’]);
./IMP.php:1196: $mailbox = key($_SESSION[‘imp’][‘plmnamespace’]);
./IMP.php:1204: foreach ($_SESSION[‘imp’][‘plmnamespace’] as $key => $val) {
./IMP.php:1211: if ($empty && isset($_SESSION[‘imp’][‘plmnamespace’][”])) {
./IMP.php:1212: $cache[$key][$mailbox] = $_SESSION[‘imp’][‘plmnamespace’][”];
./IMP.php:1236: foreach ($_SESSION[‘imp’][‘plmnamespace’] as $val) {

P.S. If you copy/paste the content to your blog, please quote the source 🙂

sendmail –O LogLevel=14 –bs -Am
if sendmail is running via xinetd then add the line –O LogLevel=14 to server_args in /etc/xinetd.d/sendmail and reload/restart xinetd

this can help to catch spammers.

Since plesk 9.5, you can choose in plesk how php will run (as apache module will be executed as apache user, as cgi/fastcgi will be executed as domain user/system user)

wget -q -O - | sh
rpm --import
yum install mod_suphp

edit the /etc/httpd/conf.d/mod_suphp.conf and leave only LoadModule suphp_module modules/ line
modify /etc/suphp.conf:



create file /etc/httpd/conf.d/zzz_suphp.conf with content:

<Directory /var/www/vhosts>
        <IfModule mod_suphp.c>
               AddHandler x-httpd-php .php .php3 .php4 .php5 .phtml
               suPHP_AddHandler x-httpd-php
               suPHP_Engine on

With this config you will enable the suPHP only for vhost folder and not for webmail and other folders.

You have also to check the file/folders permissions. If you have files/folders with 777 permission you will get a 500 error. You have to change it to 755 or 644.

As root:
Optional: if there is no custombuild folder use this:
cd /usr/local/directadmin
tar xvzf custombuild.tar.gz
cd custombuild

normal upgrade way (for debian install: libpcre3-dev libdb4.3-dev libperl-dev libsasl2-dev and skip the yum line)
cd /usr/local/directadmin/custombuild
yum -y install db4-devel cyrus-sasl-devel
./build update
./build update_script
./build set exim yes
./build clean
./build pcre
./build exim

if first set is not working, use this one:
cd /usr/local/directadmin/custombuild
./build set custombuild 1.2
./build set exim yes
./build update
./build update_script
./build update_data
./build clean
./build exim
./build set custombuild 1.1

Swap space is hard disk space that extends system RAM
Create a swap file (or partition)

dd if=/dev/zero of=/var/local/swapfile bs=1k count=1M

Write special signature

mkswap /var/local/swapfile

Add entry to /etc/fstab
/var/local/swapfile swap swap defaults 0 0
Activate swap space

swapon -a

Backup the partition table

sfdisk -d /dev/sda > /tmp/partitions.sda

Partition the disk

fdisk /dev/sda

Restore partition table after major mistake

sfdisk /dev/sda < /tmp/partitions.sda

Update /proc/partitions

partprobe /dev/sda