I tried at http://demo.phpmyadmin.net (phpMyAdmin 3.3.0-dev) to optimize the database information_shema. I switched to the database, selected all 28 tables and then i selected Optimize Table. I got in Firefox 3.0.10 the error "Fatal error: Cannot redeclare pma_tableheader() in /srv/http/pma.cihar.com/trunk-config/db_structure.php on line 83".
On my server, this produces an Apache segmentation fault ... (PHP 5.2.9)
I tried the same steps on my local server and got the error too. I'm using Windows XP SP3 with Apache 2.2.11, PHP 5.2.9-2, MySQL 5.1.34 and phpMyAdmin 3.1.5.
The error says "Fatal error: Cannot redeclare pma_tableheader() (previously declared in E:\Programme\Lokaler Server\Apache Software Foundation\Apache2.2\htdocs\phpmyadmin\db_structure.php:81) in E:\Programme\Lokaler Server\Apache Software Foundation\Apache2.2\htdocs\phpmyadmin\db_structure.php on line 116".
This is a good hint, as line 116 is not a function definition but only contains a comment that looks like a function definition. What happens if you replace your line 116 which is
} // end function PMA_TableHeader()
to
}
Well, I think that all the operations in this dialog "With selected" just do not make sense for information_schema (apart from Print view) and we should get rid of them.
If i change "} // end function PMA_TableHeader()" to "}" i get the same error. But i debugged the code and figured out that the db_structure.php is included two times. After the db_structure.php is included the first time the following happens:
-> db_structure.php includes ./libraries/mult_submits.inc.php on line 26
-> mult_submits.inc.php is includes ./sql.php on line 409
-> sql.php includes ./db_structure.php on line 314
I think that is the reason why pma_tableheader() is declared 2 times.
Good analysis! I'll see what can be done to remediate this wrong code path.
Fixed in subversion, thanks for reporting.