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

Error reporting disabled function, 4.9.x #16256

Closed
williamdes opened this issue Jul 12, 2020 · 6 comments
Closed

Error reporting disabled function, 4.9.x #16256

williamdes opened this issue Jul 12, 2020 · 6 comments
Assignees
Labels
Bug A problem or regression with an existing feature
Projects
Milestone

Comments

@williamdes
Copy link
Member

Hi @williamdes , I'm using version 4.9.5deb2 and I'm still seeing this error:

image

Your fixes are already present in ErrorHandler.php
I'm using PHP 7.4 + FPM, and my php.ini looks like this:

/etc/php/7.4/fpm/php.ini

; Only errors
error_reporting = E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR
...
disable_functions = error_reporting,pcntl_alarm,pcntl_fork,...

I need to keep this configuration for now until I solve migration issues. Any chance to fix this or a patch I can apply in the meanwhile? I'm using latest pma version from https://launchpad.net/~phpmyadmin/+archive/ubuntu/ppa

Thank you.

UPDATE: Uninstalling php-xdebug temporaly solves it, but I'd like to keep it.

Originally posted by @LufoX11 in #15592 (comment)

@williamdes
Copy link
Member Author

Hi @LufoX11
Thank you for report, I will have a look into it when I have access to my workstation and proper internet

By the way I am working on the packaging of 5.0 for Debian and 5.0 will be uploaded to the PPA when everything is ready maybe in some weeks or a months, depending on available free time

@williamdes williamdes self-assigned this Jul 12, 2020
@williamdes williamdes added the Bug A problem or regression with an existing feature label Jul 12, 2020
@williamdes williamdes added this to Needs triage in issues via automation Jul 12, 2020
@LufoX11
Copy link

LufoX11 commented Jul 12, 2020

Thank you @williamdes I'll be waiting then.

@williamdes williamdes moved this from Needs triage to Medium priority in issues Jul 25, 2020
@williamdes
Copy link
Member Author

function_exists('error_reporting') returns true on php < 8.0 and on php 8.0+ false
See: https://php.watch/versions/8.0/disable_functions-redeclare

@williamdes
Copy link
Member Author

williamdes commented Jul 25, 2020

@LufoX11 could you try out this patch (0e344b6) ?

@williamdes williamdes added this to the 5.0.3 milestone Jul 25, 2020
williamdes added a commit that referenced this issue Jul 26, 2020
Signed-off-by: William Desportes <williamdes@wdes.fr>
issues automation moved this from Medium priority to Closed Jul 28, 2020
@LufoX11
Copy link

LufoX11 commented Jul 29, 2020

@williamdes sorry for the delay. I can confirm your patch solves it. I had to manually apply the changes since my files were a bit different from the ones you built the patch for. Eg:

libraries/classes/Config.php

 764     public function loadDefaults()
 765     {
 766         $cfg = array();
 767         if (! @file_exists($this->default_source)) {
 768             $this->error_config_default_file = true;
 769             return false;
 770         }                                                                                                                                                                  
 771         $canUseErrorReporting = function_exists('error_reporting');
 772         if ($canUseErrorReporting) {
 773             $old_error_reporting = error_reporting(0);
 774         }
 775         ob_start();
 776         $GLOBALS['pma_config_loading'] = true;
 777         $eval_result = include $this->default_source;
 778         $GLOBALS['pma_config_loading'] = false;
 779         ob_end_clean();
 780         if ($canUseErrorReporting) {
 781             error_reporting($old_error_reporting);
 782         }

Thanks!

@williamdes
Copy link
Member Author

Thank you for the feedback, I patched 5.x files ;)
That said I am still working on packaging 5.x on Debian

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 30, 2021
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
Projects
issues
  
Closed
Development

No branches or pull requests

2 participants