Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

installing mcrypt on a debian server

Status
Not open for further replies.

keak

Programmer
Sep 12, 2005
247
CA
Hi there,
I installed mycrypt for my php

Code:
deephouse:/# apt-get install php4-mcrypt
Reading Package Lists... Done
Building Dependency Tree... Done
php4-mcrypt is already the newest version.

and my php version is:

Code:
php -v
PHP 4.4.0 (cli) (built: Jul 20 2006 06:34:02)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
    with Zend Extension Manager v1.0.9, Copyright (c) 2003-2006, by Zend Technologies
    with Zend Optimizer v2.6.2, Copyright (c) 1998-2006, by Zend Technologies


however, when I print out phpinfo(), i don't see mcrypt listed there.
I've rebooted both php and mysql on my server. Is there anything I am doing worng here?


Many thanks :)

 
I think you have to edit php.ini file. It should behave like a Apache/PHP module.

Cheers


QaTQat

Life is what happens when you are making other plans.
 
I looked into the doc.
I believe that is only for a windows server that we edit this php.ini?


;Windows Extensions
;Note that MySQL and ODBC support is now built in, so no dll is needed for it.

;extension=php_mcrypt.dll
 
Here is what I found on PHP site

Installation:
You need to compile PHP with the --with-mcrypt[=DIR] parameter to enable this extension. DIR is the mcrypt install directory. Make sure you compile libmcrypt with the option --disable-posix-threads


More at:

You may need to remove tha package and install from source without using APT.

CHeers

QatQat

Life is what happens when you are making other plans.
 
QatQat was right in his first response; you need to edit the php.ini file to contain the line "extension=mcrypt.so".

Just tested on my Debian machine. With that line, "mcrypt" shows up in phpinfo; without that line, it doesn't.

php.ini is certainly not "only for a Windows server."



The "requirement" that you build [tt]--with-mcrypt[/tt] is only to ensure that the module gets built. The Debian version will likely have been compiled [tt]--without-mcrypt[/tt], but that won't prevent the core executable from using the module once you actually get it there by installing [tt]php4-mcrypt[/tt].

So no building from source should be necessary to get mcrypt working.
 
Thanks chipper.

Good info.

QatQat

Life is what happens when you are making other plans.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top