cPanel/WHM Successful logins

For getting the successful cPanel/WHM logins, using the following commands. For getting the successful cPanel logins. cat /usr/local/cpanel/logs/session_log | grep “myuser” | grep “NEW .*app=cpaneld” # “myuser” is cPanel username xx.xx.xx.xx [09/11/2015:13:17:40 -0000] NEW myuser:bOMyuserz8hKvThis1XUgnISnh4AWMMXSampleKgHE3lString1JpnOSiK5a45t3 address=122.165.84.98,app=cpaneld,creator=myuser,method=handle_form_login,path=form,possessed=0 For gettign successful WHM logins cat /usr/local/cpanel/logs/session_log | grep “root” | grep “NEW .*app=whostmgrd” # Use required WHM user … Read more

Prevent .htaccess file modification while running easyapache

Most of the time, the recompilation process of Apache/php with Easyapache with WHM/cPanel server will be effected the users’ .htaccess file. Most probably the entries like “AddHandler” will be commented state. We can prevent the .htaccess file modification from the WHM tweak settings. In WHM-> Server Configuration -> Tweak Settings -> System set Depth to … Read more

Error : “Identifier removed: couldn’t grab the accept mutex” in apache error logs

Apache was getting stopped automatically with the below logs in the Apache Error log:

[Tue Jul 22 22:29:35 2014] [alert] Child 30758 returned a Fatal error… Apache is exiting!
[Tue Jul 22 22:29:35 2014] [emerg] (43)Identifier removed: couldn’t grab the accept mutex
[Tue Jul 22 22:29:35 2014] [emerg] (43)Identifier removed: couldn’t grab the accept mutex
[Tue Jul 22 22:29:35 2014] [emerg] (43)Identifier removed: couldn’t grab the accept mutex

These type of errors occur on systems low on memory or file handlers.The AcceptMutex directives sets the method that Apache uses to serialize multiple children accepting requests on network sockets.

One suggested resolution for the error message would be to try adding the following line to /usr/local/apache/conf/httpd.conf file:

AcceptMutex fcntl

If you add this above “<IfModule prefork.c>” in tht file, you could then try running these commands to distill the change and restart Apache:

Read more

Install ImageMagick on cPanel Server

ImageMagick® is a software suite to create, edit, compose, or convert bitmap images. It can read and write images in a variety of formats (over 100) including DPX, EXR, GIF, JPEG, JPEG-2000, PDF, PNG, Postscript, SVG, and TIFF. Use ImageMagick to resize, flip, mirror, rotate, distort, shear and transform images, adjust image colors, apply various … Read more

[ERROR] /usr/sbin/mysqld: Can’t open file

 

I got this error while migrating  huge amount of accounts from one cpanel server to  another.

[ERROR] /usr/sbin/mysqld: Can’t open file: ‘./dbname/tablename.frm’ (errno: 24)

errno: 24 means there is too many open files.  There is a mysql variable named “open_files_limit"  which shows how many open files are allowed in mysql by default. We cannot update this valuse using “Set”  command as this variable is a read only variable.

Read more

Danger behind cPanel account restore – Shared hosts..be careful!

Today I have been playing with my test cPanel server. I thought to have some look into the reseller settings today and I found a serious anomaly while my works. On now..what it is…

I know very rarely we need the “All Features (warning: total and complete access)” privilege granted for a reseller. Because that privilege will give root level access to the reseller on the server, which is not allowed. So generally no-one with a root level WHM access is not able to create a reseller with all privileges. So it is obvious that anyone with root privilege ( like VPS owners ) can create “all privilege” reseller. Now what happened when we restore such a reseller to a server? What changes does it make compared to a normal user or a reseller without any privilege? So far I couldn’t find any. I couldn’t find any specific messages or difference in restore process for a normal user, reseller without “all” privilege” or with “all” privilege. I could find the following common message only with any of them ( in fact the admins I found don’t worry about the restore messages until they find any specific error while restoration )

Read more

Premature end of script headers: wredirect.cgi

If you are getting Internal Server Error while doing /webmail /whm /cpanel , please check the apache error log.

For us it was like the below error

[Tue Oct 08 08:14:44 2013][error][client x.x.x.x] Premature end of script headers: wredirect.cgi
[Tue Oct 08 08:14:44 2013][error][client x.x.x.x] File does not exist: /home/user/public_html/500.shtml

A temporary fix is to disable Suexec from WHM from the drop down at  Home »Service Configuration »Configure PHP and suEXEC and save. But in this case you are compromising the security.

This is actually a known bug  and if you are using cagefs then please do the below steps to fix this permanently

cagefsctl --remount-all
service proxyexecd restart

Read more

How to check a website in a remote server before DNS change

In all migrations, we may wish to check the domain’s functionality and fix any errors preset  to make the dns change smoother and perfect. So just thought to add this in our blog too 🙂

Some control panel offer site preview, especially Plesk using which we can take a look on domain  hosted in that domain. But in others like cPanel, Directadmin and those without any control panels, we may need to check this using  local hosts file or by changing the A record on a temporary basis.

Best method is to check websites using your local “hosts” file in your PC / Laptop. Below is the steps using which one can test a website hosted in a remote server without changing the name server.

For Windows

1.  Locate the hosts file in your computer. Typically it is in one of the following locations:

Windows NT/2000/XP/2003/Vista/7   —     C:\windows\system32\drivers\etc\hosts
Windows 95/98/Me                                         —     C:\windows\hosts

Read more

ntVersionCheck : New release v1.1.0

cPanel plugin for finding the outdated applications in the server. Currently the plugin is configured for wordpress and joomla installations.

Features

  • Find all outdated wordpress and joomla applications in the cPanel Server
  • Display the wordpress and joomla versions with color difference for visibility
  • News, Announce the latest news related with application vulnerabilities and plugin updates
  • The installations are grouped by user and reseller wise
  • One click update available for future releases

    Read more