This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use the new forum.
Home » support » symfony 1.3 and 1.4 » routing set, but getting 404 tho
routing set, but getting 404 tho [message #102556] Thu, 15 July 2010 21:26 Go to next message
TimB  is currently offline TimB
Messages: 14
Registered: June 2010
Location: Düsseldorf, Germany
Junior Member
hey folks,

I am just about to set up my first project with symfony and obviously it would be too easy if there weren't any problems. Wink

At first I've installed the sfDoctrineGuardPlugin, which seemed to work pretty fine. I set the is_secure configuration to true in security.yml, and I - as espected - see the login form instead of my homepage. But when testing the login itself...

Quote:


Not Found

The requested URL /csmtools/login was not found on this server.


(same with lostPassword)

routing.yml:

sf_guard_signin:
  url:   /login
  param: { module: sfGuardAuth, action: signin }
        
sf_guard_signout:
  url:   /logout
  param: { module: sfGuardAuth, action: signout }
        
sf_guard_password:
  url:   /lostPassword
  param: { module: sfGuardAuth, action: password }

# default rules
...


I didn't change the .htaccess and mod_rewrite is enabled on my server. From my point of view everything should be fine, but maybe I missed something. But what?

Thanks in advance,
Tim
Re: routing set, but getting 404 tho [message #102564 is a reply to message #102556 ] Fri, 16 July 2010 05:16 Go to previous messageGo to next message
sescandell  is currently offline sescandell
Messages: 65
Registered: December 2008
Location: France
Member
Hi !

Is it a Symfony generated error ? (do you have the background of SYmfony associated with this message ?)

Or the error is coming from the web server ?

If it is a symfony generated error, try your website using the frontend_dev.php environment (that means, for example and assuming your app is named frontend, if your website is located at http://www.csmtools.com use the address http://www.csmtools.com/frontend_dev.php) and post the error here (or resolve it by yourself if you can Wink)

If the error is coming from the server, post your (assuming that you are using Apache) apache configuration file (especially the virtual host parts)

Waiting for you Wink

[Updated on: Fri, 16 July 2010 05:17]

Re: routing set, but getting 404 tho [message #102633 is a reply to message #102556 ] Fri, 16 July 2010 20:43 Go to previous messageGo to next message
TimB  is currently offline TimB
Messages: 14
Registered: June 2010
Location: Düsseldorf, Germany
Junior Member
The error came from Apache. Just as you mentioned "Virtual Server" I thought about the way I addressed the page and risked another view on the "running symfony" chapter and voilá, the 404 does not appear anymore.

Adressing way before (/sf did not work, too, btw; do not do this! Wink):
Alias /csmtools "E:/csmtools.com/web"
<Directory "E:/csmtools.com/web">
    DirectoryIndex index.php index.html
    Options Indexes FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>
Alias /sf "E:/csmtools.com/lib/vendor/symfony/data/web/sf"
<Directory "E:/csmtools.com/lib/vendor/symfony/data/web/sf">
  AllowOverride All
  Allow from All
</Directory>


Adressing way now:
<VirtualHost 127.0.0.1:80>
  ServerName csmtools.localhost
  
  DocumentRoot "E:/csmtools.com/web"
  DirectoryIndex index.php
  <Directory "E:/csmtools.com/web">
    AllowOverride All
    Allow from All
  </Directory>

  Alias /sf "E:/csmtools.com/lib/vendor/symfony/data/web/sf"
  <Directory "E:/csmtools.com/lib/vendor/symfony/data/web/sf">
    AllowOverride All
    Allow from All
  </Directory>
</VirtualHost>


So, now I got rid of the 404 error, but the login still doesn't work. It tells me my username/password was incorrect. Tried the admin/admin combination from the README. There is some sfGuard.yml in data/fixtures which contains these data, but nothing's in the database. Is that correct?
Re: routing set, but getting 404 tho [message #102640 is a reply to message #102633 ] Sat, 17 July 2010 00:23 Go to previous messageGo to next message
esukf  is currently offline esukf
Messages: 65
Registered: December 2006
Member
You need to have users in the database. Either load the fixtures:

symfony doctrine:data-load


or add a user via the CLI

symfony guard:create-user username password


Run symfony from the CLI without any arguments to see help for other guard CLI tasks.


[Updated on: Sat, 17 July 2010 00:23]

Re: routing set, but getting 404 tho [message #102657 is a reply to message #102640 ] Sat, 17 July 2010 14:54 Go to previous message
TimB  is currently offline TimB
Messages: 14
Registered: June 2010
Location: Düsseldorf, Germany
Junior Member
I thought so. Smile I executed that command in the command but with the application name as argument.

symfony doctrine:data-load csmtools


Although I copied the fixtures.sample.yml to data/fixtures/sfGuard.yml this did not work. Just as I left out the application argument - just like you've written - the data has been loaded to the database. Now it works. Smile

Thank you very much.

[Updated on: Sat, 17 July 2010 14:54]

Previous Topic:Currency Converter (sfRatePlugin)
Next Topic:Autogenerated classes are not generated
Goto Forum:
  

powered by FUDforum - copyright ©2001-2004 FUD Forum Bulletin Board Software