Page 3 of 5 FirstFirst 12345 LastLast
Results 21 to 30 of 41
  1. #21
    Join Date
    Jul 2012
    Posts
    11,627
    Plugin Contributions
    13

    Default Re: Admin not accessible

    Quote Originally Posted by mc12345678 View Post
    When say no difference, does that mean that the front/catalog side STILL works, still DOESN'T work? The Admin STILL doesn't work? Does that mean that the same mydebug-adm file is being generated or is there different content?

    If the catalog works but the admin does not, and there are no error messages about the catalog side timezone setting, then would again take a look at includes/extra_configures/set_time_zone.php as well as admin/includes/extra_configures/set_time_zone.php to see if/what difference there is.

    Also, would apply the above suggested htaccess modification to the admin/.htaccess file, try again, and report results.
    The other possible .htaccess entry to help this situation that has been found would be:
    Code:
    SetEnv TZ Africa/Johannesburg
    Again would suggest placing it in your newly created catalog .htaccess file first, then work from there. Though there are a number of things that may need to be reviewed based on the above suggestion(s).
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...
    Upgraded to Zen Cart V1.5.3 from V1.5.1 from V1.5.0 from V1.3.9h

  2. #22
    Join Date
    Jul 2005
    Location
    Hoedspruit
    Posts
    516
    Plugin Contributions
    2

    Default Re: Admin not accessible

    Quote Originally Posted by mc12345678 View Post
    When say no difference, does that mean that the front/catalog side STILL works, still DOESN'T work? The Admin STILL doesn't work? Does that mean that the same mydebug-adm file is being generated or is there different content?
    The site works, but admin doesn't

    Quote Originally Posted by mc12345678 View Post
    If the catalog works but the admin does not, and there are no error messages
    Are error message on the admin site, but I am experiencing really slow loads on the logs for some reason from my location

    Quote Originally Posted by mc12345678 View Post
    about the catalog side timezone setting, then would again take a look at includes/extra_configures/set_time_zone.php as well as admin/includes/extra_configures/set_time_zone.php to see if/what difference there is.
    Looking at it now - will add the same string there too...

    Quote Originally Posted by mc12345678 View Post
    Also, would apply the above suggested htaccess modification to the admin/.htaccess file, try again, and report results.
    will do

  3. #23
    Join Date
    Jul 2005
    Location
    Hoedspruit
    Posts
    516
    Plugin Contributions
    2

    Default Re: Admin not accessible

    Quote Originally Posted by mc12345678 View Post
    Also, would apply the above suggested htaccess modification to the admin/.htaccess file, try again, and report results.
    Where to insert in this file

    Code:
    #
    # @copyright Copyright 2003-2013 Zen Cart Development Team
    # @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
    # @version GIT: $Id: Author: DrByte  Sat Dec 21 17:00:00 2013 -0500 Modified in v1.5.3 $
    #
    # This is used with Apache WebServers
    #
    # The following blocks direct HTTP requests to all filetypes in this directory recursively, except certain approved exceptions
    # It also prevents the ability of any scripts to run. No type of script, be it PHP, PERL or whatever, can normally be executed if ExecCGI is disabled.
    # Will also prevent people from seeing what is in the dir. and any sub-directories
    #
    # For this to work, you must include either 'All' or at least: 'Limit' and 'Indexes' parameters to the AllowOverride configuration in your apache/conf/httpd.conf file.
    # Additionally, if you want the added protection offered by the OPTIONS directive below, you'll need to add 'Options' to the AllowOverride list, if 'All' is not specified.
    # Example:
    #<Directory "/usr/local/apache/htdocs">
    #  AllowOverride Limit Options Indexes
    #</Directory>
    ###############################
    DirectoryIndex index.php
    
    # deny *everything*
    <FilesMatch ".*\..*">
      Order Allow,Deny
      Deny from all
    </FilesMatch>
    
    # but now allow just *certain* necessary files:
    <FilesMatch "(?i).*\.(php|js|css|html?|ico|otf|jpe?g|gif|webp|png|swf|flv|xml|xsl)$">
      Order Allow,Deny
      Allow from all
    </FilesMatch>
    
    IndexIgnore */*
    
    <limit POST PUT>
    order deny,allow
    deny from All
    </limit>
    
    
    ## NOTE: If you want even greater security to prevent hackers from running scripts in this folder, uncomment the following line (if your hosting company will allow you to use OPTIONS):
    # OPTIONS -Indexes -ExecCGI
    
    
    
    ##################
    ## Optional caching improvements
    ## Requires mod_header and mod_deflate to be enabled within Apache
    ##################
    <IfModule mod_headers.c>
      Header unset Pragma
      FileETag None
      Header unset ETag
      #Header set Cache-Control "no-transform"
      <FilesMatch "(?i).*\.(ico|jpe?g|gif|otf|webp|png|swf|flv|svg|svgz)$">
        Header set Cache-control "max-age=864000, public, must-revalidate"
        Header unset Last-Modified
      </FilesMatch>
      <FilesMatch "(?i).*\.(html|htm|xml|txt|xsl)$">
        Header set Cache-control "max-age=7200, must-revalidate"
      </FilesMatch>
    </IfModule>
    <IfModule mod_deflate.c>
      <FilesMatch "(?i)\.(js|css)$">
        SetOutputFilter DEFLATE
      </FilesMatch>
    </IfModule>
    
    ##################
    ## Optional improvements
    ## Requires mod_expires to be enabled within Apache
    ##################
    <ifmodule mod_expires.c>
      ExpiresActive On
      ExpiresDefault A300
      ExpiresByType application/x-javascript A3600
      ExpiresByType text/css A3600
      ExpiresByType image/gif A604800
      ExpiresByType video/x-flv A604800
      ExpiresByType application/pdf A604800
      ExpiresByType text/html A300
      ExpiresByType image/x-icon A86400
      ExpiresByType image/jpeg A2592000
      ExpiresByType image/png A2592000
      ExpiresByType text/cache-manifest "access plus 0 seconds"
    
    </ifmodule>
    
    
    #turn off X-PHP-Originating-Script header when sending emails from admin
    #uncomment to activate:
    # php_flag mail.add_x_header Off

  4. #24
    Join Date
    Jul 2005
    Location
    Hoedspruit
    Posts
    516
    Plugin Contributions
    2

    Default Re: Admin not accessible

    Quote Originally Posted by mc12345678 View Post
    If the catalog works but the admin does not, and there are no error messages about the catalog side timezone setting, then would again take a look at includes/extra_configures/set_time_zone.php as well as admin/includes/extra_configures/set_time_zone.php to see if/what difference there is..
    PHP Code:
    <?php
    /**
     * @package admin
     * @copyright Copyright 2003-2013 Zen Cart Development Team
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version GIT: $Id: Author: DrByte  Sat Nov 2 01:21:28 2013 -0400 New in v1.5.2 $
     */
    // get time zone settings from catalog-side file
    include (DIR_FS_CATALOG '/includes/extra_configures/set_time_zone.php');
    This points to the directory/file with the time zone setting Africa/Johannesburg. Would I add that string to the file that I find there which is my_renamed_admin/includes/extra_configures/use_catalog_time_zone.php?

    PHP Code:
     $TZ 'Africa/Johannesburg';  // eg: 'Europe/Oslo' 

  5. #25
    Join Date
    Jul 2005
    Location
    Hoedspruit
    Posts
    516
    Plugin Contributions
    2

    Default Re: Admin not accessible

    Quote Originally Posted by mc12345678 View Post
    The other possible .htaccess entry to help this situation that has been found would be:
    Code:
    SetEnv TZ Africa/Johannesburg
    added - cleared browser cache, no admin...

    Quote Originally Posted by mc12345678 View Post
    Again would suggest placing it in your newly created catalog .htaccess file first, then work from there. Though there are a number of things that may need to be reviewed based on the above suggestion(s).
    that's done with the same result:

    Code:
    php_value date.timezone 'Africa/Johannesburg'
    
    SetEnv TZ Africa/Johannesburg

  6. #26
    Join Date
    Jul 2012
    Posts
    11,627
    Plugin Contributions
    13

    Default Re: Admin not accessible

    If going to try in the admin/.htaccess file then outside of a group of commands and not on the same line as being commented out. End of file is fine.

    As to the SetEnv characteristic, it dawned on me that if that is able to execute satisfactorily then back in the set_time_zone.php file, leave the putenv row commented out, but uncomment the line that follows where it sets $TZ = @ something...

    Basically the htaccess command sets the environment variable that is intended to be set by putenv, and if putenv is disabled for the server, but the htaccess can set the environment variable then so be it.

    Good, the admin version of the file is as it should be.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...
    Upgraded to Zen Cart V1.5.3 from V1.5.1 from V1.5.0 from V1.3.9h

  7. #27
    Join Date
    Jul 2005
    Location
    Hoedspruit
    Posts
    516
    Plugin Contributions
    2

    Default Re: Admin not accessible

    Quote Originally Posted by mc12345678 View Post
    If going to try in the admin/.htaccess file then outside of a group of commands and not on the same line as being commented out. End of file is fine.
    Done - admin not accessible

    Quote Originally Posted by mc12345678 View Post
    As to the SetEnv characteristic, it dawned on me that if that is able to execute satisfactorily then back in the set_time_zone.php file, leave the putenv row commented out, but uncomment the line that follows where it sets $TZ = @ something...
    I have just found something duplicated in the string that is meant to be commented out:

    PHP Code:
    <?php
    /**
     * @package initSystem
     * @copyright Copyright 2003-2013 Zen Cart Development Team
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version GIT: $Id: Author: DrByte  Sat Nov 2 01:21:28 2013 -0400 New in v1.5.2 $
     */
    /*
     * Set time zone
    */
    if (version_compare(PHP_VERSION5.3'>='))
    {
      
    // put your timezone here. Refer to http://www.php.net/manual/en/timezones.php
      
    $TZ 'Africa/Johannesburg';  // eg: 'Europe/Oslo'



      /**
       * MAKE NO CHANGES BELOW THIS LINE
       *
       * The following will take the timezone you specified above and apply it in your store.
       * If you didn't specify one, it will try to use the setting from your server's PHP configuration
       */
      
    if ($TZ == '') {
        
    $TZ date_default_timezone_get();
      }
      if (
    $TZ != '') {
        
    //putenv('TZ=' . $TZ);
        //@date_default_timezone_set($TZ);
      
    }
    }
    Quote Originally Posted by mc12345678 View Post
    Basically the htaccess command sets the environment variable that is intended to be set by putenv, and if putenv is disabled for the server, but the htaccess can set the environment variable then so be it.

    Good, the admin version of the file is as it should be.

  8. #28
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    6,977
    Plugin Contributions
    63

    Default Re: Admin not accessible

    Quote Originally Posted by Parafanaylya View Post
    Done - admin not accessible



    I have just found something duplicated in the string that is meant to be commented out:

    PHP Code:
    <?php
    /**
     * @package initSystem
     * @copyright Copyright 2003-2013 Zen Cart Development Team
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version GIT: $Id: Author: DrByte  Sat Nov 2 01:21:28 2013 -0400 New in v1.5.2 $
     */
    /*
     * Set time zone
    */
    if (version_compare(PHP_VERSION5.3'>='))
    {
      
    // put your timezone here. Refer to http://www.php.net/manual/en/timezones.php
      
    $TZ 'Africa/Johannesburg';  // eg: 'Europe/Oslo'



      /**
       * MAKE NO CHANGES BELOW THIS LINE
       *
       * The following will take the timezone you specified above and apply it in your store.
       * If you didn't specify one, it will try to use the setting from your server's PHP configuration
       */
      
    if ($TZ == '') {
        
    $TZ date_default_timezone_get();
      }
      if (
    $TZ != '') {
        
    //putenv('TZ=' . $TZ);
        //@date_default_timezone_set($TZ);
      
    }
    }
    Why are those two lines commented-out? Those are the lines of code that are actually setting the timezone to the value you identified.

  9. #29
    Join Date
    Jul 2012
    Posts
    11,627
    Plugin Contributions
    13

    Default Re: Admin not accessible

    Quote Originally Posted by lat9 View Post
    Why are those two lines commented-out? Those are the lines of code that are actually setting the timezone to the value you identified.
    What?! having difficulty following an issue that spans at least 2 if not three threads?

    The "cause" of that being commented out was this action/post: https://www.zen-cart.com/showthread....55#post1338555

    and then:
    https://www.zen-cart.com/showthread...._time_zone-php a now closed thread which supposedly carried over to github, though I don't see any reference to it directly in the code blame history nor as a new issue, though I see this closed issue that seems like it aligns: https://github.com/zencart/zencart/issues/1557.

    Whether it remains necessary to still be commented out has been the dance...

    Something got modified on the host (again?) to remove whatever fix had been put into place to support continued operation or to cause a new alternate issue. There appears to be no full backup by which to compare, and while the proposed change remains in place (commenting out the putenv related code), the original issue remains.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...
    Upgraded to Zen Cart V1.5.3 from V1.5.1 from V1.5.0 from V1.3.9h

  10. #30
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    957
    Plugin Contributions
    1

    Default Re: Admin not accessible

    have you turned on debug as well as error reporting? will hopefully point to the exact problem....

    with regards to the code history as well as "blame", my PR was to help with debugging problems, not to specifically address a putenv statement.

    i would have the OP turn on error_reporting as well as debug. and the last time i was involved, i thought the OP was moving hosts to specifically address the putenv statement as well as allow for individual php.ini files for virtual hosts.

    best.
    feel free to donate money to carl or to the Zen-Cart Team

 

 
Page 3 of 5 FirstFirst 12345 LastLast

Similar Threads

  1. Admin Not Accessible after SSL & Dedicated IP
    By yeah! in forum General Questions
    Replies: 19
    Last Post: 21 Apr 2011, 11:27 PM
  2. installed demo now old admin not accessible
    By VDecalS in forum Upgrading from 1.3.x to 1.3.9
    Replies: 6
    Last Post: 25 Nov 2010, 12:54 AM
  3. My admin panel not accessible in 1.3.9g
    By Crunch in forum Upgrading from 1.3.x to 1.3.9
    Replies: 2
    Last Post: 30 Sep 2010, 10:28 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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR