Comments (3)
PECL is installed with the MAMP version so the following incantation should be close to universal:
Install against MAMP php with pecl
/Applications/MAMP/bin/php/php<version>/bin/pear install phalcon
Caveats
Due to the limitations of an unpaid MAMP we will have to manually edit the php.ini as well via CLI
This comes with some caveats as some options in the interface interfere with what php ini the binary has access to.
Warning
If the option Make this version available on the command line
then an alias is added to your ~/.profile for php which will move the ini temporarily to the /Library/applicationsupport
if it is then deselected this will delete those files. Making it probably hard to maintain a custom configuration.
Register extensions by hand
As stated above the non paid version of MAMP will show you the php.ini if you click the -> next to the version but will not save it.
So we need to do this by hand.
Thankfully we have a somewhat generic incantation to get there
If you don't have a preference of text editor
$ open -a TextEdit /Applications/MAMP/bin/php/php<version>/conf/php.ini
Otherwise just edit this file using whatever you like
/Applications/MAMP/bin/php/php<version>/conf/php.ini
The order of extensions usually matters so search this file for
extension=
until you see a block a little something like this
extension=imap.so
extension=gettext.so
extension=pgsql.so
extension=pdo_pgsql.so
Phalcon requires PDO so the safest way to register the phalcon and psr extensions installed by PECL is to add them to the bottom of the list of extensions eg.
extension=imap.so
extension=gettext.so
extension=pgsql.so
extension=pdo_pgsql.so
extension=psr.so
extension=phalcon.so
Warning
lines that start with ;
are not parsed when PHP reads this file
from homebrew-tap.
After your last update I successfully intsalled with brew
brew tap phalcon/extension https://github.com/phalcon/homebrew-tap brew install phalcon
this run gave some output and that output was ending like:
`==> psr@74
To finish installing psr for PHP 7.4:
- /usr/local/etc/php/7.4/conf.d/ext-psr.ini was created,
do not forget to remove it upon extension removal. - Validate installation via one of the following methods:
- Using PHP from a webserver:
-
- Restart your webserver.
-
- Write a PHP page that calls "phpinfo();"
-
- Load it in a browser and look for the info on the psr module.
-
- If you see it, you have been successful!
- Using PHP from the command line:
-
- Run
php -i "(command-line 'phpinfo()')"
- Run
-
- Look for the info on the psr module.
-
- If you see it, you have been successful!
==> [email protected]
To finish installing phalcon for PHP 7.4:
- If you see it, you have been successful!
- /usr/local/etc/php/7.4/conf.d/ext-phalcon.ini was created,
do not forget to remove it upon extension removal. - Validate installation via one of the following methods:
- Using PHP from a webserver:
-
- Restart your webserver.
-
- Write a PHP page that calls "phpinfo();"
-
- Load it in a browser and look for the info on the phalcon module.
-
- If you see it, you have been successful!
- Using PHP from the command line:
-
- Run
php -i "(command-line 'phpinfo()')"
- Run
-
- Look for the info on the phalcon module.
-
- If you see it, you have been successful!
`
- If you see it, you have been successful!
After that;
I checked active Mamp PHP version with linking
http://localhost/MAMP/index.php?language=English&page=phpinfo
and get php.ini path then opened it and added psr.so path from "/usr/local/etc/php/7.4/conf.d/ext-psr.ini" and phalcon.so path form "/usr/local/etc/php/7.4/conf.d/ext-phalcon.ini" to end of my php.ini
`
[psr]
extension="/usr/local/opt/psr@74/psr.so"
[phalcon]
extension="/usr/local/opt/[email protected]/phalcon.so"
`
from homebrew-tap.
Reopened because this looks like another use case where #8 matters
from homebrew-tap.
Related Issues (10)
- Bottle Automation
- Invalid formula HOT 9
- not working with macos big sur. apple m1 chip HOT 1
- Error: [email protected]: Failed to download resource "psr@74" HOT 6
- Apple M1 issue when brew install phalcon, returns Operation not permitted HOT 1
- Cannot install phalcon because of versioned formula HOT 2
- crystal@crystaldeMac Formula (master) $ brew install [email protected] failed
- Tap doesn't install under Catalina HOT 3
- --without-homebrew-php can't always find main/php.h HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from homebrew-tap.