$cfg['TempDir'] (/var/lib/phpmyadmin/tmp 1) is not accessible.

Discussion in 'Installation/Configuration' started by neumann, Feb 10, 2023.

  1. neumann

    neumann Member

    I get this error in phpmyadmin:
    $cfg['TempDir'] (/var/lib/phpmyadmin/tmp 1) is not accessible. phpMyAdmin is not able to cache templates and will be slow because of this

    I searched this forum, but found no answer regarding ubuntu 22.04 with ispc 3.2.9p1

    Just to be safe:
     
  2. pyte

    pyte Well-Known Member HowtoForge Supporter

    Who owns the folder /var/lib/phpmyadmin/tmp? And what are the access rights?

    ls -la /var/lib/phpmyadmin
     
  3. neumann

    neumann Member

    It is as set by the installation script did:

    So access 750 and user/group is ispapps/www-data, which is by the book. :)
    And I access it through https://domain.tld/phpmyadmin
     
  4. pyte

    pyte Well-Known Member HowtoForge Supporter

    Can you them to 755?
    chmod -R 755 /var/lib/phpmyadmin/

    Thats the only thing that differs from my setup.
     
  5. pyte

    pyte Well-Known Member HowtoForge Supporter

    Just noticed... There is a 1 in the output. Can you check the $cfg['TempDir'] in the config file?
     
    till likes this.
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    That's exactly what I was writing a post for :) So no need for me to ask this too. Might be just a typo in the config file.
     
    pyte likes this.
  7. neumann

    neumann Member

    Well I'm looking for phpmyadmin.conf with command locate phpmyadmin.conf.

    I get these locations:
    /etc/apache2/conf-available/phpmyadmin.conf
    /etc/apache2/conf-enabled/phpmyadmin.conf

    In neither of those there are a variable: $cfg['TempDir']
    But theres an alias pointing at /usr/share/phpmyadmin

    So I look there and find a config.inc.php in which at the bottom there is a $cfg['TempDir'] = '/var/lib/phpmyadmin/tmp';
    But here there is no 1 at the end (no typo).

    So I must be looking at the wrong file, so which config file should I be looking for?
     
    Last edited: Feb 10, 2023
  8. pyte

    pyte Well-Known Member HowtoForge Supporter

    You may want to grep for it recursive in the /usr/share/phpmyadmin folder:
    grep -r TempDir

    or a bit less output

    grep -r /var/lib/phpmyadmin/tmp
     
  9. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    possibly also /usr/share/phpmyadmin/libraries/vendor_config.php
     
  10. neumann

    neumann Member

    No useful output.


    No variable of that kind.


    In the meantime I tried renaming the "/tmp" folder to "/tmp 1". But that didn't change anything either.
     
  11. pyte

    pyte Well-Known Member HowtoForge Supporter

    Can you run this and see if it might be anywhere else on the system?
    Code:
    find / -iname "*config.inc.php*"
    IIRC on older systems when installed from a package it might has it's config in the /etc directory.
     
  12. neumann

    neumann Member

    I only find something in my /home (which is a external drive brought over from my previous ispc-server) because I have a lot of backups from earlier installations of ispc.

    Nothing regarding phpmyadmin.
     
  13. pyte

    pyte Well-Known Member HowtoForge Supporter

    Let's check if the config.inc.php you have on your system is the one in use.
    Change the $cfg['TempDir'] path to some random stuff like $cfg['TempDir'] = '/var/lib/phpmyadmin/thisisatest'; and see if the error message changes.
     
  14. neumann

    neumann Member

    See this is interesting, As you can see I did what you suggested, and the output suggests that it IS the config-file in use. But somewhere there's a " 1" appended. I surely haven't done so.
     
  15. pyte

    pyte Well-Known Member HowtoForge Supporter

    Can you please post the configfile as a code block?
     
  16. neumann

    neumann Member

    This is it:
    Code:
    <?php
    /**
     * phpMyAdmin sample configuration, you can use it as base for
     * manual configuration. For easier setup you can use setup/
     *
     * All directives are explained in documentation in the doc/ folder
     * or at <https://docs.phpmyadmin.net/>.
     */
    
    declare(strict_types=1);
    
    /**
     * This is needed for cookie based authentication to encrypt password in
     * cookie. Needs to be 32 chars long.
     */
    $cfg['blowfish_secret'] = 'secret';
    
    /**
     * Servers configuration
     */
    $i = 0;
    
    /**
     * First server
     */
    $i++;
    /* Authentication type */
    $cfg['Servers'][$i]['auth_type'] = 'cookie';
    /* Server parameters */
    $cfg['Servers'][$i]['host'] = 'localhost';
    $cfg['Servers'][$i]['compress'] = false;
    $cfg['Servers'][$i]['AllowNoPassword'] = false;
    
    /**
     * phpMyAdmin configuration storage settings.
     */
    
    /* User used to manipulate with storage */
    $cfg['Servers'][$i]['controlhost'] = 'localhost';
    $cfg['Servers'][$i]['controlport'] = '';
    $cfg['Servers'][$i]['controluser'] = 'pma';
    $cfg['Servers'][$i]['controlpass'] = 'Ez1wgvB7wQ1hJsc';
    
    /* Storage database and tables */
    $cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
    $cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark';
    $cfg['Servers'][$i]['relation'] = 'pma__relation';
    $cfg['Servers'][$i]['table_info'] = 'pma__table_info';
    $cfg['Servers'][$i]['table_coords'] = 'pma__table_coords';
    $cfg['Servers'][$i]['pdf_pages'] = 'pma__pdf_pages';
    $cfg['Servers'][$i]['column_info'] = 'pma__column_info';
    $cfg['Servers'][$i]['history'] = 'pma__history';
    $cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs';
    $cfg['Servers'][$i]['tracking'] = 'pma__tracking';
    $cfg['Servers'][$i]['userconfig'] = 'pma__userconfig';
    $cfg['Servers'][$i]['recent'] = 'pma__recent';
    $cfg['Servers'][$i]['favorite'] = 'pma__favorite';
    $cfg['Servers'][$i]['users'] = 'pma__users';
    $cfg['Servers'][$i]['usergroups'] = 'pma__usergroups';
    $cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding';
    $cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches';
    $cfg['Servers'][$i]['central_columns'] = 'pma__central_columns';
    $cfg['Servers'][$i]['designer_settings'] = 'pma__designer_settings';
    $cfg['Servers'][$i]['export_templates'] = 'pma__export_templates';
    
    /**
     * End of servers configuration
     */
    
    /**
     * Directories for saving/loading files from server
     */
    $cfg['UploadDir'] = '';
    $cfg['SaveDir'] = '';
    
    /**
     * Whether to display icons or text or both icons and text in table row
     * action segment. Value can be either of 'icons', 'text' or 'both'.
     * default = 'both'
     */
    //$cfg['RowActionType'] = 'icons';
    
    /**
     * Defines whether a user should be displayed a "show all (records)"
     * button in browse mode or not.
     * default = false
     */
    //$cfg['ShowAll'] = true;
    
    /**
     * Number of rows displayed when browsing a result set. If the result
     * set contains more rows, "Previous" and "Next".
     * Possible values: 25, 50, 100, 250, 500
     * default = 25
     */
    //$cfg['MaxRows'] = 50;
    
    /**
     * Disallow editing of binary fields
     * valid values are:
     *   false    allow editing
     *   'blob'   allow editing except for BLOB fields
     *   'noblob' disallow editing except for BLOB fields
     *   'all'    disallow editing
     * default = 'blob'
     */
    //$cfg['ProtectBinary'] = false;
    
    /**
     * Default language to use, if not browser-defined or user-defined
     * (you find all languages in the locale folder)
     * uncomment the desired line:
     * default = 'en'
     */
    //$cfg['DefaultLang'] = 'en';
    //$cfg['DefaultLang'] = 'de';
    
    /**
     * How many columns should be used for table display of a database?
     * (a value larger than 1 results in some information being hidden)
     * default = 1
     */
    //$cfg['PropertiesNumColumns'] = 2;
    
    /**
     * Set to true if you want DB-based query history.If false, this utilizes
     * JS-routines to display query history (lost by window close)
     *
     * This requires configuration storage enabled, see above.
     * default = false
     */
    //$cfg['QueryHistoryDB'] = true;
    
    /**
     * When using DB-based query history, how many entries should be kept?
     * default = 25
     */
    //$cfg['QueryHistoryMax'] = 100;
    
    /**
     * Whether or not to query the user before sending the error report to
     * the phpMyAdmin team when a JavaScript error occurs
     *
     * Available options
     * ('ask' | 'always' | 'never')
     * default = 'ask'
     */
    //$cfg['SendErrorReports'] = 'always';
    
    /**
     * 'URLQueryEncryption' defines whether phpMyAdmin will encrypt sensitive data from the URL query string.
     * 'URLQueryEncryptionSecretKey' is a 32 bytes long secret key used to encrypt/decrypt the URL query string.
     */
    //$cfg['URLQueryEncryption'] = true;
    //$cfg['URLQueryEncryptionSecretKey'] = '';
    
    /**
     * You can find more configuration options in the documentation
     * in the doc/ folder or at <https://docs.phpmyadmin.net/>.
     */
    
    //$cfg['TempDir'] = '/var/lib/phpmyadmin/tmp';
    $cfg['TempDir'] = '/var/lib/phpmyadmin/thisisatest';
    
     
  17. neumann

    neumann Member

    Any ideas on from where the typo can originate?
     
  18. pyte

    pyte Well-Known Member HowtoForge Supporter

    What happens when you remove the $cfg['TempDir'] line completly? Does it display a message that phpmyadmin might be slow due to a missing TempDir?

    May copy over the config from the config.inc.sample.conf and reconfigure again to see if it helps.

    What is the version of phpmyadmin you are using, might update to the newest release?
     
  19. schwim

    schwim Member HowtoForge Supporter

    Did you happen to solve this issue , @neumann ? I've got this error on a new ISPC install, although not with the <space>1 included.
     
  20. pyte

    pyte Well-Known Member HowtoForge Supporter

    Check if the directory exists and if the permissions are set correctly.
     

Share This Page