Reset password email not sent (and php8 issues)

Get help with installation and running phpBB 3.3.x here. Please do not post bug reports, feature requests, or extension related questions here.
Post Reply
User avatar
axe70
Registered User
Posts: 369
Joined: Sun Nov 17, 2002 10:55 am
Location: Italy
Contact:

Reset password email not sent (and php8 issues)

Post by axe70 »

Hello guys, i run into secondary problems, that on-fly i have not understand how to resolve.
Into an online example, i have users that could reset their pass in phpBB: when i try to reset, the message display that all is ok, and an email will be sent if an account exist. But no email is sent out. Then i check well group permissions, and i see that the group can reset password. Then i check php if it is still sending out emails: ok it is working. Then i change php email into smtp service, email working, but still nothing for the reset pass.
Then i see a console error, since phpBB iframed, into focus property for input field, not allowed,
Blocked autofocusing on a <input> element in a cross-origin subframe.
then i resolve this also, even if on localhost test it is perfectly working, in-fact, nothing, still not sending out reset pass email (even i'm on php8 on localhost, and there are different warnings coming out, related something else, but reset pass works perfectly after some fix i will say after).
Then i cleaned cache, maybe since i disabled the module Edit account settings to avoid email changes in phpBB have something to do with, since it is also about password into same ucp module. Nothing.
Then i reactivate the module, ever to check that it have nothing to interfere with. Nothing.
I see the page load too fast, it seem to skip some process. Really too fast.

I finished my fantasy at moment without going more deep into code and db i assume. Anybody know, what i should check or reset, without i'm finally going to go crazy with this?

About php8 into my localhost instead:
had to add into includes/constants.php file,

Code: Select all

define('MB_OVERLOAD_MAIL', 0);
define('MB_OVERLOAD_STRING', 0);
or phpBB was throwing fatal error on php8, where constants are changing behavior

Now all is working, i do not have get any error except this (at moment):

Code: Select all

Fatal error: Uncaught TypeError: mysqli_real_escape_string(): Argument #1 ($mysql) must be of type mysqli, bool given in F:/HTDOCS/subdomain/phpBB3/phpbb/db/driver/mysqli.php:329 Stack trace: #0 F:/HTDOCS/subdomain/phpBB3/phpbb/db/driver/mysqli.php(329): mysqli_real_escape_string(false, 'reparser_resume') #1 F:/HTDOCS/subdomain/phpBB3/phpbb/db/driver/driver.php(717): phpbb/db/driver/mysqli->sql_escape('reparser_resume') #2 F:/HTDOCS/subdomain/phpBB3/phpbb/db/driver/driver.php(595): phpbb/db/driver/driver->_sql_validate_value('reparser_resume') #3 F:/HTDOCS/subdomain/phpBB3/phpbb/db/driver/factory.php(457): phpbb/db/driver/driver->sql_in_set('config_name', Array, false, true) #4 F:/HTDOCS/subdomain/phpBB3/phpbb/config/db_text.php(132): phpbb/db/driver/factory->sql_in_set('config_name', Array, false, true) #5 F:/HTDOCS/subdomain/phpBB3/phpbb/config/db_text.php(68): phpbb/config/db_text->get_array(Array) #6 F:/HTDOCS/subdomain/phpBB3/phpbb/textreparser/manager.php(63): phpbb/config/db_text->get('reparser_resume') #7 F:/HTDOCS/subdomain/phpBB3/phpbb/cron/task/text_reparser/reparser.php(88): phpbb/textreparser/manager->get_resume_data('text_reparser.p...') #8 F:/HTDOCS/subdomain/phpBB3/cache/production/container_4335734bbdd20f586549a504dff5f80c.php(1999): phpbb/cron/task/text_reparser/reparser->set_reparser('text_reparser.p...') #9 F:/HTDOCS/subdomain/phpBB3/vendor/symfony/dependency-injection/Container.php(306): phpbb_cache_container->getCron_Task_TextReparser_PmTextService() #10 F:/HTDOCS/subdomain/phpBB3/phpbb/di/service_collection.php(57): Symfony/Component/DependencyInjection/Container->get('cron.task.text_...') #11 F:/HTDOCS/subdomain/phpBB3/phpbb/di/service_collection_iterator.php(44): phpbb/di/service_collection->offsetGet('cron.task.text_...') #12 F:/HTDOCS/subdomain/phpBB3/phpbb/cron/manager.php(76): phpbb/di/service_collection_iterator->current() #13 F:/HTDOCS/subdomain/phpBB3/phpbb/cron/manager.php(63): phpbb/cron/manager->load_tasks(Object(phpbb/di/service_collection)) #14 F:/HTDOCS/subdomain/phpBB3/cache/production/container_4335734bbdd20f586549a504dff5f80c.php(1818): phpbb/cron/manager->__construct(Object(phpbb/di/service_collection), Object(phpbb/routing/helper), './', 'php') #15 F:/HTDOCS/subdomain/phpBB3/cache/production/container_4335734bbdd20f586549a504dff5f80c.php(1798): phpbb_cache_container->getCron_ManagerService() #16 F:/HTDOCS/subdomain/phpBB3/cache/production/container_4335734bbdd20f586549a504dff5f80c.php(2268): phpbb_cache_container->getCron_EventListenerService() #17 F:/HTDOCS/subdomain/phpBB3/vendor/symfony/event-dispatcher/EventDispatcher.php(231): phpbb_cache_container->{closure}() #18 F:/HTDOCS/subdomain/phpBB3/vendor/symfony/event-dispatcher/EventDispatcher.php(61): Symfony/Component/EventDispatcher/EventDispatcher->sortListeners('kernel.terminat...') #19 F:/HTDOCS/subdomain/phpBB3/vendor/symfony/event-dispatcher/ContainerAwareEventDispatcher.php(129): Symfony/Component/EventDispatcher/EventDispatcher->getListeners('kernel.terminat...') #20 F:/HTDOCS/subdomain/phpBB3/vendor/symfony/event-dispatcher/EventDispatcher.php(43): Symfony/Component/EventDispatcher/ContainerAwareEventDispatcher->getListeners('kernel.terminat...') #21 F:/HTDOCS/subdomain/phpBB3/phpbb/event/dispatcher.php(62): Symfony/Component/EventDispatcher/EventDispatcher->dispatch('kernel.terminat...', Object(Symfony/Component/HttpKernel/Event/PostResponseEvent)) #22 F:/HTDOCS/subdomain/phpBB3/vendor/symfony/http-kernel/HttpKernel.php(88): phpbb/event/dispatcher->dispatch('kernel.terminat...', Object(Symfony/Component/HttpKernel/Event/PostResponseEvent)) #23 F:/HTDOCS/subdomain/phpBB3/app.php(37): Symfony/Component/HttpKernel/HttpKernel->terminate(Object(phpbb/symfony_request), Object(Symfony/Component/HttpFoundation/Response)) #24 {main} thrown in F:/HTDOCS/subdomain/phpBB3/phpbb/db/driver/mysqli.php on line 329
cleaned all things, but it come out anyway, and i have not still follow on fixing it on db/driver/mysqli.php on line 329: it come out when page that inform that reset has been done and email sent if account exists. phpBB crash, but email is correctly sent.

Asking myself, since i'm 3.3.0 into this localhost install, last phpBB versions resolved these issues?

Anyway these are really not important, the most important is: why the hell, email aren't sent on pass reset into the online site, that it is not in php8, but of course it is assumed that it is not the problem the php version: i assume the problem is something wrong into ACP settings someway, where something conflict or is not triggered correctly. Lost at moment. Thank you.
Screenshot_2020-12-20 Btester Permissions.png
Screenshot_2020-12-20 User Control Panel.png
Last edited by axe70 on Sun Dec 20, 2020 3:09 pm, edited 1 time in total.
User avatar
david63
Registered User
Posts: 19850
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Contact:

Re: Reset password email not sent (and php8 issues)

Post by david63 »

phpBB 3.3.2 is not, as far as I am aware, compatible with PHP8 - there are certainly some issues regarding PHP8 in the Bug Tracker. If you have found further bugs in your testing then they should be added to the Bug Tracker
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored
User avatar
axe70
Registered User
Posts: 369
Joined: Sun Nov 17, 2002 10:55 am
Location: Italy
Contact:

Re: Reset password email not sent (and php8 issues)

Post by axe70 »

Ok David, yes thank you! I will list and i will do while testing on these days.

Going to deep check what's causing the email that is not sent, repeating step by step, and resetting things checking where and why the problem come out, if possible. If anybody know in the while, would be great for my headache!
User avatar
axe70
Registered User
Posts: 369
Joined: Sun Nov 17, 2002 10:55 am
Location: Italy
Contact:

Re: Reset password email not sent (and php8 issues)

Post by axe70 »

Oh ... the problem was not phpBB related (reset pass email not sent):
into an iframed phpBB, the resulting decoded passed url was this:
https://subdomain.w3host.com/phpbb3/app.php%2Fuser%2Fforgot_password
which lead to error, page not found: the nice, was that i'm never noticed of this, due to a subsequent redirect, triggered immediately after.
Reversing, the solution has been to add just a str_replace, to cleanup encoded chars and get this result instead:
https://subdomain.w3host.com/phpbb3/app.php/user/forgot_password
Now all works smooth into the online example.

On localhost where php8 is running, phpBB return error only in the case on prev post reported, that i will may report asap to phpBB Bug Tracker as well with others i will may find out.

Cheers to all! Have a Merry Christmas!
User avatar
axe70
Registered User
Posts: 369
Joined: Sun Nov 17, 2002 10:55 am
Location: Italy
Contact:

Re: Reset password email not sent (and php8 issues)

Post by axe70 »

Oh ... the problem was not phpBB related (reset pass email not sent):
it is a phpBB problem. Finally discovered how to reproduce and why it come out.

Flow:

an user click into the reset password to request a new one:
the email is sent. At this time, the user_passchg field on the user's table, setup the value from 0 to a token.
UNTIL this field do not isset to 0 again (or it is updated to a new one i assume), no new email is sent out by phpBB, no way how many times you can try to reset, reset will not happen.

Let say that now anyway, for some reason the email do not arrive into the user's inbox, so he request again password reset by clicking into it:
phpBB skip, and how the user will have to reset the pass? No way.

I assume the solution should be that on new pass reset request, the value of user_passchg should be updated, or the reset will not happen (email not sent). It is normal that phpBB act like this?
If yes, then almost an admin should be able to reset and resend. But via acp there is no way to do this, even for an admin.
The unique workaround, without changing db value manually, is to setup another email for the user, so the phpBB reset also the user_passchg field for the user when email updated.

I updated the phpBB to latest, and i see the problem/bug still is on.

Last phpBB into php8 do not throw any error on pass reset, like the one reported earlier into this post, it seem fixed, but some other that i will report when finished to be collected.

[EDITED]
User avatar
david63
Registered User
Posts: 19850
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Contact:

Re: Reset password email not sent (and php8 issues)

Post by david63 »

axe70 wrote:
Tue Dec 22, 2020 8:25 am
Last phpBB into php8 do not throw any error on pass reset, like the one reported earlier into this post, it seem fixed, but some other that i will report when finished to be collected.
Error reporting in PHP8 has changed.
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored
User avatar
axe70
Registered User
Posts: 369
Joined: Sun Nov 17, 2002 10:55 am
Location: Italy
Contact:

Re: Reset password email not sent (and php8 issues)

Post by axe70 »

Substantially on 3.3.2 work fine except something that i will report: as suggested, posted this pass reset bug:
viewtopic.php?p=15643976#p15643976
into Bug Tracker
User avatar
axe70
Registered User
Posts: 369
Joined: Sun Nov 17, 2002 10:55 am
Location: Italy
Contact:

Re: Reset password email not sent (and php8 issues)

Post by axe70 »

Just to confirm that in effect, if an user loose his reset password email, there is not way to get another.
It is impossible also for an admin, but the workaround said work:
going to ACP, and changing the user's email to something else (then there is the reset for the field user_passchg on db user's table), then resetting again to the good one, resolve.
So if the user after this, go to reset password, the email is sent out.
But so, the unique hope is that he will receive and do not loose the email another time, or he will fall again into same issue.
Post Reply

Return to “[3.3.x] Support Forum”