LoginSignup
6
6

More than 5 years have passed since last update.

OS X Yosemiteへアップグレードした後PHPのGD関数imagepng()などの回復

Posted at

OS X Yosemiteへアップグレードした後、設定が変わったことが少なくない。例えば、ApacheはPHPをオフにした。それは気付きやすいだが、ある日PHP開発でQRコードの利用を実装する件があって、馴れ馴れしくimagepng()関数を利用してしまったまで。その時こそ、imagepng()について「undefined function」というエラーが提示されて、またやられたと感じた。

phpinfoにてGDの設定はあったが、pngについては記録なくなった。解決する方法は、相応なる画像処理機能を再インストールする。そうりゃ面倒な仕事じゃん。

従ってstackoverflowで一つの問答を見つかった。
http://stackoverflow.com/questions/26443242/after-upgrade-php-no-longer-supports-png-operations
そのうち、一つの便利な解決策が提供された。

つまり、PHP 5.6の場合は、ターミナルで一ラインで解決できる。
curl -s http://php-osx.liip.ch/install.sh | bash -s 5.6

6
6
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
6
6