FriendsOfSymfony / FOSUserBundle

Provides user management for your Symfony project. Compatible with Doctrine ORM & ODM, and custom storages.
https://symfony.com/doc/master/bundles/FOSUserBundle/index.html
MIT License
3.24k stars 1.57k forks source link

fos:user:create and registration does not work #979

Closed Monpoke closed 7 years ago

Monpoke commented 11 years ago

Hello world :)

I would install this bundle on my project. I followed all documentation about this installation. (I'm new on Symfony2)

I've some problems with after the installation. In deed, all way that I use (web & console) says that the user has been created. However, nothing is created in DB.

Can I have some help please ? Thanks :)

n1c01a5 commented 11 years ago

"I've some problems with after the installation." What's problems? "nothing is created in DB" Have you created the DB and shema of DB?

Monpoke commented 11 years ago

@n1c01a5 : The problem is explain in title ^^

(The tuto that I used was https://github.com/FriendsOfSymfony/FOSUserBundle/blob/master/Resources/doc/index.md)

I've updated the DB with app/console doctrine:schema:update --force. My schema is present in DB -> plumedor_users.

I cleaned the cache, dev and prod.

So, normally after tuto, all is configured no ?

Except that after execute the command except that fos:user:create (which said that user has been created), the user account is not insert in the DB.

Sorry if my english is so bad,I'm a small french x)

Monpoke

stof commented 11 years ago

does not work is not an explanation of the issue. It is just telling you have an issue without describing it

Monpoke commented 11 years ago

Sorry ^^"'

ghost commented 11 years ago

is this the same as #804 ?

ghost commented 11 years ago

and/or #773 ? It seems like there are quite a few reports of the data not being inserted in the db.

Monpoke commented 11 years ago

jrobeson : It's exactly the same case I think. I've same sql queries, etc... :/

stof commented 11 years ago

Please provide a setup reproducing the issue. The best way is to start from the standard edition and to add the minimum required code to reproduce the issue. I never faced this issue myself.

Monpoke commented 11 years ago

@stof : It is exactly that I made :/ I downloaded the standard edition, just configured the basic requirements and after, I just followed the FOS doc ^^ I join a link to full code that I have : http://plumedor.fr/uploads/github.tar.gz

Thanks for your answers :)

simonpkerr commented 11 years ago

With regard to issue #804, I'm still trying to get this working. I have a set up here - http://artemis.web-hosting.uk.com/~simonker/SkNd/web/app_dev.php/register/ This is a cut back version of my app just to try and get the registration process working. Looking at the logs, the transaction is started and committed but nothing is inserted. This is working locally (windows) but not remotely (linux cpanel). Also, in my full app, other db inserts are happening fine, just not this. The only thing I can think is that the php set up must be different somehow but looking at the symfony configuration.php file, everything necessary is in place.

simonpkerr commented 11 years ago

is there some specific php module requirement for fosuserbundle? If anyone can help here it will save me having to manually compare 2 different phpinfo's (my local working one and the live non-functional one), trying to find a needle in a haystack. Thanks

stof commented 11 years ago

If you use the default canonicalizer, you need mbstring. If you don't have it, you will need to overwrite the canonicalizer with your own implementation

simonpkerr commented 11 years ago

yes, mbstring is working fine, like I said previously, the transaction to insert is being started, and all the params are sent fine. (see below).

this is the log from the register post action. However, no user is inserted.

DEBUG - "START TRANSACTION" DEBUG - INSERT INTO fos_user (username, username_canonical, email, email_canonical, enabled, salt, password, last_login, locked, expired, expires_at, confirmation_token, password_requested_at, roles, credentials_expired, credentials_expire_at) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) Context: { 1: simon, 2: simon, 3: simon.p.kerr@gmail.com, 4: simon.p.kerr@gmail.com, 5: true, 6: rdqkzdfyrbkc4kcocgsso0ww8gk8048, 7: Qe6nF9HoRiHzyri4h5XBUMbLb4+REGH5MwaX1UrREpdxVpcJvmkfc7AlPPgED8oDlk8QQLeuuFc11Xt2Ig+0OQ==, 8: null, 9: false, 10: false, 11: null, 12: null, 13: null, 14: { }, 15: false, 16: null } DEBUG - "COMMIT" DEBUG - Notified event "kernel.response" to listener "Symfony\Component\Security\Http\Firewall\ContextListener::onKernelResponse". DEBUG - Write SecurityContext in the session

Baachi commented 11 years ago

Stupid question, support your database engine transactions?

stof commented 11 years ago

Well, if the query is logged, it means it should be executed. The issue seems to be in your database setup, not in your PHP code. Check your database logs (or contact the database administrator); It does not look like a FOSUB issue.

simonpkerr commented 11 years ago

i don't think so because other db transactions are working throughout the rest of the app. that's what leads me to think it must be something to do with the php set up (i.e. some module not loaded).

simonpkerr commented 11 years ago

does this shed any light on it? My host is a shared cpanel server and I am connecting to the db with remote_host: 127.0.0.1 and remote_port: ~? Would this cause any issues?