500 Internal Server Errors are one of the most common PHP issues that I see customer experience, and it will occur mostly on servers with suPHP or PHP running as CGI. These errors can be caused by something on the server, or an issue on the user’s site. Here ‘s what you should do if…
Read more
By default, cPanel supports the usage of one dedicated IP per account. However, you can get around this by editing just a few files on the server. Here are the steps: 1. Edit /var/cpanel/userdata/$user/$subdomain.$maindomain for each subdomain (for addon domains you’ll usually edit the file for the subdomain associated with the addondomain) and change the…
Read more
This is a simple bash script I wrote to fix the permissions and ownership of files within a cpanel account. To use, simply copy the script your server, chmod 755, and pass the usernames as arguments: ./fixperms user1 user2 user3 You can also run a server-wide loop like this: for i in `ls -A /var/cpanel/users`…
Read more
Passive FTP is not enabled with pure-ftp by default. To enable this, edit /etc/pure-ftpd.conf and uncomment out this line: PassivePortRange 30000 50000 This means that FTP will answer passively on the range of ports between 30000 and 50000, so you may want to narrow the scope to something like 30000 to 35000. Once you do…
Read more
When adding an email forwarder you may see an error like this: Fatal! Write Failure: /etc/valiases/thecpaneladmin.com. Ignore any messages of success this can only result in failure! To fix this, run (replace user with username and domain with the domain name) chown user:mail /etc/valiases/domain.com chmod 644 /etc/valiases/domain.com…
Read more
I recently saw an issue on one of our servers where we were trying to enable Zend Optimizer and IonCube Loaders, but they just won’t show up on a phpinfo page despite showing up via command line: -bash-3.2# php -v PHP 4.4.9 (cli) (built: May 4 2010 13:55:07) Copyright (c) 1997-2008 The PHP Group Zend…
Read more
One of the servers here at work was giving a 500 Internal Server error whenever a PHP page was loaded. Among the various things that can cause this error when you’re running PHP in CGI mode (suPHP), this error showing up in the Apache log was most unusual. Turns out it’s due to the suphp…
Read more
In your Exim logs you may see errors like this: Warning: ACL “warn” statement skipped: condition test deferred: ratelimit database not available temporarily rejected connection in ?connect? ACL: ratelimit database not available This likely means the Exim cache databases are corrupted. You can clear them by running: rm -fv /var/spool/exim/db/* Then restart Exim. The files…
Read more
In cPanel 11.25, you may be seeing errors like this in /var/log/exim_paniclog: 2010-04-15 12:33:27 failed to expand condition “${if exists {$home/etc/$domain/quota}{${if > {${lookup{$local_part}lsearch{$home/etc/$domain/quota}{$value}{0}}}{0}{${if eq {${if exists {$home/mail/$domain/$local_part/maildirsize}{1}{0}}}{0}{${if > {${run {/usr/local/cpanel/bin/eximwrap GETDISKUSED $local_part $domain}}}{${lookup{$local_part}lsearch{$home/etc/$domain/quota}{$value}{0}}}{true}{false}}}{${perl{checkuserquota}{$domain}{$local_part}{$message_size}{${lookup{$local_part}lsearch{$home/etc/$domain/quota}{$value}}}{$home/mail/$domain/$local_part/maildirsize}}}}}{false}}}{false}}” for virtual_user_maildir_overquota router: absolute value of integer “10485760000” is too large (overflow) To fix this, run : /scripts/reset_mail_quotas_to_sane_values –force –confirm –verbose…
Read more
There are three ways to change a site’s IP address on a cPanel server: Via WHM: Go to WHM > Change site’s IP Address , select the account, then select the IP Via Command Line: /usr/local/cpanel/bin/setsiteip -u $user $ip Manually: (This is also useful for changing the IP address of a single domain in an…
Read more