I'm trying to configure my VPS which has cpanel installed to enable PDO support for the PHP5 build on the machine. Whenever I use the /scripts/easyapache script I have no option to enable PDO anywhere. I've even modified the profiles.
I can see that "--disable-pdo" is being implemented somewhere, but I don't know where.
Can anyone suggest how I enable PDO support and maintain PHP version 5?
This will bring up an editor that lets you edit your php config line. Delete all lines but the one that contains the config line (one of the first few lines) with CTRL+K.
2. Remove all of the quotation marks from the config line. It will look something like this:
./configure '--with-abc' '--with-def' ...
Turn it into:
./configure --with-abc --with-def
All on a single line -- very important!
3. Still editing the "phpcompile" file, add the proper CFLAGS for your system's architecture above. So for example, on our 950D box, we have this line at the very top, and our php configure directive below it:
You can find the proper line for your stepping if you google about a bit. This really helps the binary out! Note the -O3 flag as well, also very important. You can also consider adding the --enable-inline-optimization flag to your PHP configure directive. It makes for a fatter, yet faster binary. Nonetheless (digressing, sorry!) in this case you'll want to add the proper PDO directives in the config line at this step.
4. Save phpcompile, exit the editor.
5. Download the PHP source from php.net
6. Unpack the source tar.gz, and copy your phpcompile to its directory, and run it.. ie:
7. If your CPanel's configure directive was accurate (50/50 chance here it seems) then everything will go through without a hitch! You may have to install missing client headers or includes though. If you have yum this is a piece of cake, ex:
#yum install libpng-devel
8. # make && make install
After this you have recompiled PHP. May need to clean up your httpd.conf after the above is complete.
Source builds are better, faster, etc. Avoid easyapache like the plague.
Hope this post helps someone!
circlical - hosting software development forums * blog