|
Hello -
I’m getting the following two error messages on the Configuration page of the Magento Installation Wizard:
a) PHP Extension “pdo_mysql” must be loaded
b) PHP Extension “curl” must be loaded
Basically my main questions right now are:
1) What directory do I put the PHP extensions in once I’ve compiled them - and are there any other things that need to be set in the php.ini file in order to make PHP use these extensions?
2) How do I change the PHP Configuration Command to enable pdo?
When I use my browser to show php_info(), it does not say that curl, pdo or pdo_mysql extensions are installed.
Here’s my php_info() link:
http://net247.cc/info.php
This is VPS server with root access.
I’m also a little nervous about enabling curl, because many people are saying that enabling it made their existing PHP sites stop working…
http://www.google.com/search?num=100&hl;=en&safe;=off&q;=enable+"php_curl"&btnG;=Search
...because in addition to trying to install Magento I do have some existing Drupal sites which are already working fine.
I’m using nginx + PHP-FPM as the webserver instead of Apache (as I have heard that nginx + PHP-FPM is 5x faster than Apache in many cases), following the instructions here:
http://www.ruby-forum.com/topic/177888
a) To install the PHP pdo_mysql extension (and pdo extension), I followed the instructions below:
http://paradigma.pt/ja/slog/index.php/2006/10/pdo_mysql_ubuntu_error_fixed.html
I did the following on my Debian Etch server:
$ sudo pecl install pdo
$ PHP_PDO_SHARED=1
$ sudo pecl install pdo_mysql
Then I tried to find my php.ini file by doing:
$ sudo find / -name php.ini
which returned:
/usr/local/lib/php.ini
/etc/php5/apache/php.ini
Since I’m using nginx instead of Apache, I ignored the second file above and edited the first file by doing:
$ sudo nano /usr/local/lib/php.ini
I hit Alt-/ to go to end-of-file in the nano editor, and I appended the following lines to the end of the file:
extension=pdo.so
extension=pdo_mysql.so
I’m not sure if these *.so files are actually in the right directory so as to be usable by PHP. If I search for them using the following commands I get the following:
$ sudo find / -name pdo.so
/usr/lib/php5/20060613+lfs/pdo.so
/usr/local/lib/php/extensions/no-debug-non-zts-20060613/pdo.so
$ sudo find / -name pdo_mysql.so
/usr/local/lib/php/extensions/no-debug-non-zts-20060613/pdo_mysql.so
As mentioned earlier, I’m unsure what exactly my PHP extensions directory is - since php_info() says that it’s “./” but I don’t know what the “current” directory is.
b) To install the
PHP curl extension, I did:
$ sudo apt-get install php5-curl
Then I did:
$ sudo nano /usr/local/lib/php.ini
and appended following line to the end of the file:
extension=curl.so
After doing these steps, I stopped and started my webserver to reload the php.ini file using the following commands:
$ sudo /etc/init.d/nginx start
$ sudo /etc/init.d/nginx stop
Although the “pdo_mysql” and “curl” extensions are now apparently installed on my server, I’m not sure if and the PHP extensions_dir in the php.ini file(s) and the PHP Configure Command are set properly in order to make these two PHP extensions actually available. (In addition, I don’t remember how or when or if I set the PHP Configure Command, or how I could change it now.)
The information shown when my browser displays php_info() includes the following:
1) the PHP Configure Command
----------------------------
‘./configure’ ‘--enable-fastcgi’ ‘--enable-fpm’ ‘--with-mcrypt’ ‘--with-zlib’ ‘--enable-mbstring’ ‘--with-openssl’ ‘--with-mysql’ ‘--with-mysql-sock’ ‘--with-gd’ ‘--with-jpeg-dir=/usr/lib’ ‘--enable-gd-native-ttf’ ‘--without-sqlite’ ‘--disable-pdo’ ‘--disable-reflection’
I am concerned about the option ‘--disable-pdo’ here. Should I change this option to something like ‘--enable-pdo’ - or should I delete it? If so, how do I do this?
2) the PHP extensions_dir
-------------------------
./
I realize that this means “the current directory”, and I understand that this is the location where my extensions should be placed.
However, I have no idea what “the current directory” is.
Is it the directory where my PHP source code is installed?
Also, when I “installed” the PHP pdo, pdo_mysql and curl extensions on Debian, thereby creating the files pdo.so, pdo_mysql.so, and curl.so, do these files automatically get placed in whatever the PHP “extension_dir” is? Or do I have to copy them in there.
If I have to copy them into the “PHP extensions directory”, how do I find out what directory this is?
Doing a ‘find’ to look for these files, I saw that pdo.so and pdo_mysql.so were located here:
$ ls /usr/local/lib/php/extensions/no-debug-non-zts-20060613
pdo_mysql.so pdo.so xcache.so
So I did a ‘find’ to look for the file ‘curl.so’, which was in:
/usr/lib/php5/20060613+lfs/curl.so
and I copied it into:
/usr/local/lib/php/extensions/no-debug-non-zts-20060613/
and restarted my webserver and then reloaded the Magento Installation Wizard page to see if that would at least get rid of the error message about the PHP curl extension (on the assumption that the error message about the PHP pdo_mysql extension won’t go away until I also do something about the ‘--disable-pdo’ option in the PHP Configure Command).
But I’m still getting the same error messages.
Maybe I need to put the *.so files in a different directory - and maybe I need to enable pdo in the PHP Configuration Command. But I don’t know what directory that might be, or how to change the PHP Configuration Command.
I also want to make sure that whatever I do doesn’t mess up my existing PHP installation - which is already working fine serving some Drupal sites.
If anyone has any idea how to solve these configuration problems I’d be very appreciative!
Thanks,
Stefan Scott Alexander
|