<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Patrick&#039;s playground &#187; Webhosting</title>
	<atom:link href="http://www.vankouteren.eu/blog/category/webhosting/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.vankouteren.eu/blog</link>
	<description>Random thoughts, problems and solutions</description>
	<lastBuildDate>Sun, 29 Jan 2012 07:53:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Your Plesk Watchdog in 2011</title>
		<link>http://www.vankouteren.eu/blog/2011/01/your-plesk-watchdog-in-2011/</link>
		<comments>http://www.vankouteren.eu/blog/2011/01/your-plesk-watchdog-in-2011/#comments</comments>
		<pubDate>Fri, 14 Jan 2011 07:55:17 +0000</pubDate>
		<dc:creator>Patrick van Kouteren</dc:creator>
				<category><![CDATA[Plesk]]></category>
		<category><![CDATA[Webhosting]]></category>
		<category><![CDATA[2011]]></category>
		<category><![CDATA[Watchdog]]></category>

		<guid isPermaLink="false">http://www.vankouteren.eu/blog/?p=235</guid>
		<description><![CDATA[Plesk users (version 8.x up to 10.x as far as I've heared) are getting errors from the Watchdog module. Parallels is coming out with an update for this error in the future, but they can't tell when (yet). These errors occur on daily basis and are actually pretty easy to fix. You might have two [...]]]></description>
			<content:encoded><![CDATA[            <script type="text/javascript" src="http://www.vankouteren.eu/blog/wp-content/plugins/wordpress-code-snippet/scripts/shBrushSql.js"></script>
            <script type="text/javascript" src="http://www.vankouteren.eu/blog/wp-content/plugins/wordpress-code-snippet/scripts/shBrushPhp.js"></script>
<p>Plesk users (version 8.x up to 10.x as far as I've heared) are getting errors from the Watchdog module. Parallels is coming out with an update for this error in the future, but they can't tell when (yet). These errors occur on daily basis and are actually pretty easy to fix. You might have two errors (after each other), but this fix will solve them <a href="http://forum.parallels.com/showpost.php?p=435312&amp;postcount=73" target="_blank">both</a>.</p>
<p><span id="more-235"></span></p>
<p>The first error which occurs since the first of January 2011 is the following one:</p>
<p><pre class="brush: sql">ERROR: WDExc

Error occurred while processing database query: 'MySQL query failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'group by service_id, type, round(unix_timestamp(time) / 200, 0) having count(val' at line 3'

0: wdlib.php:1089

wd__db_query(string 'select service_id, type, unix_timestamp(min(time)) as min_time, unix_timestamp(max(time)) as max_time, avg(value) as avg

from module_watchdog_sys_stat where

group by service_id, type, round(unix_timestamp(time) / 200, 0) having count(value) &gt; 1 limit 10000;')

1: pack-sysstats:63

pack_statistics(integer '200', boolean  false, boolean  false)

2: pack-sysstats:44</pre></p>
<p>At the time being I was running Plesk 9.5.2. As Plesk 10 was out, I thought that would fix the problem. It kind of did, as I got a different error message:</p>
<p><pre class="brush: php">/usr/local/psa/libexec/modules/watchdog/cp/pack-sysstats: line 1: ?php: No such file or directory

/usr/local/psa/libexec/modules/watchdog/cp/pack-sysstats: line 2: syntax error near unexpected token `&quot;The file {$_SERVER['SCRIPT_FILENAME']} is part of Plesk 9 distribution. It cannot be run outside of Plesk 9 environment.\n&quot;'

/usr/local/psa/libexec/modules/watchdog/cp/pack-sysstats: line 2: `    die(&quot;The file {$_SERVER['SCRIPT_FILENAME']} is part of Plesk 9 distribution. It cannot be run outside of Plesk 9 environment.\n&quot;);'</pre></p>
<p>Fortunately I got some help through Twitter (@ParallelsPanel) and the Parallels Forum. The fix can be found <a title="Watchdog 2011 fix" href="http://forum.parallels.com/showpost.php?p=434456&amp;postcount=42" target="_blank">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vankouteren.eu/blog/2011/01/your-plesk-watchdog-in-2011/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting YUM to work on CentOS</title>
		<link>http://www.vankouteren.eu/blog/2010/02/getting-yum-to-work-on-centos/</link>
		<comments>http://www.vankouteren.eu/blog/2010/02/getting-yum-to-work-on-centos/#comments</comments>
		<pubDate>Sat, 06 Feb 2010 13:39:33 +0000</pubDate>
		<dc:creator>Patrick van Kouteren</dc:creator>
				<category><![CDATA[Webhosting]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[install yum]]></category>
		<category><![CDATA[rpm]]></category>
		<category><![CDATA[yum]]></category>

		<guid isPermaLink="false">http://www.vankouteren.eu/blog/?p=190</guid>
		<description><![CDATA[One of my servers is running CentOS. As I wanted to upgrade PHP, I was looking how to do that. I've found the YUM command to be useful (yum upgrade php). However, for being able to upgrade this way, one needs yum to be installed. I was 'fortunate' it wasn't so another task was born: [...]]]></description>
			<content:encoded><![CDATA[            <script type="text/javascript" src="http://www.vankouteren.eu/blog/wp-content/plugins/wordpress-code-snippet/scripts/shBrushSql.js"></script>
            <script type="text/javascript" src="http://www.vankouteren.eu/blog/wp-content/plugins/wordpress-code-snippet/scripts/shBrushPhp.js"></script>
<p>One of my servers is running CentOS. As I wanted to upgrade PHP, I was looking how to do that. I've found the YUM command to be useful (yum upgrade php). However, for being able to upgrade this way, one needs yum to be installed.</p>
<p>I was 'fortunate' it wasn't so another task was born: installing YUM on CentOS.<span id="more-190"></span>For installing, I've found <a href="http://wiki.openvz.org/Install_yum" target="_blank">this</a> source to be quite useful. However, I got some warnings because of dependencies. To resolve these dependencies I've upgraded the rpm packages which were denoted by the installer by hand, but the command suggested at the last post in <a href="http://forums.fedoraforum.org/archive/index.php/t-173341.html" target="_blank">this thread</a> might also work directly.</p>
<p>The names of the most recent rpm packages are listed <a href="http://mirror.centos.org/centos-5/5/os/i386/CentOS/" target="_blank">here</a>. As the rpm packages have circular dependencies one of the packages has to be installed with the --nodeps argument so these dependencies are not taken into account.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vankouteren.eu/blog/2010/02/getting-yum-to-work-on-centos/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PEAR install on Linux by a n00b for n00bs</title>
		<link>http://www.vankouteren.eu/blog/2010/01/pear-install-on-linux-by-a-n00b-for-n00bs/</link>
		<comments>http://www.vankouteren.eu/blog/2010/01/pear-install-on-linux-by-a-n00b-for-n00bs/#comments</comments>
		<pubDate>Thu, 14 Jan 2010 12:04:23 +0000</pubDate>
		<dc:creator>Patrick van Kouteren</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Webhosting]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[PEAR]]></category>
		<category><![CDATA[PEAR install]]></category>

		<guid isPermaLink="false">http://www.vankouteren.eu/blog/?p=186</guid>
		<description><![CDATA[Okay, I must admit: I'm a programmer and I know some commands. Because I want to use PEAR packages, I needed to install it. The installing command is quite easy to find, but I had a hard time determining the directory structure. Some searching on the internet and an IRC conversation (EFNet #pear, thanks davidc_!) [...]]]></description>
			<content:encoded><![CDATA[            <script type="text/javascript" src="http://www.vankouteren.eu/blog/wp-content/plugins/wordpress-code-snippet/scripts/shBrushSql.js"></script>
            <script type="text/javascript" src="http://www.vankouteren.eu/blog/wp-content/plugins/wordpress-code-snippet/scripts/shBrushPhp.js"></script>
            <script type="text/javascript" src="http://www.vankouteren.eu/blog/wp-content/plugins/wordpress-code-snippet/scripts/shBrushCpp.js"></script>
<p>Okay, I must admit: I'm a programmer and I know some commands. Because I want to use PEAR packages, I needed to install it. The installing command is quite easy to find, but I had a hard time determining the directory structure. Some searching on the internet and an IRC conversation (EFNet #pear, thanks davidc_!) later I was able to install PEAR in a quite reasonable directory structure.<span id="more-186"></span></p>
<p>Now that all is done it sounds logical. This blogpost is meant for people who want to install PEAR, but are not sure how to do it or about the directories which need to be specified.</p>
<p><strong>Starting install</strong></p>
<p>Log on to your server on the command line (as root). The install acan then be started as follows:</p>
<pre>lynx -source http://pear.php.net/go-pear | php</pre>
<p><strong>Directories</strong></p>
<p>After some questions (which in 99% of the cases just get the default answer), you'll get the prompt for the directories. After adjustment, my structure looks as follows:</p>
<pre>1. Installation prefix ($prefix) : /usr
2. Temporary files directory     : $prefix/temp
3. Binaries directory            : $prefix/bin
4. PHP code directory ($php_dir) : $prefix/share/PEAR
5. Documentation base directory  : $php_dir/docs
6. Data base directory           : $php_dir/data
7. Tests base directory          : $php_dir/tests</pre>
<p><strong>Finishing installation</strong></p>
<p>When the installation is done, the config (php.ini) file can automatically be adjusted. Note that you have to restart apache to load this new config.</p>
<p><strong>The full overview</strong></p>
<p>A complete overview from my PEAR install in- and output is given below.</p>
<p><pre class="brush: cpp">[root@server usr]# lynx -source http://pear.php.net/go-pear | php
Welcome to go-pear!

Go-pear will install the 'pear' command and all the files needed by
it.&Acirc;&nbsp; This command is your tool for PEAR installation and maintenance.

Go-pear also lets you download and install the following optional PEAR
packages: PEAR_Frontend_Web-beta, PEAR_Frontend_Gtk2, MDB2.


If you wish to abort, press Control-C now, or press Enter to continue:

HTTP proxy (http://user:password@proxy.myhost.com:port), or Enter for none::

Below is a suggested file layout for your new PEAR installation.&Acirc;&nbsp; To
change individual locations, type the number in front of the
directory.&Acirc;&nbsp; Type 'all' to change all of them or simply press Enter to
accept these locations.

1. Installation prefix ($prefix) : /usr
2. Temporary files directory&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp; : $prefix/temp
3. Binaries directory&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp; : $prefix/bin
4. PHP code directory ($php_dir) : $prefix/PEAR
5. Documentation base directory&Acirc;&nbsp; : $php_dir/docs
6. Data base directory&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp; : $php_dir/data
7. Tests base directory&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp; : $php_dir/tests

1-7, 'all' or Enter to continue: 4
PHP code directory ($php_dir) [$prefix/PEAR] : $prefix/share/PEAR

Below is a suggested file layout for your new PEAR installation.&Acirc;&nbsp; To
change individual locations, type the number in front of the
directory.&Acirc;&nbsp; Type 'all' to change all of them or simply press Enter to
accept these locations.

1. Installation prefix ($prefix) : /usr
2. Temporary files directory&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp; : $prefix/temp
3. Binaries directory&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp; : $prefix/bin
4. PHP code directory ($php_dir) : $prefix/share/PEAR
5. Documentation base directory&Acirc;&nbsp; : $php_dir/docs
6. Data base directory&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp; : $php_dir/data
7. Tests base directory&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp; : $php_dir/tests

1-7, 'all' or Enter to continue:
PHP Warning:&Acirc;&nbsp; putenv(): Safe Mode warning: Cannot set environment variable 'TMPDIR' - it's not in the allowed list in /usr/- on line 1264

The following PEAR packages are bundled with PHP: PEAR_Frontend_Web-beta,
PEAR_Frontend_Gtk2, MDB2.
Would you like to install these as well? [Y/n] : n

Loading zlib: ok

Bootstrapping Installer...................
Bootstrapping PEAR.php............(remote) ok
Bootstrapping Archive/Tar.php............(remote) ok
Bootstrapping Console/Getopt.php............(remote) ok

Extracting installer..................
Downloading package: PEAR.............ok
Downloading package: Structures_Graph....ok

Preparing installer..................
Updating channel &quot;doc.php.net&quot;
Update of Channel &quot;doc.php.net&quot; succeeded
Updating channel &quot;pear.php.net&quot;
Update of Channel &quot;pear.php.net&quot; succeeded
Updating channel &quot;pecl.php.net&quot;
Update of Channel &quot;pecl.php.net&quot; succeeded

Installing selected packages..................
Downloading and installing package: PEAR.............warning: pear/PEAR requires package &quot;pear/Archive_Tar&quot; (recommended version 1.3.3)
warning: pear/PEAR requires package &quot;pear/Structures_Graph&quot; (recommended version 1.0.2)
warning: pear/PEAR requires package &quot;pear/Console_Getopt&quot; (recommended version 1.2.3)
warning: pear/PEAR requires package &quot;pear/XML_Util&quot; (recommended version 1.2.1)
downloading PEAR-1.9.0.tgz ...
Starting to download PEAR-1.9.0.tgz (291,634 bytes)
.............................................................done: 291,634 bytes
install ok: channel://pear.php.net/PEAR-1.9.0
PEAR: Optional feature webinstaller available (PEAR's web-based installer)
PEAR: Optional feature gtkinstaller available (PEAR's PHP-GTK-based installer)
PEAR: Optional feature gtk2installer available (PEAR's PHP-GTK2-based installer)
PEAR: To install optional features use &quot;pear install pear/PEAR#featurename&quot;
Installing bootstrap package: Structures_Graph.......install ok: channel://pear.php.net/Structures_Graph-1.0.3
Downloading and installing package: Archive_Tar-stable.......downloading Archive_Tar-1.3.5.tgz ...
Starting to download Archive_Tar-1.3.5.tgz (17,184 bytes)
...done: 17,184 bytes
install ok: channel://pear.php.net/Archive_Tar-1.3.5
Downloading and installing package: Console_Getopt-stable.......downloading Console_Getopt-1.2.3.tgz ...
Starting to download Console_Getopt-1.2.3.tgz (4,011 bytes)
...done: 4,011 bytes
install ok: channel://pear.php.net/Console_Getopt-1.2.3

******************************************************************************
WARNING!&Acirc;&nbsp; The include_path defined in the currently used php.ini does not
contain the PEAR PHP directory you just specified:
&amp;lt;/usr/share/PEAR&amp;gt;
If the specified directory is also not in the include_path used by
your scripts, you will have problems getting any PEAR packages working.


Would you like to alter php.ini &amp;lt;/etc/php.ini&amp;gt;? [Y/n] : Y

php.ini &amp;lt;/etc/php.ini&amp;gt; include_path updated.

Current include path&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp; : .:
Configured directory&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp; : /usr/share/PEAR
Currently used php.ini (guess) : /etc/php.ini
Press Enter to continue:

The 'pear' command is now at your service at /usr/bin/pear
[root@server usr]# /etc/init.d/httpd restart
Stopping httpd:&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp; [&Acirc;&nbsp; OK&Acirc;&nbsp; ]
Starting httpd:&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp;&Acirc;&nbsp; [&Acirc;&nbsp; OK&Acirc;&nbsp; ]</pre></p>
]]></content:encoded>
			<wfw:commentRss>http://www.vankouteren.eu/blog/2010/01/pear-install-on-linux-by-a-n00b-for-n00bs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Upgrading Plesk &#8211; Useful commands</title>
		<link>http://www.vankouteren.eu/blog/2010/01/upgrading-plesk-useful-commands/</link>
		<comments>http://www.vankouteren.eu/blog/2010/01/upgrading-plesk-useful-commands/#comments</comments>
		<pubDate>Wed, 13 Jan 2010 12:46:33 +0000</pubDate>
		<dc:creator>Patrick van Kouteren</dc:creator>
				<category><![CDATA[Plesk]]></category>
		<category><![CDATA[commands]]></category>
		<category><![CDATA[upgrade plesk]]></category>

		<guid isPermaLink="false">http://www.vankouteren.eu/blog/?p=180</guid>
		<description><![CDATA[I've been upgrading Plesk today and yesterday. Although Plesk has a nice interface, it's not 100% clear in what happens. After some help on the FreeNode #plesk IRC channel and some cyberciti.biz pages, I've composed some details and commands to execute at the command line which can help when upgrading Plesk. To Start Plesk /etc/init.d/psa [...]]]></description>
			<content:encoded><![CDATA[            <script type="text/javascript" src="http://www.vankouteren.eu/blog/wp-content/plugins/wordpress-code-snippet/scripts/shBrushSql.js"></script>
            <script type="text/javascript" src="http://www.vankouteren.eu/blog/wp-content/plugins/wordpress-code-snippet/scripts/shBrushPhp.js"></script>
            <script type="text/javascript" src="http://www.vankouteren.eu/blog/wp-content/plugins/wordpress-code-snippet/scripts/shBrushCpp.js"></script>
<p>I've been upgrading Plesk today and yesterday. Although Plesk has a nice interface, it's not 100% clear in what happens. After some help on the FreeNode #plesk IRC channel and some cyberciti.biz pages, I've composed some details and commands to execute at the command line which can help when upgrading Plesk.</p>
<p><span id="more-180"></span><strong>To Start Plesk</strong></p>
<pre>/etc/init.d/psa start</pre>
<p><strong>To Stop Plesk</strong></p>
<pre>/etc/init.d/psa stop</pre>
<p><strong>Upgrade through autoinstaller</strong></p>
<pre>/usr/local/psa/admin/bin/autoinstaller</pre>
<p><strong>Restart apache</strong></p>
<pre>/etc/init.d/httpd restart</pre>
<p><strong>Check the running processes.</strong></p>
<p>The first column represents the owner. The second column contains the process id.</p>
<p><a href="http://www.cyberciti.biz/faq/kill-process-in-linux-or-terminate-a-process-in-unix-or-linux-systems/" target="_blank">Source</a></p>
<pre>ps aux | grep autoinstall</pre>
<p>or</p>
<pre>ps u</pre>
<p><strong>Killing a process</strong></p>
<pre>kill -9 [processid]</pre>
<p><strong>Backup an RPM database and rebuild it.</strong></p>
<p><a href="http://www.cyberciti.biz/faq/how-can-i-backup-the-rpm-database/" target="_blank"> source 1</a></p>
<p><a href="http://www.cyberciti.biz/tips/tag/rpm-rebuilddb" target="_blank">source 2</a></p>
<p><em>Remove any stale lock file</em></p>
<pre>/bin/rm -f /var/lib/rpm/__db*</pre>
<p><em>Back up the /var/lib/rpm directory</em></p>
<pre>tar czvf $(hostname).rpmdatabase.tar.gz /var/lib/rpm</pre>
<p>If your hostname is linux-server, it will save backup to a file called linux-server.rpmdatabase.tar.gz<br />
<em>Rebuild the rpm db</em></p>
<pre>rpm --rebuilddb</pre>
<p>Many thanks also go out to 'koor' who helped me at the #plesk IRC channel at FreeNode.</p>
<p><strong>Collision of RPM files (RPM already exists)<br />
</strong></p>
<p>When upgrading I encountered a collision of an RPM file which already existed. Because of that the upgrade could not proceed. A solution to that is presented <a href="http://forums.theplanet.com/index.php?showtopic=85964" target="_blank">here</a> in the last post. It comes down to:</p>
<ul>
<li>Navigating to the folder which holds the rpm file (e.g. cd  /root/psa/PSA_8.1.0/dist-rpm-RedHat-el3-i386/base)</li>
<li>Forcing an update on the RPM. (e.g. rpm -U --force --nodeps psa-8.1.0-rhel3.build81061129.22.i586.rpm)</li>
</ul>
<p>Running the updater after repairing the file will solve the problem.</p>
<p><strong>SSH connection is refused</strong><br />
I had this problem once. After a little search I found <a href="http://coastalweb.ca/system-administration/how-to-start-sshd-on-plesk.html">this</a> post. It's brilliant! From Plesk itself you start a cronjob (run it as root user) which (re)starts (or use restart instead of start) the ssh daemon. After that my problem was solved.</p>
<p><strong>Virtual hosts</strong><br />
By default Plesk has a pre-defined 'behavior' of a domain. This includes some settings for PHP like safe mode and open basedir restrictions. By default these settings are stored in a file called 'httpd.include' in the folder</p>
<pre>/var/www/vhosts/yourdomain.ext/conf/</pre>
<p>You can edit this file to change the behavior of the domain, but changes in this file are just temporary. Once the file is reloaded your changes will be gone.<br />
To permanently make changes you need to create or edit a file called 'vhost.conf' which is located in the same directory. When loading the httpd.include file, the webserver also checks if this vhost.conf file exists and if so, it includes it. How you can create this virtual host file can be found on <a href="http://webhostingneeds.com/Disable_open_basedir_in_plesk">this</a> page.</p>
<p><strong>Apache logs</strong><br />
The apache log files are located at</p>
<pre>/var/log/httpd/</pre>
<p><strong>Webserver config</strong><br />
The webserver (httpd) config is located at</p>
<pre>/etc/httpd/conf/httpd.conf</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.vankouteren.eu/blog/2010/01/upgrading-plesk-useful-commands/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

