Allows you to search a variety of questions and answers
Source: http://www.directadmin.com/forum/showthread.php?t=24448
I just recently had to do this so I thought I might as well share. There are a few threads already with some info, but it's not entirely complete in my opinion.
Let's get started.
1) First off, issue this command to check your pear/pecl config:
Code:
pecl config-show
This will show you your config. Now if your /tmp is mounted noexec, skip the following and jump to step 2) now.
My /tmp is mounted noexec and instead of messing with it, I just changed the config to a local writable directory.
Your config-show should have:
Code:
Code:
PEAR Installer cache directory cache_dir /tmp/pear/cache PEAR Installer download download_dir /tmp/pear/cache PEAR Installer temp directory temp_dir /tmp/pear/temp
Take note of the /tmp paths.
Type and execute:
Code:
Code:
pear config-set cache_dir /root/tmp/pear/cache pear config-set download_dir /root/tmp/pear/cache pear config-set temp_dir /root/tmp/pear/temp
Feel free to change the path to your own liking.
2) Now we will install pdo and pdo_mysql extensions.
Type and execute:
Code:
Code:
pecl install pdo pecl install pdo_mysql
Now check your extensions directory to make sure they were installed. For my purposes they were in /usr/local/lib/php/extensions/no-debug-non-zts-20060613.
You should see pdo.so and pdo_mysql.so there.
3) Next you will need to re-compile PHP5. Before doing so, edit the configure file and add the following:
Code:
Code:
--enable-pdo=shared \ --with-pdo-mysql=shared \ --with-sqlite=shared \ --with-pdo-sqlite=shared \
Next recompile PHP with your method of choice.
4) Last step is to edit your /usr/local/lib/php.ini file.
Change your extension_dir to:
Code:
Code:
extension_dir = /usr/local/lib/php/extensions/no-debug-non-zts-20060613
or
Code:
extension_dir = /usr/local/lib
Change this path if yours is different.
Scroll down and add the following extensions:
Code:
Code:
extension=pdo.so extension=pdo_mysql.so
Exit and save your php.ini.
5) Restart httpd and open up a phpinfo.php file. You should now see pdo/pdo_mysql entries.
TROUBLESHOOTING
A) If you are receiving the following warning/error:
Code:
Code:
PHP Warning: PHP Startup: Invalid library (maybe not a PHP library) 'pdo_mysql.so' in Unknown on line 0
Try restarting mysqld first.
AYK Solutions offers unmatched top tier support. They have gone above and beyond time and time again. They are very pompt, highly knowlegeable and curtious. I have been using AYK for 4 years now and yup its easy to say they have earned a customer for life. Thank you so much for helping me and business excell. Regards, Johnny
The most caring provider AYKSolutions is a reliable hosting and decicated server probider with good uptimes etc etc, which nowadays is a must for any copany in the hosting industry, But what makes them stand out from cowd - is there sincere care for their customers. AYK stuff is always asking you about problems you have and doing their best to solve the problems and help yo ur business to grow. Best support ever!
AYKsolutions - best solution for small/high business I have several plans with them and i can sleep well because their team watch over my servers. I started with a small shared account and now, after two years i have multiple dedicated boxes. I like the way they treat their customers, even if they have a small or a big plan. Their tehnical support is the best i ever meet ( worked with many hosting pro viders ). In one word: If you need cheap and no headache for your internet bussiness, AYKsolutions it's your best choice