Login Issue
Hi
I installed OpenSkedge onto my server. However when i try to login as the admin as per the readme i get an error 500 with
security.DEBUG: Write SecurityContext in the session [] []
request.INFO: Matched route "login_check" (parameters: "_route": "login_check") [] []
security.INFO: Populated SecurityContext with an anonymous Token [] []
security.INFO: No expression found; abstaining from voting. [] []
request.WARNING: Unable to look for the controller as the "_controller" parameter is missing [] []
request.ERROR: Uncaught PHP Exception Symfony\Component\HttpKernel\Exception\NotFoundHttpException: "Unable to find the controller for path "/login_check". Maybe you forgot to add the matching route in your routing configuration?" at /homepages/36/d516172930/htdocs/covivedev/app/bootstrap.php.cache line 995 [] []
[2014-06-26 00:53:12] security.DEBUG: Write SecurityContext in the session [] []
I'm getting the same error here, and I'd like to help, but I'm not sure how to get system information that's useful for debugging.
Update: This is a bug from Doctrine. I used the answer here, and everything magically worked :) http://stackoverflow.com/questions/34816221/is-there-a-doctrine-2-version-that-is-compatible-with-php-5-6
It looks like Doctrine is doing PHP version checks to decide how to instantiate an object, and the version of PHP I'm using (5.6) doesn't support the way Doctrine wanted to instantiate. All I had to do was change line 827 in vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php
The line was originally:
if (PHP_VERSION_ID === 50429 || PHP_VERSION_ID === 50513) {
I changed it to:
if (PHP_VERSION_ID === 50630 || PHP_VERSION_ID === 50429 || PHP_VERSION_ID === 50513) {
The version code 50630 is for 5.6.3, which I have installed, but it might vary for other people. To find my PHP version code, I ran php -r "echo PHP_VERSION_ID;"; echo;.
I would report this as an issue in Doctrine, but I'm not familiar enough with PHP good practice to know whether this is a bug or a feature...
thx @mghoffmann that fixed my issue
I'm glad I could help. But this issue shouldn't be closed. My comment is a workaround, not a fix to the issue. This issue is caused by Doctrine, which means that every time you want to update OpenSkedge, the broken Doctrine files will come back.
This issue should be left open until OpenSkedge isn't affected by the Doctrine issue anymore, or until Doctrine doesn't have the issue anymore. Please re-send it.
reopend due to request. thx @mghoffmann
@CokkocZateki @mghoffmann Thanks for doing the footwork on this. Yeah, the real problem is the version of Doctrine pinned is pre-5.6. Really, everything is pre-5.5. OpenSkedge is well overdue for some upgrades. I'll try to do some investigating today to see if there's a version of Doctrine compatible with Symfony 2.3 and PHP 5.6+.
Heart of the issue is I need to find time to do a real upgrade of this project (becoming easier to find time now that I've finished university, but still a juggling act)
I've added PHP 5.6, PHP 7 to the 1.2.x roadmap
ah nice. does that mean dev work is still ongoing @maxfierke ?