cPanel FTP and MySQL General Information and Error Log files
FTP: Logins and General Errors.
General information and login attempts are logged here
FTP Transactions
This is a symbolic link in most cases to /usr/local/apache/domlogs/ftpxferlog, which contains a history ofthe transactions made by FTP users.
MySQL: General Information and Errors
/var/lib/mysql/$(hostname).err
This path could vary, but is generally located in /var/lib/mysql. Could also be located at /var/log/mysqld.log
Most commonly accessed cpanel log files.
When investigating any issue, the first thing you should always do is check the log files, as they generally provide insight as to what’s causing the erroneous behavior.
The following is a break down of the most commonly accessed log files, for cPanel and cPanel managed services:
/usr/local/cpanel/logs/error_log
cPanel logs any error it incurs here. This should always be the first place you look when you encounter errors or strange behavior in cPanel/WHM.
/usr/local/cpanel/logs/license_log
All license update attempts are logged here. If you run into any license errors when logging in, check here.
/usr/local/cpanel/logs/stats_log
The stats daemon (cpanellogd) logs the output from all stats generators (Awstats, Webalizer, Analog) here.
/usr/local/cpanel/logs/access_log
General information pertaining to cPanel requests is logged here (Client Information, Request URI)
Easy Apache 3 & PHP
cPanel recommends that only one version of PHP is selected so that configuration and management is simplified.
When only one version of PHP is installed, a CGI binary is installed to /usr/bin/php and a CLI binary is installed to /usr/local/bin/php.
When both PHP4 and PHP5 are enabled, PHP5 will be installed to the standard locations /usr/bin/php and /usr/local/bin/php. PHP4 will be installed in /usr/php4/bin/php and /usr/local/php4/bin/php.
EasyApache 3 includes the ability to install, uninstall or update several popular PHP extensions as part of the Apache and PHP build process. When EasyApache runs it will automatically determine which extensions are active in main php.ini file at /usr/local/lib/php.ini. Active extensions will automatically be selected in the EasyApache 3 interface.
Rerunning EasyApache 3 is not required to enable or disable the standard PHP extensions. cPanel 11 provides a tool called /scripts/phpextensionmgr that can also be used for installation or removal.
Run the below command for detailed information.
/scripts/phpextensionmgr –help
What to Do If MySQL Keeps Crashing on your cPanel Server
First, you should try to find out whether the problem is that the mysqld server dies or whether your problem has to do with your client. You can check how long your mysqld server has been up by executing mysqladmin version. If mysqld has died and restarted, you may find the reason by looking in the server’s error log.
There may be some internal lock problem. mysqladmin -u root processlist usually is able to make a connection even in these cases, and can provide useful information about the current number of connections and their status.
Run the command mysqladmin -i 5 status or mysqladmin -i 5 -r status in a separate window to produce statistics while you run your other queries.
Stop the mysqld server with mysqladmin shutdown, run myisamchk from the data directory to check all MyISAM tables, and restart mysqld.
myisamchk –silent –force */*.MYI
Using myisamchk for Crash Recovery in cPnael
If you run mysqld with external locking disabled (which is the default), you cannot reliably use myisamchk to check a table when mysqld is using the same table.
If the server is run with external locking enabled, you can use myisamchk to check tables at any time. In this case, if the server tries to update a table that myisamchk is using, the server will wait for myisamchk to finish before it continues.
If you use myisamchk to repair or optimize tables, you must always ensure that the mysqld server is not using the table (this also applies if external locking is disabled). If you do not stop mysqld, you should at least do a mysqladmin flush-tables before you run myisamchk. Your tables may become corrupted if the server and myisamchk access the tables simultaneously.
When performing crash recovery, it is important to understand that each MyISAM table tbl_name in a database corresponds to the three files in the database directory shown in the following table.
File Purpose
tbl_name.frm Definition (format) file
tbl_name.MYD Data file
tbl_name.MYI Index file
Each of these three file types is subject to corruption in various ways, but problems occur most often in data files and index files.
myisamchk works by creating a copy of the .MYD data file row by row. It ends the repair stage by removing the old .MYD file and renaming the new file to the original file name.
This does a complete and thorough check of all data (-e means “extended check”). It does a check-read of every key for each row to verify that they indeed point to the correct row. This may take a long time for a large table that has many indexes. Normally, myisamchk stops after the first error it finds. If you want to obtain more information, you can add the -v (verbose) option. This causes myisamchk to keep going, up through a maximum of 20 errors.
Reference: http://dev.mysql.com/