phpMyAdmin should be able to work without 'examples' DIR.
'examples' is a folder which should not be 'essential' for the tool to work.
Example:
Warning in ./libraries/relation.lib.php#1820
file_get_contents(./examples/create_tables.sql): failed to open stream: No such file or directory
see attachement for more info
No 'PMA_config' stuff is enabled in config.inc.php and no 'phpmyadmin' database is created from examples/create_tables.sql. I never needed this
Or is it now a must for having 'pma__config' and phpmyadmin DB ???
Did you install phpMyAdmin from a Linux distribution? Which distribution?
Some distributors prefer to have examples placed in locations like /usr/share/phpmyadmin/ However, this is facilitated by phpMyAdmin with a configuration. Maybe, you distro has not properly set the examples location.
I tend to agree that example folder is not the location for these SQL scripts. I'll start a discussion with the development regarding this.
Hi,
yes (openSUSE) and I am the maintainer of the package. This all worked fine until 4.2.x
Since 4.3 I am having these strange warnings and its annoying.
'examples' is located in '/usr/share/doc/packages/phpMyAdmin/examples' ...
Where/How to set 'examples' location ?
What if I do not want to use 'pma_stuff' (create_tables.sql) ?
The only way to get rid of these warnings and being able to use phpMyAdmin is to configure and install this 'pma_stuff'.
Is it a 'must' to use 'pma__stuff' now ???
Last edit: Christian Wittmer 2014-12-30
Hi Christian,
I believe that OpenSUSE users should be entitled to the benefits given by the phpMyAdmin configuration storage (what you call 'pma_stuff'). To ease its installation, the auto-configuration was implemented in 4.3. As Isaac says below, defining EXAMPLES_DIR should fix these warnings.
has the USER a chance to DECIDE if he wants this 'auto-configuration'?
Will the user be asked ?
Or is the User forced to use 'pma_stuff'.
I think the USER should be asked if he want this 'Feature' or 'Improvement'. If the User agrees then your 'auto-configuration' can start but not before.
If I'm not mistaken, auto-configuration only starts when a user goes to a database's Operation panel, clicks on "The phpMyAdmin configuration storage has been deactivated. Find out why." then clicks on "Create the phpMyAdmin configuration storage in the current database".
There is also another place where auto-configuration starts. This is controlled by the ZeroConf directive in config.inc.php. However, auto-configuration starts but does not complete due to a bug I just found.
Last edit: Marc Delisle 2014-12-30
Incomplete auto-configuration: fixed with https://github.com/phpmyadmin/phpmyadmin/commit/e30d15d3b8cf7978f751aec6d4db3bc0a55e3303 for 4.3.5.
See also https://sourceforge.net/p/phpmyadmin/bugs/4676.
Last edit: Marc Delisle 2014-12-30
Hi Christian, and thanks for your work bringing phpMyAdmin to openSUSE users.
There's some new functionality to make the "pma_stuff" more automatic, but you've discovered an edge case that wasn't considered when adding this feature.
Note that we already provide a means to move the
examples
directory withdefine('EXAMPLES_DIR', './examples/');
inlibraries/vendor_config.php
; this doesn't help if a user wishes to remove the examples directory completely.To fix this, we should probably:
1) Make the autoconf portion stop immediately if it can't open the .sql file.
2) Better document what exactly the autoconf will and won't do (see 1584)
Last edit: Isaac Bennetch 2014-12-30
If we do move the
.sql
files, we also should add a directive tolibraries/vendor_config.php
for the new folder. It may be obvious to whomever is modifying the code anyway.Yes, or we could just move these scripts to libraries/sql.
Fixed with https://github.com/phpmyadmin/phpmyadmin/commit/1b87db57245d9b6748191dbe7fa968b29f0c17dd
SQL scripts no longer resides in examples directory. Also added SQL_DIR configuration in vendor.conf.