Results 1 to 6 of 6
  1. #1
    Join Date
    Aug 2004
    Posts
    762
    Plugin Contributions
    0

    Default Configuration Problem - Forbidden Access to certain areas?

    Hi DrByte and Team! Hopefully this is an easy solution. I know that it's something I did, but I can't narrow it down.

    When I go to the "Install SQL Patch" page, it loads fine. But if I try to run a script (or even by hitting the "Send" button with no SQL input), I get a blank window with the same error in my Apache log:

    [Tue Mar 31 17:04:21 2015] [error] [client 76.127.117.11] client denied by server configuration: /home/mjmmagic/public_html/store/admin/includes/languages/english/images, referer: https://www.mjmmagic.com/store/admin/sqlpatch.php

    Now, I have no idea why it's referencing the "images" directory in the ADMIN path, since the following path doesn't exist:
    /home/mjmmagic/public_html/store/admin/includes/languages/english/images

    But still, I am not sure if that is the problem or not.

    The same thing happens when I try to do other things too. For example, I just installed the SitemapXML module. That loads fine and creates the sitemaps.....but when the popup window runs the module, it just stays white, and that too throws the following Apache error:


    [Tue Mar 31 17:05:58 2015] [error] [client 76.127.117.11] client denied by server configuration: /home/mjmmagic/public_html/store/admin/includes/languages/english/images, referer: https://www.mjmmagic.com/store/admin/sitemapxml.php

    As you can see, it's the SAME ERROR even though we are talking about two different things. So this shows that it's some kind of permission or misconfiguration on my end.

    Any ideas on how to resolve that, or what I should look for?

    (For the record, I just upgraded from 1.5.1 to 1.5.4 in case that helps explain anything).
    Last edited by Jeff_Mash; 31 Mar 2015 at 11:29 PM.
    - Jeff

  2. #2
    Join Date
    Jul 2012
    Posts
    16,719
    Plugin Contributions
    17

    Default Re: Configuration Problem - Forbidden Access to certain areas?

    Post your admin/includes/configure.php file obscuring your DB_Password and if included your admin folder name. It may also be beneficial to include the store's includes/configure.php with the same direction.

    When posting place between the code tags generated when selecting the # button above the text area.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3
    Join Date
    Aug 2004
    Posts
    762
    Plugin Contributions
    0

    Default Re: Configuration Problem - Forbidden Access to certain areas?

    Yeah, I think it has something to do with a misconfiguration......I'm now seeing random buttons in my Admin area missing. Randomly. Like the EDIT button for my Edit Orders is gone, and when I try to view it, I get the following error:

    "You don't have permission to access /store/@dm1n/includes/languages/english/images/buttons/button_edit.gif on this server."

    I am jumping so much between the old server, new server, and uploading files that I'm sure I screwed something up!

    Anyway, here is my admin configuration file. Let me know if you see anything goofy:

    Code:
    <?php
    
      define('HTTP_SERVER', 'https://www.mjmmagic.com');
      define('HTTPS_SERVER', 'https://www.mjmmagic.com');
      define('HTTP_CATALOG_SERVER', 'https://www.mjmmagic.com');
      define('HTTPS_CATALOG_SERVER', 'https://www.mjmmagic.com');
    
      // secure webserver for admin?  Valid choices are 'true' or 'false' (including quotes).
      define('ENABLE_SSL_ADMIN', 'true');
    
      // secure webserver for storefront?  Valid choices are 'true' or 'false' (including quotes).
      define('ENABLE_SSL_CATALOG', 'false');
    
    // NOTE: be sure to leave the trailing '/' at the end of these lines if you make changes!
    // * DIR_WS_* = Webserver directories (virtual/URL)
      // these paths are relative to top of your webspace ... (ie: under the public_html or httpdocs folder)
      $t1 = parse_url(HTTP_SERVER);$p1 = $t1['path'];$t2 = parse_url(HTTPS_SERVER);$p2 = $t2['path'];
      
      define('DIR_WS_ADMIN', preg_replace('#^' . str_replace('-', '\-', $p1) . '#', '', dirname($_SERVER['SCRIPT_NAME'])) . '/');
      define('DIR_WS_CATALOG', '/store/');
      define('DIR_WS_HTTPS_ADMIN', preg_replace('#^' . str_replace('-', '\-', $p2) . '#', '', dirname($_SERVER['SCRIPT_NAME'])) . '/');
      define('DIR_WS_HTTPS_CATALOG', '/store/');
    
      define('DIR_WS_IMAGES', 'images/');
      define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
      define('DIR_WS_CATALOG_IMAGES', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'images/');
      define('DIR_WS_CATALOG_TEMPLATE', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'includes/templates/');
      define('DIR_WS_INCLUDES', 'includes/');
      define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
      define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
      define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
      define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');
      define('DIR_WS_CATALOG_LANGUAGES', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'includes/languages/');
    
    // * DIR_FS_* = Filesystem directories (local/physical)
      define('DIR_FS_ADMIN', realpath(dirname(__FILE__) . '/../') . '/');
      define('DIR_FS_CATALOG', '/home/mjmmagic/public_html/store/');
    
      define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/');
      define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/');
      define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/');
      define('DIR_FS_CATALOG_TEMPLATES', DIR_FS_CATALOG . 'includes/templates/');
      define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/');
      define('DIR_FS_EMAIL_TEMPLATES', DIR_FS_CATALOG . 'email/');
      define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
    
    // define our database connection
      define('DB_TYPE', 'mysql');
      define('DB_PREFIX', 'zen_');
      define('DB_CHARSET', 'utf8');
      define('DB_SERVER', 'localhost');
      define('DB_SERVER_USERNAME', 'XXXXXXXX');
      define('DB_SERVER_PASSWORD', 'XXXXXXXXX');
      define('DB_DATABASE', 'zc154');
    
      // The next 2 "defines" are for SQL cache support.
      // For SQL_CACHE_METHOD, you can select from:  none, database, or file
      // If you choose "file", then you need to set the DIR_FS_SQL_CACHE to a directory where your apache
      // or webserver user has write privileges (chmod 666 or 777). We recommend using the "cache" folder inside the Zen Cart folder
      // ie: /path/to/your/webspace/public_html/zen/cache   -- leave no trailing slash
      define('SQL_CACHE_METHOD', 'none');
      define('DIR_FS_SQL_CACHE', '/home/mjmmagic/public_html/store/cache');
    - Jeff

  4. #4
    Join Date
    Apr 2006
    Location
    West Salem, IL
    Posts
    2,739
    Plugin Contributions
    0

    Default Re: Configuration Problem - Forbidden Access to certain areas?

    ....and now you have to change the folder name of your admin as you left it in your last post.....

    here is your configure.php for the admin reworked for changes to how its put together now, probably won't fix the issue as I am pretty sure its a permissions issue, but I prefer to try all everything

    Code:
    <?php
    /**
     *
     * @package Configuration Settings
     * @package Admin
     * @copyright Copyright 2003-2014 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version GIT: $Id: Author: DrByte  Modified in v1.5.4 $
     * @private
     */
    /**
     * WE RECOMMEND THAT YOU USE SSL PROTECTION FOR YOUR ENTIRE ADMIN:
     * To do that, make sure you use a "https:" URL for BOTH the HTTP_SERVER and HTTPS_SERVER entries:
     */
      define('HTTP_SERVER', 'https://www.mjmmagic.com');
      define('HTTPS_SERVER', 'https://www.mjmmagic.com');
      define('HTTP_CATALOG_SERVER', 'https://www.mjmmagic.com');
      define('HTTPS_CATALOG_SERVER', 'https://www.mjmmagic.com');
    
      // secure webserver for admin?  Valid choices are 'true' or 'false' (including quotes).
      define('ENABLE_SSL_ADMIN', 'true');
    
      // secure webserver for storefront?  Valid choices are 'true' or 'false' (including quotes).
      define('ENABLE_SSL_CATALOG', 'false');
    
      
      define('DIR_WS_ADMIN', preg_replace('#^' . str_replace('-', '\-', zen_parse_url(HTTP_SERVER, '/path')) . '#', '', dirname($_SERVER['SCRIPT_NAME'])) . '/');
      define('DIR_WS_CATALOG', '/store/');
      define('DIR_WS_HTTPS_ADMIN', preg_replace('#^' . str_replace('-', '\-', zen_parse_url(HTTPS_SERVER, '/path')) . '#', '', dirname($_SERVER['SCRIPT_NAME'])) . '/');
      define('DIR_WS_HTTPS_CATALOG', '/store/');
    
    // NOTE: be sure to leave the trailing '/' at the end of these lines if you make changes!
    // * DIR_WS_* = Webserver directories (virtual/URL)
      // these paths are relative to top of your webspace ... (ie: under the public_html or httpdocs folder)
      define('DIR_WS_IMAGES', 'images/');
      define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
      define('DIR_WS_CATALOG_IMAGES', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'images/');
      define('DIR_WS_CATALOG_TEMPLATE', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'includes/templates/');
      define('DIR_WS_INCLUDES', 'includes/');
      define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
      define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
      define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
      define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');
      define('DIR_WS_CATALOG_LANGUAGES', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'includes/languages/');
    
    // * DIR_FS_* = Filesystem directories (local/physical)
      define('DIR_FS_ADMIN', preg_replace('#.includes$#', '', realpath(dirname(__FILE__) . '/../') . '/'));
    
      define('DIR_FS_CATALOG', '/home/mjmmagic/public_html/store/');
    
    
      //the following path is a COMPLETE path to the /logs/ folder  eg: /var/www/vhost/accountname/public_html/store/logs ... and no trailing slash
      define('DIR_FS_LOGS', DIR_FS_CATALOG . '/logs');
    
      define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/');
      define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/');
      define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/');
      define('DIR_FS_CATALOG_TEMPLATES', DIR_FS_CATALOG . 'includes/templates/');
      define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/');
      define('DIR_FS_EMAIL_TEMPLATES', DIR_FS_CATALOG . 'email/');
      define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
    
    // define our database connection
      define('DB_TYPE', 'mysql');
      define('DB_PREFIX', 'zen_');
      define('DB_CHARSET', 'utf8');
      define('DB_SERVER', 'localhost');
      define('DB_SERVER_USERNAME', 'XXXXXXXX');
      define('DB_SERVER_PASSWORD', 'XXXXXXXXX');
      define('DB_DATABASE', 'zc154');
    
      // The next 2 "defines" are for SQL cache support.
      // For SQL_CACHE_METHOD, you can select from:  none, database, or file
      // If you choose "file", then you need to set the DIR_FS_SQL_CACHE to a directory where your apache
      // or webserver user has write privileges (chmod 666 or 777). We recommend using the "cache" folder inside the Zen Cart folder
      // ie: /path/to/your/webspace/public_html/zen/cache   -- leave no trailing slash
      define('SQL_CACHE_METHOD', 'none');
      define('DIR_FS_SQL_CACHE', '/home/mjmmagic/public_html/store/cache');
    
    //Explanations of the webserver and path parameters:
    // HTTP_SERVER is your Main webserver: eg-http://www.yourdomain.com
    // HTTPS_SERVER is your Secure webserver: eg-https://www.yourdomain.com
    // HTTP_CATALOG_SERVER is your Main webserver: eg-http://www.yourdomain.com
    // HTTPS_CATALOG_SERVER is your Secure webserver: eg-https://www.yourdomain.com
    /*
     * URLs for your site will be built via:
     *     HTTP_SERVER plus DIR_WS_ADMIN or
     *     HTTPS_SERVER plus DIR_WS_HTTPS_ADMIN or
     *     HTTP_SERVER plus DIR_WS_CATALOG or
     *     HTTPS_SERVER plus DIR_WS_HTTPS_CATALOG
     * ...depending on your system configuration settings
     */
    Mike
    GeekHost - Zen Cart Certified & PCI Compliant Hosting
    The Zen Cart Forum...Better than a monitor covered with post-it notes!

  5. #5
    Join Date
    Aug 2004
    Posts
    762
    Plugin Contributions
    0

    Default Re: Configuration Problem - Forbidden Access to certain areas?

    Unfortunately, that didn't change anything. The buttons under the orders.php are still not showing up.......only the image text links. And when you try to view the image, it it showing a full path to the image which doesn't exist.

    http://postimg.org/image/gooi6kydv/

    Then if I right click on one of those links and select View Image, you get the following:

    http://postimg.org/image/i64mtqb19/

    It has to be some kind of misconfiguration, but I've been staring at the computer all day and my brain is fried! Can't figure it out without some help.
    - Jeff

  6. #6
    Join Date
    Aug 2004
    Posts
    762
    Plugin Contributions
    0

    Default Re: Configuration Problem - Forbidden Access to certain areas?

    Okay, I'm an idiot. (I told you I was looking at the computer too long).

    The friggin images directory somehow got deleted! That was it. That was the huge problem. Total noob oversight.

    I feel like a dummy now. Thank you for the help. :)
    - Jeff

 

 

Similar Threads

  1. Replies: 2
    Last Post: 30 Jul 2012, 06:30 PM
  2. v150 an attempt was made to access a socket in a way forbidden by its access permissions.
    By inder_gwl in forum Installing on a Windows Server
    Replies: 0
    Last Post: 25 Mar 2012, 05:13 PM
  3. Adjusting the postions of certain areas
    By evil turinp in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 27 Jul 2009, 12:24 PM
  4. Restrict admins to certain areas?
    By Akoza in forum Basic Configuration
    Replies: 23
    Last Post: 20 Dec 2007, 12:06 AM
  5. Can't access admin areas ?
    By Patrick x in forum Basic Configuration
    Replies: 13
    Last Post: 9 Apr 2007, 11:36 AM

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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR