Menu

#4675 (ok 4.4) phpMyAdmin should be able to work without 'examples' DIR

4.3.4
fixed
None
Low
2015-04-01
2014-12-30
No

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 ???

1 Attachments

Discussion

  • Madhura Jayaratne

    • assigned_to: Madhura Jayaratne
     
  • Madhura Jayaratne

    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.

     
  • Christian Wittmer

    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
    • Marc Delisle

      Marc Delisle - 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.

       
      • Christian Wittmer

        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.

         
        • Marc Delisle

          Marc Delisle - 2014-12-30

          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".

           
          • Marc Delisle

            Marc Delisle - 2014-12-30

            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
  • Isaac Bennetch

    Isaac Bennetch - 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 with define('EXAMPLES_DIR', './examples/'); in libraries/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
  • Isaac Bennetch

    Isaac Bennetch - 2014-12-30

    If we do move the .sql files, we also should add a directive to libraries/vendor_config.php for the new folder. It may be obvious to whomever is modifying the code anyway.

     
    • Marc Delisle

      Marc Delisle - 2014-12-30

      Yes, or we could just move these scripts to libraries/sql.

       
  • Madhura Jayaratne

    • summary: phpMyAdmin should be able to work without 'examples' DIR --> (ok 4.4) phpMyAdmin should be able to work without 'examples' DIR
    • status: open --> resolved
    • Priority: 5 --> 1
     
  • Marc Delisle

    Marc Delisle - 2015-02-15
    • Priority: 1 --> Low
     
  • Marc Delisle

    Marc Delisle - 2015-04-01
    • Status: resolved --> fixed
     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.