PHP: cannot redefine check_file_access

Bug #1175142 reported by Ronald
This bug affects 6 people
Affects Status Importance Assigned to Milestone
phpmyadmin (Ubuntu)
Fix Released

Bug Description

I'm on a fresh install of Raring Ringtail. After installing phpMyAdmin, the Settings page stayed blank. After some poking around in some source files, I found out that /etc/phpmyadmin/config.inf.php is being eval'd more than once which causes a fatal error because it cannot redefine the function 'check_file_access'. To make things more obscure, phpMyAdmin itself hides this error because it sets error reporting to 0 just before evaluating this file. In the end, Apache just throws a 500 without any trace.

This only happened when opening the settings page (prefs_manage.php). /etc/phpmyadmin/config.inf.php is from the stock Ubuntu package, version 4: The eval is in /usr/share/phpmyadmin/libraries/Config.class.php on line 431.

Surrounding the function block with a

if (!function_exists('check_file_access')) { }

solves the problem.

Related branches

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in phpmyadmin (Ubuntu):
status: New → Confirmed
Thijs Kinkhorst (kink)
Changed in phpmyadmin (Ubuntu):
status: Confirmed → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package phpmyadmin - 4:4.0.1-2

phpmyadmin (4:4.0.1-2) unstable; urgency=low

  * Add /usr/share/javascript to open_basedir config (closes: #708611).
  * Wrap check_file_access() function in in a
    function_exists block, because this file sometimes gets included
    twice (LP: #1175142).

 -- Thijs Kinkhorst <email address hidden> Fri, 17 May 2013 12:50:57 +0200

Changed in phpmyadmin (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Jonas Ranerfors (ranarn) wrote :

Fix committed to Saucy? So when is the fix coming to raring?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers