You are not logged in.
Pages: 1
I just switched to Arch Linux - wish I found it earlier!
Just one problem now that I can't find a solution in the FAQ/FORUMS etc....
I'm using Noodle (appropriately in my case) and downloaded Apache and php, so I've got php version 5.1.2.1. It works fine, but I need to use the mcrypt functions. They don't work because the extension library mcrypt.so is not present.
I downloaded the package libmcrypt, but this doesnt seem to include the php extension library....
Is there a way to get this from the Arch repositories? I don't really want to download the entire php source from php.net and spend ages compiling and configuring.
Perhaps this should be in the "idiots" forum? Please excuse my ignorance, but I am not a php expert.
Thanks in advance
Offline
Hi,
The arch's php package did not contains mcrypt module. You need to recompile libmcrypt with a different option (look at the php's doc) and recompile php.
Have a look to the wiki for making package.
Good luck
Offline
No need to recompile the whole php package. You can build mcrypt as shared extension. Try the following PKGBUILD:
# $Id: PKGBUILD,v 1.2 2006/02/21 16:10:42 juergen Exp $
# Maintainer: Juergen Hoetzel <juergen@hoetzel.info>
pkgname=php-mcrypt
pkgver=5.1.2
pkgrel=1
pkgdesc="php nterface to the mcrypt library"
url="http://www.php.net/mcrypt"
depends=("php=$pkgver" "libmcrypt")
makedepends=("gcc")
source=(http://www.php.net/distributions/php-$pkgver.tar.gz)
md5sums=('ed3d099828282e66c66cadd8d879d739')
build() {
cd $startdir/src/php-$pkgver/ext/mcrypt/
phpize || return 1
./configure || return 1
make || return 1
make INSTALL_ROOT=$startdir/pkg install
}
And add
extension=mcrypt.so
to your /etc/php.ini
Disadvantage: Fixed dependency on php-version. But this prevents me from breaking my package when PHP Extension API changes
Offline
juergen>
According to the php's official doc, libmcrypt needs to be compiled with this option :
--disable-posix-threads
The arch's libmcrypt pkg did not have this option.
So you need at least to recompil libmcrypt.
however, your method for a shared extension is a very good idea !
Regards
Offline
juergen>
According to the php's official doc, libmcrypt needs to be compiled with this option :--disable-posix-threads
The php guys dont explain 'why to disable this feature'.
I don't really know if this is a relict from old days (when php was not thread-safe). But i have some php mcrypt scripts deployed without problems yet.. Maybe i'm just in luck
Jürgen
Offline
Thanks for help, all (esp. Joergen). I'm quite pleased with myself, I worked out from your help how to build the extension and it all works perfectly!
I didn't bother to recompile libmcrpyt....
Offline
Pages: 1