Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#4040 (ok 4.1.9) Fatal error while resetting settings

4.1.8
fixed
Marc Delisle
prefs (1)
1
2014-03-06
2013-07-30
Ann + J.M.
No

When a user tries to reset their settings, a PHP error message is shown instead.

Steps to reproduce (config auth):

  1. In the server view, click the Settings tab.
  2. In the "Reset" box, click the "Reset" button.

Expected:
Green check message "Configuration has been loaded."

Actual:
PHP Fatal error: Call to a member function getPath() on a non-object in libraries/Util.class.php on line 183

The problematic line is:
if (is_readable($_SESSION['PMA_Theme']->getPath() . '/sprites.lib.php')) {

6e12d1a0881434d9e067907c979f7749d1a73c37 is the first bad commit
commit 6e12d1a0881434d9e067907c979f7749d1a73c37
Author: Rouslan Placella rouslan@placella.com
Date: Tue Jun 5 15:36:38 2012 +0100

Ensure that PMA_Response is instanciated in common.inc.php

:040000 040000 f70973063a89be38e70839afc79890bb7d9e84f7 a90bccadfaf8f9d794f741fdece19eb06d519e5c M      libraries

Related

Bugs: #3627

Discussion

1 2 > >> (Page 1 of 2)
  • Marc Delisle
    Marc Delisle
    2013-08-07

    Cannot reproduce with phpMyAdmin 4.0.5. Tested under PHP 5.4.4 and 5.3.25. Linux server.

     
  • Maxim Volobuev
    Maxim Volobuev
    2013-08-08

    I had this issue too, but I found that it's caused by incorrect settings of webserver. It happens when "PHP_SELF" variable is empty, thus will be good to check correctness of this variable first.

     
  • Michal Čihař
    Michal Čihař
    2013-08-11

    I see this error occasionally on the demo server as well and steps described here do reproduce it on both master and QA_4_0.

     
  • Marc Delisle
    Marc Delisle
    2013-09-21

    • assigned_to: Rouslan Placella --> Marc Delisle
     
  • Marc Delisle
    Marc Delisle
    2013-09-21

    Hi J.M., Michal and Maxim,

    The situation where PHP_SELF is empty has been handled. Can you still reproduce this problem in 4.0.7-rc1?

     
  • Marc Delisle
    Marc Delisle
    2013-09-21

    • status: open --> pending
     
  • Michal Čihař
    Michal Čihař
    2013-09-23

    I still see this error in server error log it in both master and QA_4_0:

    PHP Fatal error: Call to a member function getPath() on a non-object in master-config/libraries/Util.class.php on line 183

    PHP Fatal error: Call to a member function getPath() on a non-object in QA_4_0/libraries/Util.class.php on line 166

     
  • Marc Delisle
    Marc Delisle
    2013-09-24

    • status: pending --> open
    • assigned_to: Marc Delisle --> nobody
     
  • Smita Kumari
    Smita Kumari
    2014-02-26

    Hi,
    I am able to reproduce it, I get the fatal error in apache error log saying "
    PHP Fatal error: Call to a member function getPath() on a non-object in /var/www/phpmyadmin/libraries/Util.class.php on line 184"
    Though there is no error shown on UI, at the user interface I get the expected message "Configuration has been saved" .
    Also the error comes only when active theme is "pmahomme". Because in the code we are unsetting the SESSION['PMA_Theme_Manager'] and $_SESSION['PMA_Theme'] if the current theme is not "original".

    So I have a Question:
    Currently when we reset the settings, active theme doesn't reset to default one, which is "pmahomme", it remains same. Is it the correct behaviour or should it reset the current theme to default one?

    So if we don't need to reset the theme to default one, then just removing the unset statement which is unsetting themes session variables should fix the issue. Otherwise instead of unsetting, setting the themes session variables to default theme will fix the issue.

    Please let me know if any concerns, so that I can proceed with fixing this bug.

    Thanks.

     
  • Marc Delisle
    Marc Delisle
    2014-03-03

    • summary: Fatal error while resetting settings --> (ok 4.1.9) Fatal error while resetting settings
    • status: open --> resolved
    • assigned_to: Marc Delisle
    • Group: 4.0.5 --> 4.1.8
    • Priority: 5 --> 1
     
1 2 > >> (Page 1 of 2)