August 19th, 2008
This error message can be caused by an improper shut down, the apache processes are still hanging around and apachectl restart won’t work.
Solution
just kill off the hanging processes:
# fuser 80/tcp
80/tcp: 3010 3702 4088 16754
# kill -n 9 3010
# kill -n 9 3702
# kill -n 9 4088
# kill -n 9 16754
# apachectl start
or if there’s loads of processes use
# for i in $(fuser 80/tcp);do kill -n 9 $i;done
to kill them all off
Posted in General, Linux, WHM/cPanel | No Comments »
May 13th, 2008
Moving domains from client to client in Plesk is pretty quick from the command line. Just replace DOMAIN with the domain name you want to move and CLIENTLOGIN with the client’s username:
/usr/local/psa/bin/domain.sh --update DOMAIN -clogin CLIENTLOGIN
Posted in Plesk | No Comments »
May 13th, 2008
The AWStats package in RHEL4/Centos4 and Plesk 8.1 uses an alias directory for the icons called /awstats-icon, but when the AWStats contents is generated, the icon directory is different (/icon). To fix this issue, change this file:
/usr/share/awstats/awstats_buildstaticpages.pl
my $DirIcons='/awstats-icon';
Posted in Plesk | No Comments »
May 13th, 2008
If you get this error, you’ve most likely done a file-based MySQL backup restore, and the InnoDB files are hosed. The horde_sessionhandler table isn’t a MyISAM table at all - it’s actually an InnoDB table. The easiest way to fix the issue is to stop MySQL and trash the .frm:
# /etc/init.d/mysqld stop
# rm /var/lib/mysql/horde/horde_sessionhandler.frm
Now start MySQL and re-create the table:
# /etc/init.d/mysqld start
# mysql -u admin -p`cat /etc/psa/.psa.shadow`
Here’s the SQL statements to run:
CREATE TABLE horde_sessionhandler (session_id VARCHAR(32) NOT NULL, session_lastmodified INT NOT NULL, session_data LONGBLOB, PRIMARY KEY (session_id)) ENGINE = InnoDB;
GRANT SELECT, INSERT, UPDATE, DELETE ON horde_sessionhandler TO horde@localhost;
You’re good to go!
Posted in Plesk | No Comments »
May 13th, 2008
If you find yourself in the situation where you need to bulk add SPF records to every domain in Plesk, you can use this huge one-liner:
mysql -u admin -p`cat /etc/psa/.psa.shadow` psa -e “select dns_zone_id,displayHost from dns_recs GROUP BY dns_zone_id ORDER BY dns_zone_id ASC;” | awk ‘{print “INSERT INTO dns_recs (type,host,val,time_stamp,dns_zone_id,displayHost,displayVal) VALUES (’\”TXT’\”,’\””$2″‘\”,’\”v=spf1 a mx ~all’\”,NOW(),”$1″,’\””$2″‘\”,’\”v=spf1 a mx ~all’\”);”}’ | mysql -u admin -p`cat /etc/psa/.psa.shadow` psa
Then you’ll need to make Plesk write these changes to the zone files:
# mysql -Ns -uadmin -p`cat /etc/psa/.psa.shadow` -D psa -e ’select name from domains’ | awk ‘{print “/usr/local/psa/admin/sbin/dnsmng update ” $1 }’ | sh
You can check your work by viewing the new entries you made:
mysql -u admin -p`cat /etc/psa/.psa.shadow` psa -e “SELECT * FROM dns_recs WHERE type=’TXT’;”
Posted in Plesk | No Comments »
May 13th, 2008
If you find that Horde (with Plesk) keeps refreshing when you attempt to log in, and there are no errors logged on the screen or in Apache’s logs, check the session.auto_start variable in /etc/php.ini.
If session.auto_start is set to 1, set it to 0 and Horde will miraculously start working again.
Posted in Plesk | No Comments »
May 13th, 2008
If you have an open_basedir restriction that is causing issues with a domain, you can remove the restriction easily. First, put the following text in /home/httpd/vhosts/[domain]/conf/vhost.conf:
<Directory /home/httpd/vhosts/[domain]/httpdocs>
php_admin_value open_basedir none
</Directory>
If there was already a vhost.conf in the directory, then just reload Apache. Otherwise, run the magic wand:
/usr/local/psa/admin/bin/websrvmng -av
Then reload Apache:
/etc/init.d/httpd reload
Posted in Plesk | No Comments »
May 13th, 2008
If this situation pops up in Plesk, it means that a user has changed their MySQL password outside of Plesk. The password in Plesk’s own database does not match, so the auto-creation of the phpMyAdmin settings fails. You’ll end up seeing this after clicking “DB WebAdminâ€:
MySQL said: Non-static method PMA_Config::isHttps() should not be called statically
The funny thing is that MySQL doesn’t actually say this. It’s a PHP error. To correct the problem, you can manually change the password within Plesk’s database, or you can follow an easier method:
Click Databases
Click Database Users
Click the user that has a password change
In the password fields, enter the new password that they’re using with MySQL
This will force Plesk to change its password in its own database, and it will run the query to change the password in MySQL (but since it’s the same password, no change will be made).
Posted in Plesk | No Comments »
May 13th, 2008
If you’re working in Plesk and you receive this error:
mchk: Unable to initialize quota settings for someuser@somedomain.com
Run this command to fix the issue, but be patient:
find /var/qmail/mailnames -type d -name '.*' ! -name '.spamassassin' -ls -exec touch '{}'/maildirfolder \; -exec chown popuser:popuser '{}'/maildirfolder \;
Posted in Plesk | No Comments »
May 13th, 2008
When creating or restoring a account i get the following error.
Missing HOMEMATCH Config Line in /etc/wwwacct.conf
Solution:
Steps to correct problem.
1. Log into the WHM as root (not a reseller)
2. Click ‘Basic cPanel/WHM Setup’
3. Scroll down to ‘Home Directory Prefix’, and put /home in the text-field.
4. Scroll down and click save
That’s it, now try to create or restore a account.
Posted in WHM/cPanel | No Comments »