Installing mcrypt on OSX 10.8.2 - PHP 5.3.15 with homebrew
First check if brew is up-to-date:brew doctor
Second install mcrypt based on php version:brew install php53-mcrypt
NB: Step three below is not required on recent versions of brew:
Third open php.ini file and add reference:sudo vi /private/etc/php.ini
extension="/usr/local/Cellar/php53-mcrypt/5.3.25/mcrypt.so"
Finally, restart apache:sudo apachectl restart
Need help installing mcrypt for a php dev environment on Mac High Sierra
I have the same problem as you, as i had updated to high Sierra yesterday and screw my dev environment. I finally found out High Sierra comes already with Php71 so the one i already had install was been override, so what i did was this:
for i in $(brew list | grep php); do brew uninstall $i; done
it got my php working now all i did was install
brew install php71-mcrypt php71-imagick
boom worked like a charm for me, hope it helps you or anyone else
All this was from the terminal
also this link may help you as well
https://getgrav.org/blog/macos-sierra-apache-multiple-php-versions
Yosemite / El Capitan php-gd + mcrypt installation
You are right, Yosemite's built-in PHP comes without PNG and FreeType support.
Update 2015/10 for El Captian: With OS X 10.11 El Capitan PNG support is back, but FreeType is still missing.
Solution
Use the Homebrew package manager to painlessly build and install a complete PHP and replace it in Apache's config. The whole process only takes about ten minutes if you follow the steps below.
A quick (but complete) walk through
(Note 1: I use Homebrew here, a package management system for OS X. If you are acquainted with MacPorts – another package manager – you can acchieve the same results with that system. It is also possible to use my Homebrew solution in parallel to an existing MacPorts installation on your machine.)
(Note 2: If you want to read all the details about the installation process, have a look at the Homebrew basic installation and the Homebrew PHP installation information. But you really won't need that if you follow these steps.)
Now let's go...
First install Xcode from App Store. If you already have it, check App Store again, to make sure you've got the latest version!
Now you need to install the Xcode Command Line Tools. To do so, open a Terminal and enter:
xcode-select --install
The next command will install the Homebrew package manager system:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
The script explains what it will do and then pauses before it does it.
The next command to enter is a kind of system status test:
brew doctor
This checks the basics of the Homebrew installation.
I got a warning "You have MacPorts or Fink installed: /opt/local/bin/port ..." which I ignored successfully. ;)
Now setup the homebrew/dupes tap which has dependencies we need:
brew tap homebrew/dupes
Setup the homebrew/versions tap which also has dependencies we need:
brew tap homebrew/versions
Then run the following command:
brew tap homebrew/homebrew-php
Now you are ready to finally build PHP. For a list of available configuration options you may run one of these:
brew options php55
brew options php56
But I was fine just using the defaults.
To do so enter ONE of these two, depending on your needs:
brew install php55
brew install php56
(This takes a while, please be patient!)
while installing php56 (5.6.x) on Yosemite (10.10.5) there is a bug please see this issue on github. use
brew install php56 --without-ldap
instead.
If you get an error of type "Cannot find OpenSSL's " you have not installed the Xcode Command Line Tools as I told you in the beginning. ;) Go ahead, install them and re-run that last command.
PHP is built now and the script will end with some details about how to use it:
Open httpd.conf (should be located at /private/etc/apache2/httpd.conf) and enable PHP by adding ONE of these two lines, depending on which PHP version you just installed:
LoadModule php5_module /usr/local/opt/php55/libexec/apache2/libphp5.so
LoadModule php5_module /usr/local/opt/php56/libexec/apache2/libphp5.so
Don't forget to comment out any existing LoadModule php5_module... line that might be present from Yosemite's own PHP version!
Restart Apache
sudo apachectl restart
Your new php.ini file can be found in: /usr/local/etc/php/5.5/php.ini
Enjoy!
Error composer update php laravel? (laravel/framework : ~5.0)
Finally i fix this by other way:
$ brew tap homebrew/php
Then:
$ brew install php54-mcrypt
if get:
Error: Formulae found in multiple taps:
- homebrew/php/php54
- josegonzalez/php/php54
Just use: $ brew untap josegonzalez/php
Reason: josegonzalez/php moved to homebrew/php.
Thank you!
How can I resolve Error: No developer directory found at /Developer?
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
Facebook Java API, sending app-to-user notification
The REST API is deprecated. You should use a newer technique for sending "invites".
Here's how to send app requests to users: https://developers.facebook.com/docs/reference/dialogs/requests/
But you might be best off using the new object/actions as described here:
http://developers.facebook.com/docs/opengraph/tutorial/
Related Topics
PHP Variable Variables with Array Key
How to Update Timezonedb in PHP (Updating Timezones Info)
In PHP What Does |= Mean, That Is Pipe Equals (Not Exclamation)
Get Order Increment Id in Magento
How to Handle Newlines in JavaScript? (From PHP)
Saving a Product Custom Field and Displaying It in Cart Page
Flex/Grid Properties Are Deleted in Gmail Email
Display Total Customers Reviews and Ratings Average in Woocommerce
Add Custom User Email to Cc for Specific Woocommerce Email Notification
Phpstorm 2020.2 - PHP Built-In Functions Are Not Recognized
How to Use Date() in Doctrine 2 Dql
PHP - How to Get Shell Errors Echoed Out to Screen
Create Unique Poll/Vote/Survey in PHP
Parse Error: Syntax Error, Unexpected '.', Expecting ',' or ';'
How to Convert a Huge Integer to Hex in PHP