Skip to content

Instantly share code, notes, and snippets.

@Bogdaan
Forked from abenevaut/# install php 7.4.0.md
Created December 13, 2021 13:30
Show Gist options
  • Select an option

  • Save Bogdaan/9c5cc399aca6490af0043e983d23ff7b to your computer and use it in GitHub Desktop.

Select an option

Save Bogdaan/9c5cc399aca6490af0043e983d23ff7b to your computer and use it in GitHub Desktop.

Revisions

  1. Bogdaan revised this gist Dec 13, 2021. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions install-php_7.4.0.sh
    Original file line number Diff line number Diff line change
    @@ -30,7 +30,10 @@ phpbrew ext install soap stable
    phpbrew ext install gmp stable
    phpbrew ext install gd stable -- --with-zlib-dir=/usr/local/Cellar/zlib/1.2.11/
    phpbrew ext install exif stable
    phpbrew ext install https://github.com/php-memcached-dev/php-memcached php7 -- --disable-memcached-sasl
    phpbrew --debug ext install imagick stable -- --with-imagick=/usr/local/Cellar/imagemagick/7.0.9-27/


    # intl specifications
    export LDFLAGS="-L/usr/local/opt/icu4c/lib"
    export PKG_CONFIG_PATH="/usr/local/opt/icu4c/lib/pkgconfig"
  2. @abenevaut abenevaut revised this gist Oct 13, 2020. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions install-php_7.4.0.sh
    Original file line number Diff line number Diff line change
    @@ -14,6 +14,7 @@ phpbrew init
    echo "[[ -e ~/.phpbrew/bashrc ]] && source ~/.phpbrew/bashrc" >> ~/.bashrc
    # See also https://github.com/phpbrew/phpbrew#variants
    # add +zts if needed
    # add +fpm if needed
    phpbrew --debug install php-7.4.0 +gd +default +sqlite +mysql +bz2=/usr/local/Cellar/bzip2/1.0.8/ +zlib=/usr/local/Cellar/zlib/1.2.11/ -- --with-gd=shared
    # use php 7.4.0 as default php binary
    phpbrew switch 7.4.0
  3. @abenevaut abenevaut revised this gist Jul 25, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion install-php_7.4.0.sh
    Original file line number Diff line number Diff line change
    @@ -14,7 +14,7 @@ phpbrew init
    echo "[[ -e ~/.phpbrew/bashrc ]] && source ~/.phpbrew/bashrc" >> ~/.bashrc
    # See also https://github.com/phpbrew/phpbrew#variants
    # add +zts if needed
    phpbrew --debug install php-7.4.0 +gd +default +sqlite +mysql +bz2=/usr/local/Cellar/bzip2/1.0.8/ +zlib=/usr/local/Cellar/zlib/1.2.11/ -- --with-gd=shared
    phpbrew --debug install php-7.4.0 +gd +default +sqlite +mysql +bz2=/usr/local/Cellar/bzip2/1.0.8/ +zlib=/usr/local/Cellar/zlib/1.2.11/ -- --with-gd=shared
    # use php 7.4.0 as default php binary
    phpbrew switch 7.4.0

  4. @abenevaut abenevaut revised this gist Apr 28, 2020. 1 changed file with 0 additions and 4 deletions.
    4 changes: 0 additions & 4 deletions install-php_7.4.0.sh
    Original file line number Diff line number Diff line change
    @@ -23,10 +23,6 @@ phpbrew switch 7.4.0
    # ~/.phpbrew/php/php-7.4.0/etc/php.ini
    #

    # See also https://github.com/phpbrew/phpbrew#installing-extra-apps
    phpbrew app get phpunit
    phpbrew app get phpcs
    phpbrew app get composer
    # See also https://github.com/phpbrew/phpbrew/wiki/Extension-Installer
    phpbrew ext install xdebug stable
    phpbrew ext install soap stable
  5. @abenevaut abenevaut revised this gist Apr 28, 2020. 1 changed file with 6 additions and 3 deletions.
    9 changes: 6 additions & 3 deletions install-php_7.4.0.sh
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@ xcode-select --install

    # You should install brew https://brew.sh/index_fr
    brew install automake autoconf curl pcre bison re2c mhash libtool icu4c gettext jpeg openssl libxml2 mcrypt gd gmp libevent zlib libzip bzip2 imagemagick pkg-config oniguruma
    brew link icu4c
    brew link --force icu4c
    brew link --force openssl
    brew link --force libxml2

    @@ -29,9 +29,12 @@ phpbrew app get phpcs
    phpbrew app get composer
    # See also https://github.com/phpbrew/phpbrew/wiki/Extension-Installer
    phpbrew ext install xdebug stable
    phpbrew ext install intl stable
    phpbrew ext install soap stable
    phpbrew ext install gmp stable
    phpbrew ext install gd stable -- --with-zlib-dir=/usr/local/Cellar/zlib/1.2.11/
    phpbrew ext install exif stable
    phpbrew --debug ext install imagick stable -- --with-imagick=/usr/local/Cellar/imagemagick/7.0.8-43/
    phpbrew --debug ext install imagick stable -- --with-imagick=/usr/local/Cellar/imagemagick/7.0.9-27/
    # intl specifications
    export LDFLAGS="-L/usr/local/opt/icu4c/lib"
    export PKG_CONFIG_PATH="/usr/local/opt/icu4c/lib/pkgconfig"
    phpbrew ext install intl stable
  6. @abenevaut abenevaut created this gist Apr 28, 2020.
    37 changes: 37 additions & 0 deletions install-php_7.4.0.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,37 @@
    xcode-select --install

    # You should install brew https://brew.sh/index_fr
    brew install automake autoconf curl pcre bison re2c mhash libtool icu4c gettext jpeg openssl libxml2 mcrypt gd gmp libevent zlib libzip bzip2 imagemagick pkg-config oniguruma
    brew link icu4c
    brew link --force openssl
    brew link --force libxml2

    curl -L -O https://github.com/phpbrew/phpbrew/raw/master/phpbrew
    chmod +x phpbrew
    sudo mv phpbrew /usr/local/bin/phpbrew

    phpbrew init
    echo "[[ -e ~/.phpbrew/bashrc ]] && source ~/.phpbrew/bashrc" >> ~/.bashrc
    # See also https://github.com/phpbrew/phpbrew#variants
    # add +zts if needed
    ➜ phpbrew --debug install php-7.4.0 +gd +default +sqlite +mysql +bz2=/usr/local/Cellar/bzip2/1.0.8/ +zlib=/usr/local/Cellar/zlib/1.2.11/ -- --with-gd=shared
    # use php 7.4.0 as default php binary
    phpbrew switch 7.4.0

    #
    # Note: php.ini path
    # ~/.phpbrew/php/php-7.4.0/etc/php.ini
    #

    # See also https://github.com/phpbrew/phpbrew#installing-extra-apps
    phpbrew app get phpunit
    phpbrew app get phpcs
    phpbrew app get composer
    # See also https://github.com/phpbrew/phpbrew/wiki/Extension-Installer
    phpbrew ext install xdebug stable
    phpbrew ext install intl stable
    phpbrew ext install soap stable
    phpbrew ext install gmp stable
    phpbrew ext install gd stable -- --with-zlib-dir=/usr/local/Cellar/zlib/1.2.11/
    phpbrew ext install exif stable
    phpbrew --debug ext install imagick stable -- --with-imagick=/usr/local/Cellar/imagemagick/7.0.8-43/
    8 changes: 8 additions & 0 deletions xdebug.ini
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    // ~/.phpbrew/php/php-7.4.0/var/db/xdebug.ini
    zend_extension=xdebug.so
    xdebug.remote_enable = 1
    xdebug.remote_port = 9000
    xdebug.idekey = PHPSTORM
    xdebug.show_error_trace = 1
    xdebug.remote_autostart = 1
    xdebug.file_link_format = phpstorm://open?%f:%l