LoginSignup
1
0

More than 5 years have passed since last update.

Macの内蔵のApacheにPHPのバージョンを切り替えて適用する

Last updated at Posted at 2017-11-14

以前使ったコマンドが残っていたので、備忘録して記事にします。
PHPを5.5 <=> 7.0のバージョン切り替えて、Mac OSXの内蔵のApacheに適用した例です。
もう少し色々あったと思いますが、思い出したら更新します。

// PHP5.5
$ln -nfs /usr/local/bin/Cellar/php55/5.5.38/bin/php /usr/local/bin/php
// PHP7.0
$ln -nfs /usr/local/php5-7.0.14-20170114-204712/bin/php /usr/local/bin/php
$ ls -lt /etc/apache2/
total 216
-rw-r--r-- 1 root wheel 20905 Feb 4 21:48 httpd.conf
drwxr-xr-x 4 root wheel 136 Feb 4 21:01 other
drwxr-xr-x 35 root wheel 1190 Oct 6 11:50 extra
drwxr-xr-x 5 root wheel 170 Oct 6 11:49 users
-rw-r--r-- 1 root wheel 20867 Sep 7 16:50 httpd.conf~previous
-rw-r--r-- 1 root wheel 1338 Sep 7 16:12 server.crt
-rw-r--r-- 1 root wheel 887 Sep 7 16:12 server.key
-rw-r--r-- 1 root wheel 13077 Aug 9 08:35 magic
-rw-r--r-- 1 root wheel 53262 Aug 9 08:35 mime.types
drwxr-xr-x 4 root wheel 136 Aug 9 08:35 original
-rw-r--r-- 1 root wheel 20785 Jul 1 2015 httpd.conf.pre-update
$ ls -lt /etc/apache2/other/
total 8
lrwxr-xr-x 1 root wheel 32 Feb 4 21:01 +php-osx.conf -> /usr/local/php5/entropy-php.conf
-r--r--r-- 1 root wheel 194 Aug 9 08:35 php5.conf

関連リンク

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0