我試圖在共享主機上部署我的交響樂應用程序,但我不斷收到錯誤500
。Symfony 3共享主機錯誤500
我在父文件夾中構建應用程序,bin,src
和供應商,然後我將web文件夾更改爲public_html,文件號爲cpanel
。
當我運行URL
使用example.com/app_dev.php
它工作正常。
然而,當使用例如我得到錯誤500
,所以我切換上cpanel
的PHP
選項display_error
,這是我得到的錯誤:
Warning: include_once(/home/kaftenh1/public_html/../var/bootstrap.php.cache): failed to open stream: No such file or directory in /home/kaftenh1/public_html/app.php on line 7
Warning: include_once(): Failed opening '/home/kaftenh1/public_html/../var/bootstrap.php.cache' for inclusion (include_path='.:/opt/alt/php70/usr/share/pear') in /home/kaftenh1/public_html/app.php on line 7
Fatal error: Uncaught Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: The service "elao.error_notifier.listener" has a dependency on a non-existent service "swiftmailer.mailer.notifier". in /home/kaftenh1/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php:58 Stack trace: #0 /home/kaftenh1/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php(42): Symfony\Component\DependencyInjection\Compiler\CheckExceptionOnInvalidReferenceBehaviorPass->processReferences(Array) #1 /home/kaftenh1/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php(36): Symfony\Component\DependencyInjection\Compiler\CheckExceptionOnInvalidReferenceBehaviorPass->processDefinition(Object(Symfony\Component\DependencyInjection\Definition)) #2 /home/kaftenh1/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compi in /home/kaftenh1/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php on line 58
感謝
'/ home/kaftenh1/var/bootstrap.php.cache'文件是否存在?請注意路徑中的'..'進入upa級別,從路徑 – Milk
中刪除'public_html',您可以嘗試對var目錄chmod 777。 –
@Milk非常感謝它的工作改變了路徑 –