当我在app_dev.php上启用调试时,它会抛出500错误 这是我的app_dev.php
use Symfony\Component\HttpFoundation\Request;
$loader = require_once __DIR__.'/../app/bootstrap.php.cache';
require_once __DIR__.'/../app/AppKernel.php';
$kernel = new AppKernel('dev', true);
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);
我真的不知道在哪里看,我清除了prod和dev缓存。
这是我尝试从开发环境访问我的域后的dev.log报告:
[2016-01-21 15:13:44] request.INFO: Matched route "intermediario_list". {"route_parameters":{"_controller":"Talks\\DashboardBundle\\Controller\\IntermediarioController::listAction","_route":"intermediario_list"},"request_uri":"http://devmeter.talksmedia.it/app$
[2016-01-21 15:13:44] php.INFO: The Symfony\Component\Form\Extension\Csrf\CsrfProvider\CsrfProviderAdapter class is deprecated since version 2.4 and will be removed in version 3.0. Use the Symfony\Component\Security\Csrf\CsrfTokenManager class instead. {"type":$
[2016-01-21 15:13:44] security.DEBUG: Read existing security token from the session. {"key":"_security_main"} []
[2016-01-21 15:13:44] doctrine.DEBUG: SELECT t0.username AS username_1, t0.username_canonical AS username_canonical_2, t0.email AS email_3, t0.email_canonical AS email_canonical_4, t0.enabled AS enabled_5, t0.salt AS salt_6, t0.password AS password_7, t0.last_l$
[2016-01-21 15:13:44] security.DEBUG: User was reloaded from a user provider. {"username":"manager","provider":"FOS\\UserBundle\\Security\\UserProvider"} []
[2016-01-21 15:13:44] security.INFO: No expression found; abstaining from voting. [] []
[2016-01-21 15:13:44] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\DebugHandlersListener::configure". [] []
[2016-01-21 15:13:44] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\ProfilerListener::onKernelRequest". [] []
[2016-01-21 15:13:44] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Bundle\FrameworkBundle\EventListener\SessionListener::onKernelRequest". [] []
[2016-01-21 15:13:44] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\FragmentListener::onKernelRequest". [] []
[2016-01-21 15:13:44] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\RouterListener::onKernelRequest". [] []
[2016-01-21 15:13:44] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\LocaleListener::onKernelRequest". [] []
[2016-01-21 15:13:44] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\TranslatorListener::onKernelRequest". [] []
[2016-01-21 15:13:44] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Component\Security\Http\Firewall::onKernelRequest". [] []
[2016-01-21 15:13:44] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Bundle\AsseticBundle\EventListener\RequestListener::onKernelRequest". [] []
[2016-01-21 15:13:44] event.DEBUG: Notified event "kernel.controller" to listener "Symfony\Bundle\FrameworkBundle\DataCollector\RouterDataCollector::onKernelController". [] []
[2016-01-21 15:13:44] event.DEBUG: Notified event "kernel.controller" to listener "Symfony\Component\HttpKernel\DataCollector\RequestDataCollector::onKernelController". [] []
[2016-01-21 15:13:44] event.DEBUG: Notified event "kernel.controller" to listener "Sensio\Bundle\FrameworkExtraBundle\EventListener\ControllerListener::onKernelController". [] []
[2016-01-21 15:13:44] event.DEBUG: Notified event "kernel.controller" to listener "Sensio\Bundle\FrameworkExtraBundle\EventListener\ParamConverterListener::onKernelController". [] []
[2016-01-21 15:13:44] event.DEBUG: Notified event "kernel.controller" to listener "Sensio\Bundle\FrameworkExtraBundle\EventListener\HttpCacheListener::onKernelController". [] []
[2016-01-21 15:13:44] event.DEBUG: Notified event "kernel.controller" to listener "Sensio\Bundle\FrameworkExtraBundle\EventListener\SecurityListener::onKernelController". [] []
[2016-01-21 15:13:44] event.DEBUG: Notified event "kernel.controller" to listener "Sensio\Bundle\FrameworkExtraBundle\EventListener\TemplateListener::onKernelController". [] []
[2016-01-21 15:13:44] php.INFO: The Symfony\Component\Security\Core\SecurityContext class is deprecated since version 2.6 and will be removed in 3.0. Use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage or Symfony\Component\Security\Cor$
[2016-01-21 15:13:44] security.INFO: "hasRole('ROLE_AMMINISTRATORE')" evaluated to true; voting to grant access. [] []
[2016-01-21 15:13:44] doctrine.DEBUG: SELECT t0_.id AS id_0, t0_.deletedAt AS deletedAt_1, t0_.percentage AS percentage_2, t0_.name AS name_3, t0_.legalRepresentative AS legalRepresentative_4, t0_.address AS address_5, t0_.email AS email_6, t0_.vatNumber AS vat$
[2016-01-21 15:13:45] security.INFO: No expression found; abstaining from voting. [] []
[2016-01-21 15:13:45] security.INFO: No expression found; abstaining from voting. [] []
[2016-01-21 15:13:45] security.INFO: No expression found; abstaining from voting. [] []
[2016-01-21 15:13:45] security.INFO: No expression found; abstaining from voting. [] []
[2016-01-21 15:13:45] security.INFO: No expression found; abstaining from voting. [] []
[2016-01-21 15:13:45] security.INFO: No expression found; abstaining from voting. [] []
[2016-01-21 15:13:45] translation.WARNING: Translation not found. {"id":"Nome:","domain":"messages","locale":"it"} []
[2016-01-21 15:13:45] translation.WARNING: Translation not found. {"id":"Email:","domain":"messages","locale":"it"} []
[2016-01-21 15:13:45] event.DEBUG: Notified event "kernel.view" to listener "Sensio\Bundle\FrameworkExtraBundle\EventListener\TemplateListener::onKernelView". [] []
[2016-01-21 15:13:45] event.DEBUG: Listener "Sensio\Bundle\FrameworkExtraBundle\EventListener\TemplateListener::onKernelView" stopped propagation of the event "kernel.view". [] []
[2016-01-21 15:13:45] security.DEBUG: Stored the security token in the session. {"key":"_security_main"} []
[2016-01-21 15:13:45] event.DEBUG: Notified event "kernel.response" to listener "Symfony\Bridge\Monolog\Handler\FirePHPHandler::onKernelResponse". [] []
[2016-01-21 15:13:45] event.DEBUG: Notified event "kernel.response" to listener "Symfony\Bridge\Monolog\Handler\ChromePhpHandler::onKernelResponse". [] []
[2016-01-21 15:13:45] event.DEBUG: Notified event "kernel.response" to listener "Symfony\Component\HttpKernel\EventListener\ResponseListener::onKernelResponse". [] []
[2016-01-21 15:13:45] event.DEBUG: Notified event "kernel.response" to listener "Symfony\Component\Security\Http\RememberMe\ResponseListener::onKernelResponse". [] []
[2016-01-21 15:13:45] event.DEBUG: Notified event "kernel.response" to listener "Sensio\Bundle\FrameworkExtraBundle\EventListener\HttpCacheListener::onKernelResponse". [] []
[2016-01-21 15:13:45] event.DEBUG: Notified event "kernel.response" to listener "Symfony\Component\HttpKernel\EventListener\ProfilerListener::onKernelResponse". [] []
[2016-01-21 15:13:45] event.DEBUG: Notified event "kernel.response" to listener "Symfony\Bundle\WebProfilerBundle\EventListener\WebDebugToolbarListener::onKernelResponse". [] []
[2016-01-21 15:13:45] event.DEBUG: Notified event "kernel.response" to listener "Symfony\Component\HttpKernel\EventListener\SaveSessionListener::onKernelResponse". [] []
[2016-01-21 15:13:45] event.DEBUG: Notified event "kernel.response" to listener "Symfony\Component\HttpKernel\EventListener\StreamedResponseListener::onKernelResponse". [] []
[2016-01-21 15:13:45] event.DEBUG: Notified event "kernel.finish_request" to listener "Symfony\Component\HttpKernel\EventListener\LocaleListener::onKernelFinishRequest". [] []
[2016-01-21 15:13:45] event.DEBUG: Notified event "kernel.finish_request" to listener "Symfony\Component\HttpKernel\EventListener\TranslatorListener::onKernelFinishRequest". [] []
[2016-01-21 15:13:45] event.DEBUG: Notified event "kernel.finish_request" to listener "Symfony\Component\HttpKernel\EventListener\RouterListener::onKernelFinishRequest". [] []
[2016-01-21 15:13:45] event.DEBUG: Notified event "kernel.finish_request" to listener "Symfony\Component\Security\Http\Firewall::onKernelFinishRequest". [] []
[2016-01-21 15:13:45] event.DEBUG: Notified event "kernel.terminate" to listener "Symfony\Bundle\SwiftmailerBundle\EventListener\EmailSenderListener::onTerminate". [] []
[2016-01-21 15:13:45] event.DEBUG: Notified event "kernel.terminate" to listener "Symfony\Component\HttpKernel\EventListener\ProfilerListener::onKernelTerminate". [] []
答案 0 :(得分:0)
只有在使用Linux时才会出现此问题。 这与文件的权限有关。我没有跟踪确切的文件以更改权限,因为我急于完成项目。所以,我只是将Web根目录的内容更改为777,问题就解决了。
运行" sudo chmod -R 777 *"在你的/ var / www / html /" home_directory"中。这将解决您的问题。 但是现在你知道它是因为权限,所以请跟踪确切的文件以获得适当的权限;因为这个命令会将所有代码暴露给互联网。