Symfony가 경로를 찾을 수 없습니다.

OxySocks

저와 팀은 비교적 큰 Symfony 프로젝트를 진행하고 있습니다. 우리는 모든 Windows PC에서 XAMPP를 사용하여 로컬에서 작업 해 왔으며 거의 ​​오류가 발생하지 않았습니다. 최근에 나는 리눅스 (CrunchBang 리눅스)에서 애플리케이션을 테스트하는 작업을 맡았고 꽤 심각한 오류가 발생했습니다. 나는 모든 StackOverflow를 살펴 보았고 내가 찾을 수있는 모든 것을 시도했습니다.

App.php (localhost /)는 빈 화면을 반환합니다. App_dev.php (localhost / app_dev.php)는 다음 두 가지 오류를 제공합니다.

1/2 ResourceNotFoundException :

in /home/tim/web/grip.dev/app/cache/dev/appDevUrlMatcher.php line 136
at appDevUrlMatcher->match('/') in /home/tim/web/grip.dev/app/cache/dev/classes.php line 1207
at Router->match('/') in /home/tim/web/grip.dev/app/cache/dev/classes.php line 1872
at RouterListener->onKernelRequest(object(GetResponseEvent))
at call_user_func(array(object(RouterListener), 'onKernelRequest'), object(GetResponseEvent)) in /home/tim/web/grip.dev/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php line 450
at TraceableEventDispatcher->Symfony\Component\HttpKernel\Debug\{closure}(object(GetResponseEvent))
at call_user_func(object(Closure), object(GetResponseEvent)) in /home/tim/web/grip.dev/app/cache/dev/classes.php line 1667
at EventDispatcher->doDispatch(array(object(Closure), object(Closure), object(Closure), object(Closure), object(Closure), object(Closure), object(Closure), object(Closure), object(Closure), object(Closure)), 'kernel.request', object(GetResponseEvent)) in /home/tim/web/grip.dev/app/cache/dev/classes.php line 1600
at EventDispatcher->dispatch('kernel.request', object(GetResponseEvent)) in /home/tim/web/grip.dev/app/cache/dev/classes.php line 1764
at ContainerAwareEventDispatcher->dispatch('kernel.request', object(GetResponseEvent)) in /home/tim/web/grip.dev/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php line 139
at TraceableEventDispatcher->dispatch('kernel.request', object(GetResponseEvent)) in /home/tim/web/grip.dev/app/bootstrap.php.cache line 2833
at HttpKernel->handleRaw(object(Request), '1') in /home/tim/web/grip.dev/app/bootstrap.php.cache line 2818
at HttpKernel->handle(object(Request), '1', true) in /home/tim/web/grip.dev/app/bootstrap.php.cache line 2947
at ContainerAwareHttpKernel->handle(object(Request), '1', true) in /home/tim/web/grip.dev/app/bootstrap.php.cache line 2249
at Kernel->handle(object(Request)) in /home/tim/web/grip.dev/web/app_dev.php line 28

2/2 NotFoundHttpException : "GET /"에 대한 경로를 찾을 수 없습니다.

in /home/tim/web/grip.dev/app/cache/dev/classes.php line 1883
at RouterListener->onKernelRequest(object(GetResponseEvent))
at call_user_func(array(object(RouterListener), 'onKernelRequest'), object(GetResponseEvent)) in /home/tim/web/grip.dev/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php line 450
at TraceableEventDispatcher->Symfony\Component\HttpKernel\Debug\{closure}(object(GetResponseEvent))
at call_user_func(object(Closure), object(GetResponseEvent)) in /home/tim/web/grip.dev/app/cache/dev/classes.php line 1667
at EventDispatcher->doDispatch(array(object(Closure), object(Closure), object(Closure), object(Closure), object(Closure), object(Closure), object(Closure), object(Closure), object(Closure), object(Closure)), 'kernel.request', object(GetResponseEvent)) in /home/tim/web/grip.dev/app/cache/dev/classes.php line 1600
at EventDispatcher->dispatch('kernel.request', object(GetResponseEvent)) in /home/tim/web/grip.dev/app/cache/dev/classes.php line 1764
at ContainerAwareEventDispatcher->dispatch('kernel.request', object(GetResponseEvent)) in /home/tim/web/grip.dev/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php line 139
at TraceableEventDispatcher->dispatch('kernel.request', object(GetResponseEvent)) in /home/tim/web/grip.dev/app/bootstrap.php.cache line 2833
at HttpKernel->handleRaw(object(Request), '1') in /home/tim/web/grip.dev/app/bootstrap.php.cache line 2818
at HttpKernel->handle(object(Request), '1', true) in /home/tim/web/grip.dev/app/bootstrap.php.cache line 2947
at ContainerAwareHttpKernel->handle(object(Request), '1', true) in /home/tim/web/grip.dev/app/bootstrap.php.cache line 2249
at Kernel->handle(object(Request)) in /home/tim/web/grip.dev/web/app_dev.php line 28

호출 php app/console router:debug하면 다음을 반환합니다.

[router] Current routes
Name                     Method Scheme Host Path
_wdt                     ANY    ANY    ANY  /_wdt/{token}
_profiler_home           ANY    ANY    ANY  /_profiler/
_profiler_search         ANY    ANY    ANY  /_profiler/search
_profiler_search_bar     ANY    ANY    ANY  /_profiler/search_bar
_profiler_purge          ANY    ANY    ANY  /_profiler/purge
_profiler_info           ANY    ANY    ANY  /_profiler/info/{about}
_profiler_import         ANY    ANY    ANY  /_profiler/import
_profiler_export         ANY    ANY    ANY  /_profiler/export/{token}.txt
_profiler_phpinfo        ANY    ANY    ANY  /_profiler/phpinfo
_profiler_search_results ANY    ANY    ANY  /_profiler/{token}/search/results
_profiler                ANY    ANY    ANY  /_profiler/{token}
_profiler_router         ANY    ANY    ANY  /_profiler/{token}/router
_profiler_exception      ANY    ANY    ANY  /_profiler/{token}/exception
_profiler_exception_css  ANY    ANY    ANY  /_profiler/{token}/exception.css
_configurator_home       ANY    ANY    ANY  /_configurator/
_configurator_step       ANY    ANY    ANY  /_configurator/step/{index}
_configurator_final      ANY    ANY    ANY  /_configurator/final

모든 라우팅은 XAMPP를 사용하는 Windows에서 작동합니다.

어떻게 든 내 apache2 구성과 관련이 있다고 생각합니다. 모드 재 작성을 설정했으며 web/.htaccessRewriteEngine On을 사용합니다. 내 vHost도 'AllowOverride All'로 구성됩니다. 내가 찾은 것 외에는 apache2를 수동으로 구성하는 데 많은 경험이 없습니다.

내 PHP 버전은 5.4.4-14 + deb7u5 입니다.

편집 : 라우팅을 사용자 지정 라우팅 파일로 리디렉션합니다 : (app / config / config.yml)

framework:
    router:
        resource: "@CoreBundle/Resources/config/routing.php"

다음은 routing.php입니다.

<?php

use Symfony\Component\Routing\RouteCollection;
use Symfony\Component\Routing\Route;

$collection = new RouteCollection();

//Routes for other bundles go here

/*
 * Route format for other bundles.
 * -------------------------------
 * $<bundlename>Routing = $loader->import("@<bundlenamespace>/Resources/config/routing.php");
 * $<bundlename>Routing->addPrefix('<Insert bundle prefix>');
 * $collection->addCollection($<bundlename>Routing);
 * -------------------------------
 * Add a whiteline in between each bundle route.
 */

$gripRouting = $loader->import("@GripBundle/Resources/config/routing.php");
$gripRouting->addPrefix('/grip');
$collection->addCollection($gripRouting);

$ddsRouting = $loader->import("@DDSBundle/Resources/config/routing.php");
$ddsRouting->addPrefix('/dds');
$collection->addCollection($ddsRouting);

//Routes for the core bundle go here
$collection->add('login', new Route('/login', array(
    '_controller' => 'CoreBundle:Login:login',
)));

$collection->add('login_check', new Route('/login_check', array()));

$collection->add('core_logout', new Route('/logout', array()));

$collection->add('products', new Route('/products', array(
    "_controller" => "CoreBundle:Default:products",
)));

$collection->add('about', new Route('/about', array(
    "_controller" => "CoreBundle:Default:about",
)));

$collection->add('contact', new Route('/contact', array(
    "_controller" => "CoreBundle:Default:contact",
)));

$collection->add('core_noclient', new Route("/error", array(
    "_controller" => "CoreBundle:Default:noClient",
)));

// Vendor bundles
$securityCollection = $loader->import("@FOSUserBundle/Resources/config/routing/security.xml");
$collection->addCollection($securityCollection);

$profileCollection = $loader->import("@FOSUserBundle/Resources/config/routing/profile.xml");
$profileCollection->addPrefix("/profile");
$collection->addCollection($profileCollection);

$registrationCollection = $loader->import("@FOSUserBundle/Resources/config/routing/registration.xml");
$registrationCollection->addPrefix("/register");
$collection->addCollection($registrationCollection);

$resettingCollection = $loader->import("@FOSUserBundle/Resources/config/routing/resetting.xml");
$resettingCollection->addPrefix("/resetting");
$collection->addCollection($resettingCollection);

$changePasswordCollection = $loader->import("@FOSUserBundle/Resources/config/routing/change_password.xml");
$changePasswordCollection->addPrefix("/profile");
$collection->addCollection($changePasswordCollection);

$gripRouting = $loader->import("@SonataAdminBundle/Resources/config/routing/sonata_admin.xml");
$gripRouting->addPrefix('/admin');
$collection->addCollection($gripRouting);

$gripRouting = $loader->import(".", "sonata_admin");
$gripRouting->addPrefix('/admin');
$collection->addCollection($gripRouting);

$gripRouting = $loader->import("@SonataUserBundle/Resources/config/routing/admin_security.xml");
$gripRouting->addPrefix('/admin');
$collection->addCollection($gripRouting);

$collection->add('core_home', new Route('/', array(
    '_controller' => 'CoreBundle:Default:index',
)));

return $collection;
OxySocks

나는 그것을 고쳤다. 나는 실제로 무슨 일이 일어 났는지에 대해 여전히 파란색에 있지만 PHP-APC와 내 캐시 모두에 의해 발생한 것 같습니다. 캐시를 지우고 폴더의 내용을 제거한 다음 setfacl을 사용하여 권한을 다시 설정했습니다. 또한 composer를 사용하여 업데이트하여 parameters.yml을 적절한 설정으로 새로 고칠 수 있습니다.

이 작은 '포인터'로 누군가를 돕길 바랍니다.

이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.

침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제

에서 수정
0

몇 마디 만하겠습니다

0리뷰
로그인참여 후 검토

관련 기사

분류에서Dev

Symfony 3 경로를 찾을 수 없습니다.

분류에서Dev

Symfony3 FOSRest cgetAction 경로를 찾을 수 없습니다.

분류에서Dev

Symfony 경로를 찾을 수 없습니다.

분류에서Dev

Flutter가 ANDROID_HOME 경로를 찾을 수 없습니다.

분류에서Dev

StreamWriter가 경로의 일부를 찾을 수 없습니다.

분류에서Dev

VMWare가 Linux 헤더 경로를 찾을 수 없습니다.

분류에서Dev

경로를 찾을 수 없습니다

분류에서Dev

Symfony2.7.0 app_dev.php 경로를 찾을 수 없습니다.

분류에서Dev

Symfony 3.1 : "/ logout"경로에 대한 컨트롤러를 찾을 수 없습니다.

분류에서Dev

Nuget.targets : 오류가 경로의 일부를 찾을 수 없습니다.

분류에서Dev

액세스 가능한 이름으로 경고를 찾을 수 없습니다.

분류에서Dev

Jar가 내부 파일의 경로를 찾을 수 없습니다.

분류에서Dev

codeigniter는 경로가 정의 된 위치를 찾을 수 없습니다.

분류에서Dev

codeigniter는 경로가 정의 된 위치를 찾을 수 없습니다.

분류에서Dev

컴파일러가 주어진 경로를 찾을 수 없습니다.

분류에서Dev

IntelliJ IDEA가 내 클래스 경로에서 TestingServer를 찾을 수 없습니다.

분류에서Dev

Ruby Gosu가 배경 이미지를 찾을 수 없습니다.

분류에서Dev

"시스템이 지정된 경로를 찾을 수 없습니다."명령 줄에 오류가 있습니다.

분류에서Dev

Nokogiri가 "("로 시작하는 XPath를 찾을 수 없습니다.

분류에서Dev

jsTree가 ID로 노드를 찾을 수 없습니다.

분류에서Dev

Ui 라우터가 Nodejs로 뷰를 찾을 수 없습니다.

분류에서Dev

OpenDDS 참가자는 서로를 찾을 수 없습니다.

분류에서Dev

Symfony3 HWIOauth 번들은 Google 로그인 확인 경로를 사용 / 찾을 수 없습니다.

분류에서Dev

File.ReadAllText에서 경로의 일부를 찾을 수 없지만 경로가 있습니다.

분류에서Dev

네트워크 경로가있는 경로의 일부를 찾을 수 없습니다.

분류에서Dev

경로를 찾을 수없는 경우 Symfony가 경로 검색으로 리디렉션

분류에서Dev

아이디없이 휴가를 찾을 수 없습니다

분류에서Dev

Symfony : http : //localhost/SymfonyCRUD/web/app_dev.php/hello에 대한 경로를 찾을 수 없습니다.

분류에서Dev

Symfony 3 경로에 대한 컨트롤러 클래스를 찾을 수 없습니다.

Related 관련 기사

  1. 1

    Symfony 3 경로를 찾을 수 없습니다.

  2. 2

    Symfony3 FOSRest cgetAction 경로를 찾을 수 없습니다.

  3. 3

    Symfony 경로를 찾을 수 없습니다.

  4. 4

    Flutter가 ANDROID_HOME 경로를 찾을 수 없습니다.

  5. 5

    StreamWriter가 경로의 일부를 찾을 수 없습니다.

  6. 6

    VMWare가 Linux 헤더 경로를 찾을 수 없습니다.

  7. 7

    경로를 찾을 수 없습니다

  8. 8

    Symfony2.7.0 app_dev.php 경로를 찾을 수 없습니다.

  9. 9

    Symfony 3.1 : "/ logout"경로에 대한 컨트롤러를 찾을 수 없습니다.

  10. 10

    Nuget.targets : 오류가 경로의 일부를 찾을 수 없습니다.

  11. 11

    액세스 가능한 이름으로 경고를 찾을 수 없습니다.

  12. 12

    Jar가 내부 파일의 경로를 찾을 수 없습니다.

  13. 13

    codeigniter는 경로가 정의 된 위치를 찾을 수 없습니다.

  14. 14

    codeigniter는 경로가 정의 된 위치를 찾을 수 없습니다.

  15. 15

    컴파일러가 주어진 경로를 찾을 수 없습니다.

  16. 16

    IntelliJ IDEA가 내 클래스 경로에서 TestingServer를 찾을 수 없습니다.

  17. 17

    Ruby Gosu가 배경 이미지를 찾을 수 없습니다.

  18. 18

    "시스템이 지정된 경로를 찾을 수 없습니다."명령 줄에 오류가 있습니다.

  19. 19

    Nokogiri가 "("로 시작하는 XPath를 찾을 수 없습니다.

  20. 20

    jsTree가 ID로 노드를 찾을 수 없습니다.

  21. 21

    Ui 라우터가 Nodejs로 뷰를 찾을 수 없습니다.

  22. 22

    OpenDDS 참가자는 서로를 찾을 수 없습니다.

  23. 23

    Symfony3 HWIOauth 번들은 Google 로그인 확인 경로를 사용 / 찾을 수 없습니다.

  24. 24

    File.ReadAllText에서 경로의 일부를 찾을 수 없지만 경로가 있습니다.

  25. 25

    네트워크 경로가있는 경로의 일부를 찾을 수 없습니다.

  26. 26

    경로를 찾을 수없는 경우 Symfony가 경로 검색으로 리디렉션

  27. 27

    아이디없이 휴가를 찾을 수 없습니다

  28. 28

    Symfony : http : //localhost/SymfonyCRUD/web/app_dev.php/hello에 대한 경로를 찾을 수 없습니다.

  29. 29

    Symfony 3 경로에 대한 컨트롤러 클래스를 찾을 수 없습니다.

뜨겁다태그

보관