title: Running PHP 5.3 on CentOS 5.4 - fatal error Class 'PDO' not found
body: <p>What is the best way to get PHP 5.3 up and running on CentOS 5.4.
  My machine says I have PHP 5.3 installed but running into an issue with my script that says
  Fatal error: Class 'PDO' not found in /var/www/html/lib/rb.php on line 45
  It fails trying to new up a PDO class in the RedbeanPHP 3.0 lib.</p>
  
  <p>How can I fix this missing PDO problem?</p>
  
  <p>I tried to follow these instructions:
  from <a href="http://www.computingunplugged.com/issues/issue201102/00002619002" rel="nofollow">http://www.computingunplugged.com/issues/issue201102/00002619002</a>  </p>
  
  <pre><code>rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm  
  rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm  
  # THIS LINE FAILED FOR ME
  rpm -Uvh http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/i386/ius-release-1.0-6.ius.el5.noarch.rpm  
  
  yum erase php php-pear php-mysql php-cli php-common  
  
  yum install php53u php53u-pear php53u-cli php53u-common php53u-gd  
  yum install php53u-mbstring php53u-mcrypt php53u-mysql php53u-soap  
  yum install php53u-xml php53u-xmlrpc php53u-bcmath  
  </code></pre>
  
  <p><strong>UPDATE</strong><br>
  Someone removed their answer. It was good. I'm putting it back in with exact steps.
  First I had to yum install php53u-devel<br>
  To quote "<br>
  You need the PDO extension. Usually the best way to install extensions is via PECL.  </p>
  
  <p>Before you can install any PECL extensions you need to install the php5-dev package  </p>
  
  <blockquote>
    <p>sudo pecl install pdo<br>
    sudo pecl install pdo_mysql<br>
    You then need add the following to the end of your php.ini file(s). Depending on which version of PHP you installed they’ll be /etc/php5/apache2/php.ini, /etc/php5/cgi/php.ini and /etc/php/cli/php.ini.  </p>
  </blockquote>
  
  <p>extension=pdo.so<br>
  extension=pdo_mysql.so<br>
  "</p>
  
  <p>Now I get a mysql_query_missing when trying to run sudo pecl install pdo_mysql<br>
  and not sure how to get past this.</p>