Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

On Ubuntu 12.04 server I had PHP 5.4.9 installed from the source:

./configure --prefix=/etc/php --with-apxs2=/etc/apache2/bin/apxs --with-config-file-path=/etc/php --with-config-file-scan-dir=/etc/php/conf.d --with-libxml-dir=/usr/local/libxml2 --with-xsl=/usr/local/libxslt --with-mysql --with-zlib --with-pdo-mysql --enable-calendar --with-gd --with-iconv-dir --enable-mbstring --enable-soap --enable-sockets --enable-zip --with-curl --with-openssl --with-kerberos --with-tidy'

Then, using apt-get, I had mysql server and phpMyAdmin installed. Unfortunatelly phpMyAdmin keep saying that 'mysqli' and 'mcrypt' not installed. php -m | grep mysqli just confirms it.

So I tried to install mysqli with "apt-get install php5-mysqli", but just got message to do it by means of "php5-mysqlnd" or "php5-mysql". Even though they are already installed (according to phpinfo()) I tried - doesn't work. However, in php.ini, there's mysqli staff like "extension=php_mysqli.dll", but no "extension=mysqli.so". And block [MySQLi] with some uncommented settings also present.

Since this is my first attempt to build php from source I reckon I did some silly mistake. Any help is greatly appreciated.

UPD: PROBLEM SOLVED 1. To enable mcrypt extension (http://sourceforge.net/projects/mcrypt/files/) 1.1 download, unpack, config, compile and install Libmcrypt library

wget http://downloads.sourceforge.net/project/mcrypt/Libmcrypt/2.5.8/libmcrypt-2.5.8.tar.gz tar xf libmcrypt-2.5.8.tar.gz cd libmcrypt-2.5.8 ./configure make && make install

1.2 download, unpack, config (I added desirable path: ----prefix=/usr/local/mcrypt), compile and install mcrypt

wget http://downloads.sourceforge.net/project/mcrypt/MCrypt/2.6.8/mcrypt-2.6.8.tar.gz tar xf lmcrypt-2.6.8.tar.gz cd lmcrypt-2.6.8 ./configure --prefix=/usr/local/mcrypt make && make install

2.to install mysqli I followed proposed options of configuring php taken from http://php.net/manual/en/mysqli.installation.php

./configure --with-mysql=/usr/bin/mysql_config \ --with-mysqli=mysqlnd \ --with-pdo-mysql=mysqlnd [other options]

So after installing Libmcrypt, mcrypt in /usr/local/mcrypt and adding changes to configuration of php I had finally succeeded. The final config looks this way:

./configure --prefix=/etc/php --with-apxs2=/etc/apache2/bin/apxs --with-config-file-path=/etc/php --with-config-file-scan-dir=/etc/php/conf.d --with-libxml-dir=/usr/local/libxml2 --with-xsl=/usr/local/libxslt --with-mysql --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-mcrypt=/usr/local/mcrypt --with-zlib --enable-calendar --with-gd --with-iconv-dir --enable-mbstring --enable-soap --enable-sockets --enable-zip --with-curl --with-openssl --with-kerberos --with-tidy --with-pcre-regex

P.S: Note that to run this you would need download, config, compile and install libxml, libxslt, prce, mcrypt, Libmcrypt

share|improve this question
    
If you've resolved your problem, please accept the answer that solved your problem (or post your own answer, if the solution was different, and accept it). This way others know that the problem is resolved. –  Michael Hampton Dec 5 '12 at 14:32

1 Answer 1

If you need PHP with mcrypt and mysql support, where are --with-mcrypt --with-mysqli options?

share|improve this answer
1  
Please ignore my previous comment (which I've deleted, but I know it still shows up in your feed) as I made a mistake –  Mark Henderson Dec 4 '12 at 22:48

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.