Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    1,032
    Plugin Contributions
    24

    Default /admin/local/configure.php adds /includes to DIR_FS_ADMIN

    (Windows Xampp server)

    If an admin/includes/local/configure.php is in use, the code to create the FS_ADMIN constant adds /includes to the path.

    I found the Mysql Backup page could not load, citing a path error.
    To illustrate this, in backup_mysql.php I changed

    PHP Code:
    //  if (!get_cfg_var('safe_mode') && $dir_ok == true) {
          
    $dir dir(DIR_FS_BACKUP); 
    To
    PHP Code:
    //  if (!get_cfg_var('safe_mode') && $dir_ok == true) {
                      
    echo 'DIR_FS_BACKUP='.DIR_FS_BACKUP.'<br />';//steve
                      
    echo 'DIR_FS_SQL_CACHE='.DIR_FS_SQL_CACHE;//steve
          
    $dir dir(DIR_FS_BACKUP); 
    Results

    1.39 – no local configure
    DIR_FS_BACKUP=D:/My Documents/Business/MySite/spanish website/public_html/tienda_139/MyAdmin/backups/
    DIR_FS_SQL_CACHE=D:/My Documents/Business/MySite/spanish website/public_html/tienda_139/cache

    1.39 – with local configure
    DIR_FS_BACKUP=D:/My Documents/Business/MySite/spanish website/public_html/tienda_139/MyAdmin/backups/
    DIR_FS_SQL_CACHE=D:/My Documents/Business/MySite/spanish website/public_html/tienda_139/cache

    (Note slashes)
    1.5 – no local configure
    DIR_FS_BACKUP=D:\My Documents\Business\MySite\spanish website\public_html\tienda_15\MyAdmin/backups/
    DIR_FS_SQL_CACHE=D:/My Documents/Business/MySite/spanish website/public_html/tienda_15/cache

    1.5 – with local configure. Page fails at $dir = dir(DIR_FS_BACKUP); , debug log created.
    DIR_FS_BACKUP=D:\My Documents\Business\MySite\spanish website\public_html\tienda_15\MyAdmin\includes/backups/
    DIR_FS_SQL_CACHE=D:/My Documents/Business/MySite/spanish website/public_html/tienda_15/cache

    I assume its because this configure is a level below the normal one.

    An edit to the local configure or using an absolute path is fine by me, its only a locally-used file after all. But still, this would trip up the unwary like me.
    Steve
    "Totally Zenned" my a*se!

  2. #2
    Join Date
    Jan 2004
    Posts
    58,258
    Blog Entries
    3
    Plugin Contributions
    106

    Default Re: /admin/local/configure.php adds /includes to DIR_FS_ADMIN

    This may be addressed in a future release.

    The workaround is to enter your own complete path for DIR_FS_ADMIN when using an overriding file in the "local" folder.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donations always welcome: www.zen-cart.com/donate

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 

Similar Threads

  1. v139h fix_cache_key.php and /includes/local/configure.php
    By torvista in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 7 Jan 2012, 08:46 AM
  2. differences between admin/includes/configure and includes/configure?
    By waterloominis in forum General Questions
    Replies: 1
    Last Post: 22 Nov 2011, 09:22 PM
  3. SSL Settings in admin/includes/configure.php
    By maineiac13 in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 18 Oct 2008, 01:19 AM
  4. admin/includes/configure.php blank
    By Talie in forum Upgrading from 1.2 to 1.3.x
    Replies: 4
    Last Post: 5 May 2008, 03:02 AM
  5. No admin/includes/configure.php file?????
    By underworldmagic in forum Installing on a Linux/Unix Server
    Replies: 3
    Last Post: 21 Dec 2006, 11:15 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •