系統 os x 10.11
用的是 brew 下的php56
brew 下的 nginx
下了一個項目,在安裝過程中提示缺少,intl 和 apc
擴充,就用下面的語句下載了,也裝上了,但php還是沒有載入,這怎麼弄?
另外問下,apc
擴充怎麼裝,用 brew search php56
並沒有 apc
擴充
➜ brew reinstall php56-intl --build-from-source==> Reinstalling homebrew/php/php56-intl==> Downloading https://php.net/get/php-5.6.17.tar.bz2/from/this/mirrorAlready downloaded: /Library/Caches/Homebrew/php56-intl-5.6.17==> /usr/local/opt/php56/bin/phpize==> ./configure --prefix=/usr/local/Cellar/php56-intl/5.6.17 --with-php-config=/us==> make==> CaveatsTo finish installing intl for PHP 5.6: * /usr/local/etc/php/5.6/conf.d/ext-intl.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 intl 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 intl module. * - If you see it, you have been successful!==> Summary? /usr/local/Cellar/php56-intl/5.6.17: 3 files, 372.8K, built in 41 seconds
回複內容:
系統 os x 10.11
用的是 brew 下的php56
brew 下的 nginx
下了一個項目,在安裝過程中提示缺少,intl 和 apc
擴充,就用下面的語句下載了,也裝上了,但php還是沒有載入,這怎麼弄?
另外問下,apc
擴充怎麼裝,用 brew search php56
並沒有 apc
擴充
➜ brew reinstall php56-intl --build-from-source==> Reinstalling homebrew/php/php56-intl==> Downloading https://php.net/get/php-5.6.17.tar.bz2/from/this/mirrorAlready downloaded: /Library/Caches/Homebrew/php56-intl-5.6.17==> /usr/local/opt/php56/bin/phpize==> ./configure --prefix=/usr/local/Cellar/php56-intl/5.6.17 --with-php-config=/us==> make==> CaveatsTo finish installing intl for PHP 5.6: * /usr/local/etc/php/5.6/conf.d/ext-intl.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 intl 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 intl module. * - If you see it, you have been successful!==> Summary? /usr/local/Cellar/php56-intl/5.6.17: 3 files, 372.8K, built in 41 seconds
不太清楚你具體的環境配置是怎麼樣的。不過需要注意的有如下:
php的ISAPI有好幾個,cli模式,apache模式等等,可能每個模式都對應一個php.ini,是不是在正確的ini檔案中添加extension=/path/path/intl.so了?
apc如果brew沒有提供,那就只能手動編譯安裝了,一般步驟是這樣的:
到apc源碼根目錄,phpize-》configure-》make-》make install,到ini檔案中添加extension=/path/apc.so