Symfony 2.3.* 인증
-
26-12-2019 - |
문제
새로 설치 테스트 후 Symfony
2.3 내부 방랑자 Ubuntu 12.04.4
그리고 14.04
이와 같이:
composer create-project symfony/framework-standard-edition login_not_working 2.3.*
업데이트 공급업체:
composer install
다음 첫 번째 줄에서 app_dev.php를 다음과 같이 편집하세요. <?php
권한의 경우:
umask(0000); // This will let the permissions be 0777
이동:
http://vagrant.dev/app_dev.php/
난 멋진 녹색 버튼을 클릭해 RUN THE DEMO
문자를 보내고 로그인을 시도해보세요 user/userpass
또는 admin/adminpass
.Symfony는 나를 다음으로 리디렉션합니다.
http://vagrant.dev/app_dev.php/
그리고 프로파일러에서 매우 인상적인 메시지를 봤습니다. You are not authenticated.
그리고 매우 인상적인 빨간색 버튼도 있습니다 :D
이는 테스트용일 뿐이며 실제 애플리케이션에서는 동일한 일이 발생하지만 설정이 다릅니다...거기 내가 사용하고 있어 SonataUserBundle
확장되는 FOSUserBundle
...하지만 똑같이 행동합니다...
적어도 3개의 다른 브라우저에서 쿠키를 삭제하고 콘솔을 사용하여 수동으로 캐시를 정리했습니다....야다 야다...
내 방랑자 상자 설정에서 약간의 권한 또는 세션 또는...와 같은 냄새가 납니다.얘야 이게 변태인가 뭔데?
편집하다:
그래서 저는 두 앱(깨끗한 테스트와 실제 앱을 모두 업로드했습니다. SonataUserBundle
) 내 VPS에 연결했는데 둘 다 잘 작동합니다.아직도 내 방랑자 상자 중 인증이 작동하지 않는 경우가 있습니까?
그리고 app/check.php
산출:
$ php app/check.php
OK PHP version must be at least 5.3.3 (5.5.12-2+deb.sury.org~precise+1 installed)
OK PHP version must not be 5.3.16 as Symfony wont work properly with it
OK Vendor libraries must be installed
OK app/cache/ directory must be writable
OK app/logs/ directory must be writable
OK date.timezone setting must be set
OK Configured default timezone "Europe/Berlin" must be supported by your installation of PHP
OK json_encode() must be available
OK session_start() must be available
OK ctype_alpha() must be available
OK token_get_all() must be available
OK simplexml_import_dom() must be available
OK detect_unicode must be disabled in php.ini
OK xdebug.show_exception_trace must be disabled in php.ini
OK xdebug.scream must be disabled in php.ini
OK PCRE extension must be available
** Optional recommendations **
OK xdebug.max_nesting_level should be above 100 in php.ini
OK Requirements file should be up-to-date
OK You should use at least PHP 5.3.4 due to PHP bug #52083 in earlier versions
OK When using annotations you should have at least PHP 5.3.8 due to PHP bug #55156
OK You should not use PHP 5.4.0 due to the PHP bug #61453
OK When using the logout handler from the Symfony Security Component, you should have at least PHP 5.4.11 due to PHP bug #63379 (as a workaround, you can also set invalidate_session to false in the security logout handler configuration)
OK You should use PHP 5.3.18+ or PHP 5.4.8+ to always get nice error messages for fatal errors in the development environment due to PHP bug #61767/#60909
OK PCRE extension should be at least version 8.0 (8.12 installed)
OK PHP-XML module should be installed
OK mb_strlen() should be available
OK iconv() should be available
OK utf8_decode() should be available
OK posix_isatty() should be available
OK intl extension should be available
OK intl extension should be correctly configured
OK intl ICU version should be at least 4+
OK a PHP accelerator should be installed
OK short_open_tag should be disabled in php.ini
OK magic_quotes_gpc should be disabled in php.ini
OK register_globals should be disabled in php.ini
OK session.auto_start should be disabled in php.ini
OK PDO should be installed
OK PDO should have some drivers installed (currently available: mysql, sqlite)
해결책
어쨌든, 제 질문에 (일종의) 답변을 드리고 청중을 위해... 감사합니다. 저는 괜찮습니다...;)
memcached에 세션을 저장하도록 Symfony를 구성했는데 문제가 해결된 것 같습니다.이것을 확인하기 위해 다른 기계/방랑자에서 이것을 테스트하겠습니다 :D
이 "(kinf of)"는 완전히 다른 이야기입니다. 하지만 이에 대해서는 나중에 다루겠습니다. :D
편집하다
나는 이것을 2개의 방랑 상자에서 더 테스트하고 memcached에 세션을 저장하여 해결했습니다 :)