I've done this many times:
sudo aptitude install php5-mcrypt
sudo apache2ctl restart
aptitude says mcrypt is installed. I've reinstalled it 3 times already. I've restarted apache about 20 times since I installed it. When I look at phpInfo, I do not see mcrypt listed. When I try to execute my code it says the mcrypt function (pick one - any one) does not exist. mcrypt is clearly not enabled.
Does anyone have any idea what could be wrong? I do not know which pieces should be where and how all this is supposed to fit together.
I installed PHP 5.5.3
apt-get
/aptitude
), too? The packagephp5-mcrypt
can only configure the extension forphp.ini
s it "knows" about. Secondly, I don't now ifapache2ctl
reloads the modules. The "normal" way to restart Apache would be something likesudo service apache2 restart
. Third, how is PHP connected to your Apache? If you use something like (f)cgi or php-fpm (in contrast to mod-php), you probably will to have restart PHP on its own, additionally to restarting Apache. – Henning Kockerbeck Sep 30 '13 at 18:30php.ini
is listed in the output ofphpinfo
(about 5th to 7th entry)? It should be a file in/etc/php5/
. If you search in that file formcrypt
, what does come up? – Henning Kockerbeck Sep 30 '13 at 19:00mcrypt
package. That's the command line program that uses libmcrypt, as does the PHP extension. So you need to make sure the packagelibmcrypt4
is installed. Is there aphp.ini
snippet at/etc/php5/conf.d/mcrypt.ini
? That should load the lib. Is that snippet loaded by PHP (seephpinfo
)? Again, have you tried to restart Apache withsudo service apache2 restart
instead ofapache2ctl
? – Henning Kockerbeck Sep 30 '13 at 22:13