CPanel operations (and/or "Validating account details") never complete

Question:

Q: When I try to add a CPanel server, iPanel/iHost appears to "hang" and/or a timeout occurs. Q: When I try to provision an account on a CPanel server, iPanel/iHost appears to "hang" and/or a timeout occurs. Q: When I place an order for a CPanel account, iPanel/iHost displays "We are currently validating your account details. This may take a few moments." but it never completes, and/or a timeout occurs.

How do I resolve any of these issues?

Answer:

These issues are all the result of PHP bug #42682, which affects certain point releases of PHP v5.2. Note that this is a PHP bug, not an iPanel/iHost issue, however we have created a workaround for affected servers. If you encounter this problem, add the following to your conf/conf.inc.php file:

define('USE_STREAM_SELECT',false);

This will force iPanel/iHost to use an alternate (less efficient) method to wait for data on the socket connection to CPanel, thus avoiding the bug in PHP.