環境狀況:

  • Ubuntu
  • Nginx + php5-fpm
  • Laravel

-- 這一個錯誤是在做 composer update 時所遇到的問題 ---

Fatal error: Uncaught exception 'ErrorException' with message 'proc_open(): fork failed - Cannot allocate memory' in phar:///usr/bin/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php on line 990

兩種方式:

  1. 重新啟動 php5-fpm
  2. 跟 composer update 說我需要多一點的 memory。(composer update -dmemory_limit=750M)

--- 這是在執行網站時發生的錯誤 ---

[RuntimeException] Error Output: PHP Fatal error: Class 'Monolog\Logger' not found in /home/Sites/production/flyingv-mall/releases/20140219161020/vendor/laravel/framework/src/Illuminate/Log/LogServiceProvider.php on line 23

把 composer 更新後就正常了(composer self-update)