« MACOSX » : différence entre les versions

Ligne 122 : Ligne 122 :
  brew services restart php72
  brew services restart php72


avec PHP 5.6
* avec PHP 5.6
* https://www.sminrana.com/php/install-php-5-6-on-macos-catalina/
* https://www.sminrana.com/php/install-php-5-6-on-macos-catalina/
* php@5.6 Library not loaded libicui18n.64.dylib https://github.com/eXolnet/homebrew-deprecated/issues/23
* php@5.6 Library not loaded libicui18n.64.dylib https://github.com/eXolnet/homebrew-deprecated/issues/23
<pre>
These steps worked on my Mac, Catalina version 10.15.3 (19D76).


Step 1: Tap deprecated brew formula
These steps worked on my Mac, Catalina version 10.15.3 (19D76).


brew tap exolnet/homebrew-deprecated
Step 1: Tap deprecated brew formula
brew tap exolnet/homebrew-deprecated


Step 2: Install PHP 5.6
Step 2: Install PHP 5.6
brew install php@5.6


brew install php@5.6
You can also have PHP 7.2 just run
brew install php@7.2


You can also have PHP 7.2 just run
Step 3: Install PHP switcher script to switch between 5.6 and 7.2


brew install php@7.2
$ curl -L https://gist.githubusercontent.com/rhukster/f4c04f1bf59e0b74e335ee5d186a98e2/raw > /usr/local/bin/sphp
$ chmod +x /usr/local/bin/sphp


Step 3: Install PHP switcher script to switch between 5.6 and 7.2
If you run sphp 7.2 it should work but running sphp 5.6 will not work and will show error like this from apache.
Library not loaded: /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylibn  Referenced from: /usr/local/opt/php@5.6/lib/httpd/modules/libphp5.son  Reason: image not found
Unless we switch openssl version, it wont work. So we have to install old openssl


$ curl -L https://gist.githubusercontent.com/rhukster/f4c04f1bf59e0b74e335ee5d186a98e2/raw > /usr/local/bin/sphp
Step 4: Install old openssl
$ chmod +x /usr/local/bin/sphp
brew install https://github.com/tebelorg/Tump/releases/download/v1.0.0/openssl.rb


If you run sphp 7.2 it should work but running sphp 5.6 will not work and will show error like this from apache.
Step 5: Switch to openssl 1.0
brew switch openssl 1.0.2t


Library not loaded: /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylibn Referenced from: /usr/local/opt/php@5.6/lib/httpd/modules/libphp5.son  Reason: image not found
Now you switch to PHP 5.6 by
  sphp 5.6


Unless we switch openssl version, it wont work. So we have to install old openssl
Everything works.


Step 4: Install old openssl
! attention appliquer le patch
 
brew install https://github.com/tebelorg/Tump/releases/download/v1.0.0/openssl.rb
 
Step 5: Switch to openssl 1.0
 
brew switch openssl 1.0.2t
 
Now you switch to PHP 5.6 by
 
sphp 5.6
 
Everything works.
 
! attention appliquer le patch


</pre>
</pre>