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

PHP session errors details are missing on error page #17084

Closed
cmmcneill opened this issue Aug 18, 2021 · 1 comment · Fixed by #17085
Closed

PHP session errors details are missing on error page #17084

cmmcneill opened this issue Aug 18, 2021 · 1 comment · Fixed by #17085
Assignees
Labels
Bug A problem or regression with an existing feature has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete
Projects
Milestone

Comments

@cmmcneill
Copy link
Contributor

Describe the bug

PHP session errors that cause phpmyadmin to fail to load don't display the underlying error details on the error page, making it very difficult to diagnose the problem. There were some issues with the PHP session already being started in my project, which resulted in the error page showing showing only the generic "Error during session start..." message and no further information.

To Reproduce

This is difficult to reproduce my exact scenario, but this is generally how it to happen:

  1. Disable session.auto_start setting in your php.ini
  2. At the bottom of your config.inc.php file, add a line with session_start(); to start the session prematurely
  3. Try to load phpmyadmin, and it should fail to abort the session because of the session.autostart setting being off (which I suspect is an unrelated bug)
  4. The specific PHP error message will be missing on the error page

Expected behavior

The error page should display the message "session_start(): Ignoring session_start() because a session is already active".

Screenshots

What the error page looks like:
Screen Shot 2021-08-18 at 1 45 22 PM

What it should look like:
Screen Shot 2021-08-18 at 1 45 48 PM

Server configuration

  • Operating system: Ubuntu Linux 18.04
  • Web server: Apache 2.4.29
  • Database version: MariaDB 10.6.4
  • PHP version: 8.0.9
  • phpMyAdmin version: 5.1.1

Client configuration

  • Browser: Firefox 91.0
  • Operating system: macOS 11.4 (Big Sur)

Additional context

The underlying problem seems to be that the ErrorHandler's sliceErrors method doesn't return the errors properly, and instead returns an empty array.

@williamdes williamdes added this to the 5.1.2 milestone Aug 18, 2021
@williamdes williamdes added Bug A problem or regression with an existing feature has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete labels Aug 18, 2021
@williamdes williamdes added this to Needs triage in issues via automation Aug 18, 2021
@williamdes williamdes moved this from Needs triage to Reproduced in issues Aug 18, 2021
@williamdes williamdes self-assigned this Aug 19, 2021
@williamdes
Copy link
Member

Adding session_start(); to my config file made the error pop-up
Issue confirmed

williamdes added a commit to cmmcneill/phpmyadmin that referenced this issue Aug 20, 2021
And fix the modified test

Signed-off-by: William Desportes <williamdes@wdes.fr>
williamdes added a commit to cmmcneill/phpmyadmin that referenced this issue Aug 20, 2021
And fix the modified test

Signed-off-by: William Desportes <williamdes@wdes.fr>
williamdes added a commit that referenced this issue Aug 21, 2021
Signed-off-by: William Desportes <williamdes@wdes.fr>
issues automation moved this from Reproduced to Closed Aug 22, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A problem or regression with an existing feature has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete
Projects
issues
  
Closed
Development

Successfully merging a pull request may close this issue.

2 participants