Coder Social home page Coder Social logo

Comments (3)

ninjapanzer avatar ninjapanzer commented on June 2, 2024

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.

Screen Shot 2020-01-23 at 11 53 38 AM

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.

nabiguzel avatar nabiguzel commented on June 2, 2024

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()')"
    • 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:
  • /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()')"
    • Look for the info on the phalcon module.
    • 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.

ninjapanzer avatar ninjapanzer commented on June 2, 2024

Reopened because this looks like another use case where #8 matters

from homebrew-tap.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.