我似乎在共享主机的缓存权限方面遇到了一些问题。具体来说,当我尝试通过 Composer 安装/更新供应商时,我得到一个运行时异常:
$ php composer.phar update -v -o
Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache handling the post-update-cmd event terminated with an exception
[RuntimeException]
An error occurred when executing the "'cache:clear --no-warmup'" command.
Exception trace:
() at /home/thesewingdiva/private/vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Composer/ScriptHandler.php:137
Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::executeCommand() at /home/thesewingdiva/private/vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Composer/ScriptHandler.php:48
Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache() at phar:///home/thesewingdiva/private/composer.phar/src/Composer/Script/EventDispatcher.php:122
Composer\Script\EventDispatcher->executeEventPhpScript() at phar:///home/thesewingdiva/private/composer.phar/src/Composer/Script/EventDispatcher.php:101
Composer\Script\EventDispatcher->doDispatch() at phar:///home/thesewingdiva/private/composer.phar/src/Composer/Script/EventDispatcher.php:74
Composer\Script\EventDispatcher->dispatchCommandEvent() at phar:///home/thesewingdiva/private/composer.phar/src/Composer/Installer.php:237
Composer\Installer->run() at phar:///home/thesewingdiva/private/composer.phar/src/Composer/Command/UpdateCommand.php:82
Composer\Command\UpdateCommand->execute() at phar:///home/thesewingdiva/private/composer.phar/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:238
Symfony\Component\Console\Command\Command->run() at phar:///home/thesewingdiva/private/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:193
Symfony\Component\Console\Application->doRun() at phar:///home/thesewingdiva/private/composer.phar/src/Composer/Console/Application.php:101
Composer\Console\Application->doRun() at phar:///home/thesewingdiva/private/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:106
Symfony\Component\Console\Application->run() at phar:///home/thesewingdiva/private/composer.phar/src/Composer/Console/Application.php:74
Composer\Console\Application->run() at phar:///home/thesewingdiva/private/composer.phar/bin/composer:37
require() at /home/thesewingdiva/private/composer.phar:15
update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-custom-installers] [--no-scripts] [--no-progress] [-v|--verbose] [-o|--optimize-autoloader] [packages1] ... [packagesN]
我没有使用 ACL 的能力,也没有使用 sudo 的能力,因为它是共享主机。缓存因其权限(递归)而设置为 777,并且 app/console、app.php 和 app_dev.php 都具有 umask(0000)。我还删除了缓存,看看是否有帮助。没有骰子。有想法该怎么解决这个吗?