Making MCrypt Work In OSX CLI Terminal Apps

OSX Terminal runs a different version of PHP to Apache by default, so smashing "php blah.php" into the command line can have different results to the same script run via browser.

You might notice this if you get an error such as "Call to undefined function mcrypt_decrypt()". Frustrating.


Edit your .profile file (or maybe .bash_profile) and add the betterer php binary folder to your path:

export PATH=.:/usr/local/php5/bin:$PATH


Comments

Popular posts from this blog

Installing LAMP Apache/MySQL/PHP on Chromebook/Chromebox

Installing Ubuntu Linux on your ChromeBox/ChromeBook

Changing your Mac OSX Terminal's default text editor