I need help on How to: Enable PCNTL in Ubuntu PHP.
$ mkdir /tmp/phpsource
$ cd /tmp/phpsource
$ wget http://museum.php.net/php5/php-5.3.2.tar.gz
$ tar xvf php-5.3.2.tar.gz
$ cd php-5.3.2/ext/pcntl
$ phpize -bash: phpize: command not found
Everything went fine until I tried to run phpize! And then I get the error '-bash: phpize: command not found' ?? Any ideas?
UPDATE ran:
$ sudo apt-get update
and then ran:
$ sudo apt-get install php5-dev
With the help of Nick I managed to finish the procedure. But 'make test' fails???
$ phpize
$ ./configure
$ make
$ cp modules/pcntl.so /usr/lib/php5/20090626/
$ echo "extension=pcntl.so" > /etc/php5/conf.d/pcntl.ini
$ make test - FAILED!
HELP: I typed 'echo "extension=pcntl.so > /etc/php5/conf.d/pcntl.ini' instead of 'echo "extension=pcntl.so" > /etc/php5/conf.d/pcntl.ini' the first time I ran this. Is that BAD?
--------------------------------- Make TEst Error Messages --------------------------------------
PHP Deprecated: Comments starting with '#' are deprecated in /tmp/phpsource/php-5.3.2/ext/pcntl/tmp-php.ini on line 1850 in Unknown on line 0
PHP Deprecated: Comments starting with '#' are deprecated in /tmp/phpsource/php-5.3.2/ext/pcntl/tmp-php.ini on line 1852 in Unknown on line 0
PHP Deprecated: Comments starting with '#' are deprecated in /tmp/phpsource/php-5.3.2/ext/pcntl/tmp-php.ini on line 1850 in Unknown on line 0
PHP Deprecated: Comments starting with '#' are deprecated in /tmp/phpsource/php-5.3.2/ext/pcntl/tmp-php.ini on line 1852 in Unknown on line 0
PHP Warning: Module 'pcntl' already loaded in Unknown on line 0
Warning: Module 'pcntl' already loaded in Unknown on line 0
PHP Deprecated: Comments starting with '#' are deprecated in /tmp/phpsource/php-5.3.2/ext/pcntl/tmp-php.ini on line 1850 in Unknown on line 0
PHP Deprecated: Comments starting with '#' are deprecated in /tmp/phpsource/php-5.3.2/ext/pcntl/tmp-php.ini on line 1852 in Unknown on line 0
PHP Warning: Module 'pcntl' already loaded in Unknown on line 0
Warning: Module 'pcntl' already loaded in Unknown on line 0
=====================================================================
PHP : /usr/bin/php
PHP_SAPI : cli
PHP_VERSION : 5.3.2-1ubuntu4.18
ZEND_VERSION: 2.3.0
PHP_OS : Linux - Linux lvps217-8-253-63.vps.webfusion.co.uk 2.6.32-042stab068.8 #1 SMP Fri Dec 7 17:06:14 MSK 2012 x86_64
INI actual : /tmp/phpsource/php-5.3.2/ext/pcntl/tmp-php.ini
More .INIs :
CWD : /tmp/phpsource/php-5.3.2/ext/pcntl
Extra dirs :
VALGRIND : Not used
=====================================================================
TIME START 2013-01-02 23:05:56
=====================================================================
FAIL Test pcntl wait functionality [tests/001.phpt]
FAIL pcntl: pcntl_sigprocmask(), pcntl_sigwaitinfo(), pcntl_sigtimedwait() [tests/002.phpt]
FAIL pcntl: SIG_BLOCK, SIG_UNBLOCK, SIG_SETMASK [tests/003.phpt]
FAIL Bug #47566 (return value of pcntl_wexitstatus()) [tests/bug47566.phpt]
FAIL pcntl_alarm() [tests/pcntl_alarm.phpt]
FAIL pcntl_exec() [tests/pcntl_exec.phpt]
FAIL pcntl_exec() 2 [tests/pcntl_exec_2.phpt]
FAIL pcntl_exec() 3 [tests/pcntl_exec_3.phpt]
FAIL Test function pcntl_fork() by calling it with its expected arguments [tests/pcntl_fork_basic.phpt]
FAIL Test function pcntl_fork() by testing the process isolation in the forking hierarchy father -> son -> grandson where father can not knows his grandson [tests/pcntl_fork_variation.phpt]
FAIL pcntl_signal() [tests/pcntl_signal.phpt]
FAIL pcnt_signal_dispatch() [tests/pcntl_signal_dispatch.phpt]
FAIL pcntl_wait() [tests/pcntl_wait.phpt]
FAIL Closures as a signal handler [tests/signal_closure_handler.phpt]
=====================================================================
TIME END 2013-01-02 23:05:59
=====================================================================
TEST RESULT SUMMARY
---------------------------------------------------------------------
Exts skipped : 0
Exts tested : 44
---------------------------------------------------------------------
Number of tests : 14 14
Tests skipped : 0 ( 0.0%) --------
Tests warned : 0 ( 0.0%) ( 0.0%)
Tests failed : 14 (100.0%) (100.0%)
Expected fail : 0 ( 0.0%) ( 0.0%)
Tests passed : 0 ( 0.0%) ( 0.0%)
---------------------------------------------------------------------
Time taken : 3 seconds
=====================================================================
=====================================================================
FAILED TEST SUMMARY
---------------------------------------------------------------------
Test pcntl wait functionality [tests/001.phpt]
pcntl: pcntl_sigprocmask(), pcntl_sigwaitinfo(), pcntl_sigtimedwait() [tests/002.phpt]
pcntl: SIG_BLOCK, SIG_UNBLOCK, SIG_SETMASK [tests/003.phpt]
Bug #47566 (return value of pcntl_wexitstatus()) [tests/bug47566.phpt]
pcntl_alarm() [tests/pcntl_alarm.phpt]
pcntl_exec() [tests/pcntl_exec.phpt]
pcntl_exec() 2 [tests/pcntl_exec_2.phpt]
pcntl_exec() 3 [tests/pcntl_exec_3.phpt]
Test function pcntl_fork() by calling it with its expected arguments [tests/pcntl_fork_basic.phpt]
Test function pcntl_fork() by testing the process isolation in the forking hierarchy father -> son -> grandson where father can not knows his grandson [tests/pcntl_fork_variation.phpt]
pcntl_signal() [tests/pcntl_signal.phpt]
pcnt_signal_dispatch() [tests/pcntl_signal_dispatch.phpt]
pcntl_wait() [tests/pcntl_wait.phpt]
Closures as a signal handler [tests/signal_closure_handler.phpt]
ANY ideas!?!
Carl
Here's what I've found in Ubuntu 12.04:
Check your PHP.ini for the pnctl functions being disabled.
disable_functions = pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority
phpinfo reports the function is already loaded but it will not actually work without putting the pcntl.ini file into /etc/php5/conf.d.
Sadly, this causes 'module already loaded' errors every time PHP session cleanup cron in /etc/cron.d kicks off, but PCNTL won't function without both of these pieces in place, and so far I haven't found a good solution to disable the 'already loaded' error. Its messy, and ugly, and spams my root mail, and when I can find a solution, I will post it. I've only run into this problem in 12.04 so far.
UPDATE
I hacked my /usr/lib/php5/maxlifetime script file to stop spamming with pnctl errors (PHP Warning: Module 'pcntl' already loaded in Unknown on line 0). Here are my edits - I specifically added in the 'E_DEPRECATED' line to quiet the messages.
Line 8:
cur=$(php5 -c /etc/php5/${sapi}/php.ini -d "error_reporting='E_ALL & ~E_DEPRECATED'" -r 'print ini_get("session.gc_maxlifetime");' 2> /dev/null)
There is some steps like this:
(my OS is debian7.2 xfce x86).
1: i install pcntl like this
#mkdir php
#cd php
#apt-get source php5
#cd php5-5.4.4/ext/pcntl
#phpize
#./configure
#make
#echo "extension=pcntl.so" > /etc/php5/mods-available/pcntl.ini
#ln -s /etc/php5/mods-available/pcntl.ini /etc/php5/conf.d/pcntl.ini
2: when is restart nginx or apache2, the php get one warning.
"PHP Warning: Module ‘pcntl’ already loaded in Unknown on line 0"
3: so i
"rm -rf /etc/php5/mods-available/pcntl.ini and
/etc/php5/conf.d/pcntl.ini"
4: edit the "php.ini" file .
a.apache2, it's in "/etc/php5/apache2/php.ini"
b.cgi like nginx,it's in "/etc/php5/cgi/php.ini"
make the
"disable_functions = pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited..."
comments, add " ; " in front of "disable_functions".
restart your server and the warning gone.good luck.
On my dev machine with ubuntu 12.10 (and earlier versions too) pcntl is/was already enabled.
$ php -m | grep pcntl
pcntl
I guess thats the problem:
PHP Warning: Module 'pcntl' already loaded in Unknown on line 0
So just don't install it again.
I NEEDED to restart the server! And now it works! Doh.. Thanks for everybodys input.
In Ubuntu 15.04, the pcntl is installed in the php CLI, but disabled by default. To enable, edit /etc/php5/cli/php.ini and comment out the line:
disable_functions = pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
If you want these enabled in apache2, then edit the file /etc/php5/apache2/php.ini and make the same change.
It may be advisable to only remove the functions you need to use, in order to preserve as much of the security restrictions as possible.
Related
I'm a bit new on ArchLinux but I have installed PHP 7 with pacman and after that Xdebug but Xdebug install the package php ( that is PHP 8 ).
When I tried to launch PHP 7 I got the following message and Xdebug doesn't work:
PHP Warning: Failed loading Zend extension 'xdebug.so' (tried: /usr/lib/php7/modules/xdebug.so (/usr/lib/php7/modules/xdebug.so: undefined symbol: zend_type_to_string), /usr/lib/php7/modules/xdebug.so.so (/usr/lib/php7/modules/xdebug.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
That's my /etc/php7/conf.d/xdebug.ini
zend_extension=xdebug.so
;xdebug.remote_enable=on
;xdebug.remote_host=127.0.0.1
;xdebug.remote_port=9000
;xdebug.remote_handler=dbgp
;xdebug.start_with_request=yes
;xdebug.mode=debug
So if someone have the solution :)
I had the same problem.
So, I uninstalled PHP 8 and installed Xdebug for PHP 7.4:
yay -S xdebug7
I found the solution here !
$ asp update xdebug
$ asp export xdebug
After that i updated the PKGBUILD
$ cat PKGBUILD
--------------------------------------------------------------------
# Maintainer: Sergej Pupykin <pupykin.s+arch#gmail.com>
# Maintainer: Jonathan Wiersma <arch aur at jonw dot org>
# Contributor: Jonathan Wiersma <arch aur at jonw dot org>
# Contributor: sracker <smb.sac#gmail.com>
pkgname=xdebug-php7
pkgver=3.0.2
pkgrel=2
pkgdesc="PHP debugging extension for php7"
arch=('x86_64')
url="https://www.xdebug.org"
license=('GPL')
depends=('php7')
backup=('etc/php/conf.d/xdebug.ini')
source=("https://xdebug.org/files/xdebug-${pkgver}.tgz"
'xdebug.ini')
sha256sums=('096d46dec061341868d3e3933b977013a592e2e88992b2c0aba7fa52f87c4e17'
'7c66883dc2ade69069ef84e30188b25630748aa9c8b0dd123727c00505421205')
build() {
cd "$srcdir"/xdebug-${pkgver}
phpize7
./configure --prefix=/usr --enable-xdebug
make
}
package() {
cd "$srcdir"/xdebug-${pkgver}
make INSTALL_ROOT="$pkgdir" install
install -D -m 644 "$srcdir"/xdebug.ini "$pkgdir"/etc/php7/conf.d/xdebug.ini
}
--------------------------------------------------------------
And then i did that
makepkg -s -i -r
Hey guys i have a little error i am trying to integrate mongoDB in my symfony project :) But when i do php bin/console i have this error :
PHP Warning: Module 'mongodb' already loaded in Unknown on line 0
Could not open input file: bin/console
I think that happens when i add mongodb.so in my php.ini.
I think if i resolve this it will resolve my error with mongoDB that i explain there : link to other post
Thx for all that will try to help :p
nb : i have composer version 1.6.5 and php 7
Update : I did composer update and that what it returns now when i do php bin/console :
PHP Warning: Module 'mongodb' already loaded in Unknown on line 0
Symfony 3.4.14 (kernel: app, env: dev, debug: true)
Usage:
command [options] [arguments]
Options:
-h, --help Display this help message
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi Force ANSI output
-n, --no-interaction Do not ask any interactive question
-e, --env=ENV The Environment name. [default: "dev"]
--no-debug Switches off debug mode.
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal > output, 2 for more verbose output and 3 for debug
Available commands:
about Displays information about the > current project ....
I got that when i do php --ini :
Loaded Configuration File: /etc/php.ini
Scan for additional .ini files in: /etc/php.d
Additional .ini files parsed: /etc/php.d/20-bcmath.ini,
/etc/php.d/20-bz2.ini,
/etc/php.d/20-calendar.ini,
/etc/php.d/20-ctype.ini,
/etc/php.d/20-curl.ini,
/etc/php.d/20-dom.ini,
/etc/php.d/20-exif.ini,
/etc/php.d/20-fileinfo.ini,
/etc/php.d/20-ftp.ini,
/etc/php.d/20-gd.ini,
/etc/php.d/20-gettext.ini,
/etc/php.d/20-iconv.ini,
/etc/php.d/20-json.ini,
/etc/php.d/20-mbstring.ini,
/etc/php.d/20-mysqlnd.ini,
/etc/php.d/20-pdo.ini,
/etc/php.d/20-phar.ini,
/etc/php.d/20-simplexml.ini,
/etc/php.d/20-sockets.ini,
/etc/php.d/20-sqlite3.ini,
/etc/php.d/20-tokenizer.ini,
/etc/php.d/20-xml.ini,
/etc/php.d/20-xmlwriter.ini,
/etc/php.d/20-xsl.ini,
/etc/php.d/30-mysqli.ini,
/etc/php.d/30-pdo_mysql.ini,
/etc/php.d/30-pdo_sqlite.ini,
/etc/php.d/30-wddx.ini,
/etc/php.d/30-xmlreader.ini,
/etc/php.d/50-mongodb.ini
CentOS release 6.7 (centos-release-6-7.el6.centos.12.3.x86_64)
kernel 2.6.32-573.22.1.el6.x86_64
We had successfully built the mongo-php-driver with the instructions found here
Last week I spun up a new instance, patched it via yum update, and tried to build - and I'm consistently getting this error now:
>> make install
Installing shared extensions: /usr/lib64/php/modules/
>> service php-fpm restart
Stopping php-fpm: [ OK ]
Starting php-fpm: [12-Apr-2016 14:38:39] NOTICE: PHP message: PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/mongodb.so' - /usr/lib64/php/modules/mongodb.so: undefined symbol: bson_decimal128_from_string in Unknown on line 0
The build returns no errors, and seems to build the bson libraries as it goes:
checking for uint64_t... yes
... seen our uintptr_t in stdint.h (uint64_t too)
creating ./src/libbson/src/bson/bson-stdint.h : ___SRC_LIBBSON_SRC_BSON_BSON_STDINT_H
checking for int_least32_t... yes
checking for int_fast32_t... yes
..adding include stdint.h
... seen good stdint.h inttypes
... seen good uint64_t
... DONE ./src/libbson/src/bson/bson-stdint.h
* snip *
Build configuration:
CFLAGS : -g -O2
Extra CFLAGS : -pthread
Developers flags (slow) :
Code Coverage flags (extra slow) :
System mongoc : no
System libbson : no
LDFLAGS :
EXTRA_LDFLAGS :
MONGODB_SHARED_LIBADD : -lsasl2 -lssl -lcrypto -lrt
So far I have tried (and failed):
Deleting the mongodb.so file, repulling from github, and rebuilding
Descending into the src/libbson directory, building there, then
ascending and building again
Removing any packages containing bson (which include libbson and libbson-devel) using yum, in case it was building agains the wrong lib
My google-fu has failed me, and I can't find anything on SO about it. Anyone hit this kind of issue, or know a fix?
I've recently downloaded the latest version of CodeSniffer (1.3.RC0). I prefer this version and not the stable one (1.2.2) because I want the "severity" feature.
I've modified an existing Drupal standard package to be compatible with this version of CodeSniffer and stablish my own severity policy. When I run the phpcs from command-line, I've no problems at all. It sniffs the code correctly, filters severity and works fine.
The problem comes when I try to automate the sniffs with the subversion pre-commit hook. It seems that the phpcs-svn-pre-commit script coming with this release is not working at all.
I've followed the guide in http://pear.php.net/manual/en/package.php.php-codesniffer.svn-pre-commit.php step-by-step, but when I commit a file with coding standard errors (detected by command-line execution of phpcs and my Drupal standard package), subversion simply lets the file pass and commits the changes.
Has anybody been in the same problem?
Thanks in advance.
EDITED: execution examples.
$ phpcs --standard=Drupal --severity=4 ak_gourmet.module
PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/mcrypt.ini on line 1 in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626/IcePHP.so' - /usr/lib/php5/20090626/IcePHP.so: cannot open shared object file: No such file or directory in Unknown on line 0
FILE: ...ce/trunk/httpdocs/sites/all/modules/custom/ak_gourmet/ak_gourmet.module
--------------------------------------------------------------------------------
FOUND 21 ERROR(S) AFFECTING 27 LINE(S)
--------------------------------------------------------------------------------
17 | ERROR | Concat operator must be surrounded by spaces. Found "...
| | '<p>'. "; expected "... . "
17 | ERROR | Concat operator must be surrounded by spaces. Found "...
| | .'</p>';..."; expected "... .;..."
40 | WARNING | A comma should follow the last multiline array item. Found:
| | MENU_NORMAL_ITEM
53 | WARNING | A comma should follow the last multiline array item. Found:
...
Line added in subversion pre-commit hook (it is being executed):
# execute code sniffer with drupal standards
/usr/bin/scripts/phpcs-svn-pre-commit --standard=Drupal --severity=4 "$REPOS" -t "$TXN" >&2 || exit 1
Committing the incorrect file:
$ svn commit -m "Testing svn hook-precommit" ak_gourmet.module
Enviando ak_gourmet.module
Transmitiendo contenido de archivos .
Commit de la revisión 5814.
So I'm trying to install mcrypt on my local for development. I've never compiled from source before, so please bear with me, but the short of what I've done is:
Download and install libmcrypt-2.5.8 (from source)
Download compiled mcrypt.so from http://www.viames.it/mac-os-x.html (note: the compiled gd.so seems to work fine)
Update php.ini (to include relevant lines)
Restart web sharing (apache); pages can't be loaded
Remove extension=mcrypt.so line and restart apache, pages load again)
Download PHP 5.2.8 source from php.net, and try to configure and install mcrypt from /ext/mcrypt
At this point, when I run make test, things fail.
Number of tests : 36 36
Tests skipped : 0 ( 0.0%) --------
Tests warned : 0 ( 0.0%) ( 0.0%)
Tests failed : 36 (100.0%) (100.0%)
Expected fail : 0 ( 0.0%) ( 0.0%)
Tests passed : 0 ( 0.0%) ( 0.0%)
Just in case anyway, I went ahead and did sudo make install, update php.ini, and tried to load pages. Pages loaded fine. I went to my phpinfo page, but mcrypt isn't shown there at all. I went back and forth on this a couple of times, but nothing happened still.
I'm confused about what to do now, as I'm not sure what I was supposed to do when the make tests failed, which is, I suspect, why my mcrypt isn't working at all (even if the .so file is there). I'm including the make test failed summary result below.
Any help would be greatly appreciated :)
FAILED TEST SUMMARY
---------------------------------------------------------------------
Test for blowfish compatibility [tests/blowfish.phpt]
Bug #35496 (Crash in mcrypt_generic()/mdecrypt_generic() without proper init). [tests/bug35496.phpt]
Bug #37595 (mcrypt_generic calculates data length in wrong way) [tests/bug37595.phpt]
Bug #41252 (Calling mcrypt_generic without first calling mcrypt_generic_init crashes) [tests/bug41252.phpt]
Bug #46010 (warnings incorrectly generated for iv in ecb mode) [tests/bug46010.phpt]
Bug #8040 (MCRYPT_MODE_* do not seem to exist) [tests/bug8040.phpt]
mcrypt_cbc [tests/mcrypt_cbc.phpt]
mcrypt_cbf [tests/mcrypt_cbf.phpt]
mcrypt_create_iv [tests/mcrypt_create_iv.phpt]
mcrypt_decrypt [tests/mcrypt_decrypt.phpt]
mcrypt_ecb [tests/mcrypt_ecb.phpt]
mcrypt_enc_get_algorithms_name [tests/mcrypt_enc_get_algorithms_name.phpt]
mcrypt_enc_get_block_size [tests/mcrypt_enc_get_block_size.phpt]
mcrypt_enc_get_iv_size [tests/mcrypt_enc_get_iv_size.phpt]
mcrypt_enc_get_key_size [tests/mcrypt_enc_get_key_size.phpt]
mcrypt_enc_get_modes_name [tests/mcrypt_enc_get_mode_name.phpt]
mcrypt_enc_get_supported_key_sizes [tests/mcrypt_enc_get_supported_key_sizes.phpt]
mcrypt_enc_is_block_algorithm [tests/mcrypt_enc_is_block_algorithm.phpt]
mcrypt_enc_is_block_algorithm_mode [tests/mcrypt_enc_is_block_algorithm_mode.phpt]
mcrypt_enc_is_block_mode [tests/mcrypt_enc_is_block_mode.phpt]
mcrypt_enc_self_test [tests/mcrypt_enc_self_test.phpt]
mcrypt_get_block_size [tests/mcrypt_get_block_size.phpt]
mcrypt_get_cipher_name [tests/mcrypt_get_cipher_name.phpt]
mcrypt_enc_get_iv_size [tests/mcrypt_get_iv_size.phpt]
mcrypt_get_key_size [tests/mcrypt_get_key_size.phpt]
mcrypt_list_algorithms [tests/mcrypt_list_algorithms.phpt]
mcrypt_list_modes [tests/mcrypt_list_modes.phpt]
mcrypt_module_get_algo_block_size [tests/mcrypt_module_get_algo_block_size.phpt]
mcrypt_module_get_algo_key_size [tests/mcrypt_module_get_algo_key_size.phpt]
mcrypt_module_get_supported_key_sizes [tests/mcrypt_module_get_supported_key_sizes.phpt]
mcrypt_module_is_block_algorithm [tests/mcrypt_module_is_block_algorithm.phpt]
mcrypt_module_is_block_algorithm_mode [tests/mcrypt_module_is_block_algorithm_mode.phpt]
mcrypt_module_is_block_mode [tests/mcrypt_module_is_block_mode.phpt]
mcrypt_module_open [tests/mcrypt_module_open.phpt]
mcrypt_module_self_test [tests/mcrypt_module_self_test.phpt]
mcrypt_ofb [tests/mcrypt_ofb.phpt]
Install Xcode via the AppStore
Install MacPorts (http://guide.macports.org/#installing.macports)
Install libmcrypt using port
port install libmcrypt
Download PHP source (http://php.net/downloads.php)
Compile the extension before installing it
cd /directory/to/php/source/ext/mcrypt
phpize .
./configure \
--with-php-config=`which php-config` \
--with-mcrypt=/opt/local
make
sudo make install