Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: white page after signup on e107.nl and after clicking on activating link in email #5131

Closed
Jimmi08 opened this issue Dec 3, 2023 · 4 comments · Fixed by #5134
Closed
Labels
type: bug A problem that should not be happening

Comments

@Jimmi08
Copy link
Contributor

Jimmi08 commented Dec 3, 2023

What e107 version are you using?

Latest Github version (just updated)

Bug description

When I registered on e107.nl I got first error page. I filled all form, if it is important - extended field, signature, avatar.

result after submitting button:
image

After refresh page I got message that user with that name and email already exists, so this error was after creating account.

Registration email received. After click on activation link in email almost asap, I got white page (just white, no error visible), after refreshing I got message about Your account was activated.

This is time record from site (I think):

	7351	03 december 2023 13:55:48	633508	USER_13	Jimako	**IP**	Gebruiker ingelogd	Details
	7350	03 december 2023 13:55:48	631855	USER_13	Jimako	**IP**	Gebruiker ingelogd	Details
	7349	03 december 2023 13:50:23	488442	USER_12	Anoniem	**IP**	Gebruiker bevestigde registratie	Details
	7348	03 december 2023 13:49:48	181208	USER_11	Anoniem	**IP**	Gebruiker aangemeld	Details

And this is from error log sent by Alex:

	 
[Sun Dec 03 13:49:48.265865 2023] [proxy_fcgi:error] [pid 693983:tid 139901320136448] [remote 87.244.210.207:59417] 
AH01071: Got error 'PHP message: PHP Fatal error:  Uncaught TypeError: fwrite(): supplied resource is not a valid stream resource in ****e107_handlers/mail.php:492
Stack trace:
#0 ****e107_handlers/mail.php(492): fwrite()
#1 ****e107_handlers/mail.php(1059): e107Email->logLine()
#2 ****e107_handlers/mail.php(1111): e107Email->arraySet()
#3 ****e107_handlers/mail_manager_class.php(2007): e107Email->sendEmail()
#4 ****e107_handlers/notify_class.php(293): e107MailManager->sendEmails()
#5 ****e107_handlers/notify_class.php(114): notify->send()
#6 ****e107_handlers/event_class.php(232): notify->generic()
#7 ****signup.php(554): e107_event->trigger()
#8 {main}
...', referer: https://e107.nl/signup.php?stage1
 
[Sun Dec 03 13:50:01.583080 2023] [proxy_fcgi:error] [pid 693983:tid 139901513168640] [remote 62.84.245.223:37326] 
AH01071: Got error 'PHP message: PHP Warning:  compact(): Undefined variable $DOWNLOADS_DIRECTORY in ****class2.php on line 213
PHP message: PHP Warning:  compact(): Undefined variable $UPLOADS_DIRECTORY in ****class2.php on line 213
PHP message: PHP Warning:  compact(): Undefined variable $CACHE_DIRECTORY in ****class2.php on line 213
PHP message: PHP Warning:  compact(): Undefined variable $LOGS_DIRECTORY in ****class2.php on line 213
PHP message: PHP Warning:  compact(): Undefined variable $CORE_DIRECTORY in ****class2.php on line 213
PHP message: PHP Warning:  compact(): Undefined variable $WEB_DIRECTORY in ****class2.php on line 213'
 
[Sun Dec 03 13:50:23.528828 2023] [proxy_fcgi:error] [pid 693983:tid 139901261387520] [remote 87.244.210.207:59428] 
AH01071: Got error 'PHP message: PHP Fatal error:  Uncaught TypeError: fwrite(): supplied resource is not a valid stream resource in ****e107_handlers/mail.php:492
Stack trace:
#0 ****e107_handlers/mail.php(492): fwrite()
#1 ****e107_handlers/mail.php(1059): e107Email->logLine()
#2 ****e107_handlers/mail.php(1111): e107Email->arraySet()
#3 ****e107_handlers/mail_manager_class.php(2007): e107Email->sendEmail()
#4 ****e107_handlers/notify_class.php(293): e107MailManager->sendEmails()
#5 ****e107_handlers/notify_class.php(114): notify->send()
#6 ****e107_handlers/event_class.php(232): notify->generic()
#7 ****e107_handlers/e_signup_class.php(423): e107_event...'


### How to reproduce

Alex revert site to older version. He says that problem with signup was solved but activation is still there.


### Expected behavior

No white page

### What browser(s) are you seeing the problem on?

Chrome / Brave

### PHP Version

No sure, I forgot to ask, sorry.
@Jimmi08 Jimmi08 added the type: bug A problem that should not be happening label Dec 3, 2023
@Alex-e107nl
Copy link

Thx @Jimmi08 PHP version with the problem is 8.1.25, Auto-login new user after clicking on signup link ON account gets activated but there's an error. When i use PHP 7.4.33 it all works as expected... Tomorrow i wil bring the e107.nl back at 2.3.3 and try it again on 7.4.33...

@Deltik
Copy link
Member

Deltik commented Dec 4, 2023

I am able to reproduce a similar error if I close the file handle e107Email::$logHandle after opening it but before all the logging activities are completed.

After further examination, I found that e107Email::sendEmail() closes the file handle here or here, but e107Email::sendEmail() could be called more than once in this for loop in e107MailManager::sendEmails(). Although e107Email::openLog() runs again, it has no effect because it detects if there is a valid resource, and even a closed file handle is still a valid resource.

This is indeed a bug with e107.

@Alex-e107nl
Copy link

Thank you Deltik, it is really a php 8.1.25 problem, as soon as I run e107.nl on php 7.4.33 it works fine, create and activate an account and log in immediately after clicking on the activation link. I did my last test with e107 2.3.3 (official release).

CaMer0n added a commit that referenced this issue Dec 4, 2023
Fixes: #5131 Accurate resource open check when using log file handle
@Alex-e107nl
Copy link

Tested and it works with PHP 7.4.33 and PHP 8.1.26, latest git (today), create new account, logged in directly with activation link on e107.nl! GREAT THX!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A problem that should not be happening
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants