Oct 23

whm/cpanel – SoftException in Application.cpp: Directory / is not owned by

in a sudden,all website throw out “500 internal server error”. i got those message from apache error log:

[Tue Oct 22 16:28:27 2013] [error] [client 95.108.217.252] SoftException in Application.cpp:592: Directory / is not owned by falc0961
[Tue Oct 22 16:28:27 2013] [error] [client 95.108.217.252] Premature end of script headers: index.php

Yes, the php is runnning in su_php mode. so this maybe caused by permission.i got no clue after i check the doc root of the related website. the owner and permission is ok.

At last i put my attention on the error log

—- SoftException in Application.cpp:592: Directory / is not owned by falc0961.

i don’t know why it check the root directory.but when i found out that the root is belong to some user id other than root user.so i fix the problem with the simple chown command as:

chown root.root /

(it was casued by copying some directory content to root directory,which overwrite the . file.)

 

Aug 19

javascript — open lots of urls in new tab

Sometimes,i need to open a lot of url to finish some work.so i need a javascript code to save time.i can run them from firebug console.

Source code    
var domains = ['url1','url2','url3'];
for(i in domains) {
    window.open(domains[i]);
}

The url to assign main shared ip to a reseller acct in WHM:

/cpsess3712993106/scripts2/dodelegatemainip?mainip=212.117.179.142&user=share033

The url to change ip of a domain/acct

/cpsess3808654605/scripts2/changeip?oldip=212.117.179.90&customip=212.117.179.96&user=airjoruk

 

Aug 16

WHM — How to create acct from command line

how to create a whm reseller acct and assign a domain?WHM/Cpanel comes with a lot of script located in /script  directory. The /script/wwwacct can be usefull to create acct from ssh. So to create a new acct,we need to take a look at its syntax,run the command below from ssh:

/script/wwwacct

It will print:

Please use the this syntax
wwwacct <domain> <user> <pass> <quota> <cpmod[advanced/?]> <ip[y/n]> <cgi[y/n]> <frontpage[y/n]> <maxftp> <maxsql> <maxpop> <maxlst> <maxsub> <bwlimit> <hasshell[y]/[n]> <owner> <plan> <maxpark> <maxaddon> <featurelist> <contactemail> <use_registered_nameservers> <language>

So,we need to supply domain,user ,pass etc,for example,

/scripts/wwwacct abcd.com abcd  ‘password’  0 x3 y y y 0 0 0 0 0 0 n root 0 0 0 ” ” 0 en

This can be very usefull if you need to create a lot of new acct. The drawback is that we need to confirm for every acct.The comfirmation may can be bypassed  with sleep and echo command.