問題
今天在執行 composer require 套件安裝時出現 PHP Fatal error: Allowed memory size of xxx bytes exhausted 的錯誤訊息
解決方法
- 在
php.ini
加大memory_limit
或是設memory_limit = -1
(不限制) - 使用命令
php -d memory_limit=-1 composer.phar
今天在執行 composer require 套件安裝時出現 PHP Fatal error: Allowed memory size of xxx bytes exhausted 的錯誤訊息
php.ini
加大 memory_limit
或是設 memory_limit = -1
(不限制)php -d memory_limit=-1 composer.phar
在 Laravel 使用 Sqlite 為資料庫使用, 執行 migration rollback 的時候發生下列錯誤訊息:
SQLite doesn't support multiple calls to dropColumn / renameColumn in a single modification.
在 migration 的 down() 方法裡使用多個 dropColumn 但 Sqlite 不支援
$table->dropColumn('field1');
$table->dropColumn('field2');
用 array() 方式來改寫 dropColumn 即可
$table->dropColumn([
'field1',
'field2',
]);