cPanel PEAR Installer Errors

A new feature in cPanel 11/x3 is the PEAR module installer that allows users to install their own PEAR modules locally in their account.  I’ve heard that a lot of servers with existing PHP installations have had problems getting this to work, and instead are prompted with this error:

X-Powered-By: PHP/5.2.3
Content-type: text/html

Parse error: syntax error, unexpected T_STRING in /usr/local/cpanel/base/frontend/x3/module_installers/live_install.html on line 8


As far as I know there are two causes for this problem:

1.  /usr/bin/php is missing or is not compiled with PEAR or CLI.  Some servers have a CGI and CLI binary installed, so you’ll need to symlink /usr/local/bin/php to /usr/bin/php:

ln -s /usr/local/bin/php /usr/bin/php

2.  Your PHP installation is compiled without CLI support (–disable-cli), which is common when compiling PHP as a CGI binary or for suPHP.  If you have an installation with CLI enabled you will need to link that binary to /usr/bin/php, otherwise compile a second copy with the command line interface enabled.

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.