Results 1 to 7 of 7
  1. #1
    Join Date
    Mar 2016
    Location
    Marietta GA
    Posts
    67
    Plugin Contributions
    0

    Default PHTML when loading site or admin

    In the middle of creating new products, we suddenly got browser errors asking how we wanted to handle a PHTML file, save or open. I saved the PHTML file to disk and looked at it with a text editor. It seems to be the Z-C main admin file or the main website file. Each time I attempt to load the site or admin a new 8 char <random_alphanumeric_name>.PHTML is created, with the same contents, below. They don't look like malware. I'm searching the site now to see if I find any .PHTML files, but I've never seen them before. Site is australianbakery.com. Anyone know what is going on?

    Here are snippets:

    When attempting the website customer facing:


    <?php
    /**
    * index.php represents the hub of the Zen Cart MVC system
    *
    * Overview of flow
    * <ul>
    * <li>Load application_top.php - see {@tutorial initsystem}</li>
    * <li>Set main language directory based on $_SESSION['language']</li>
    * <li>Load all *header_php.php files from includes/modules/pages/PAGE_NAME/</li>
    * <li>Load html_header.php (this is a common template file)</li>
    * <li>Load main_template_vars.php (this is a common template file)</li>
    * <li>Load on_load scripts (page based and site wide)</li>
    * <li>Load tpl_main_page.php (this is a common template file)</li>
    * <li>Load application_bottom.php</li>
    * </ul>
    *
    * @package general
    * @copyright Copyright 2003-2005 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 $Id: index.php 2942 2006-02-02 04:41:23Z drbyte $
    */

    <snip>


    When trying to access the admin:



    <?php
    /**
    * @package admin
    * @copyright Copyright 2003-2016 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 $Id: Author: DrByte Fri Feb 19 22:01:13 2016 -0500 Modified in v1.5.5 $
    */
    $version_check_index=true;
    require('includes/application_top.php');

    $languages = zen_get_languages();
    $languages_array = array();
    $languages_selected = DEFAULT_LANGUAGE;
    for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
    $languages_array[] = array('id' => $languages[$i]['code'],
    'text' => $languages[$i]['name']);
    if ($languages[$i]['directory'] == $_SESSION['language']) {
    $languages_selected = $languages[$i]['code'];
    }
    }

    if (STORE_NAME == '' || STORE_OWNER =='' || STORE_OWNER_EMAIL_ADDRESS =='' || STORE_NAME_ADDRESS =='') {
    require('index_setup_wizard.php');
    } else {
    require('index_dashboard.php');

    <snip>

  2. #2
    Join Date
    Jan 2004
    Posts
    66,263
    Blog Entries
    7
    Plugin Contributions
    270

    Default Re: PHTML when loading site or admin

    Zen Cart doesn't use the .phtml extension for anything.
    That was an old convention used in PHP 2 decades ago. Granted, Magento has opted to use it for their template files.

    Nothing official in Zen Cart would do/create/use/cause the need for your server to support the .phtml extension on files.

    Seems like something in your hosting company's server is re-translating .php to .phtml and then is failing to actually serve .phtml properly.

    Get your hosting company to fix it.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    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.

  3. #3
    Join Date
    Mar 2016
    Location
    Marietta GA
    Posts
    67
    Plugin Contributions
    0

    Default Re: PHTML when loading site or admin

    Thanks, Doc! In the meantime I learned that our hoster decided, yesterday, with no notice to customers, to discontinue, no going back, support for PHP5.6. Hostmonster, part of the "Endurance Group" https://en.wikipedia.org/wiki/Endura...national_Group. They did it across the whole corp.

    The kid on the phone flippantly said the solution is to just optimize my code for PHP7.3 -- clueless.

    We know we need to upgrade and already engaged a pro to do it for us in a few weeks. But the rug-jerk was unconscionable. We've moved the site to a new hoster, will proceed with our upgrade in an orderly manner.

    But this should be a warning to storeowners/sites still on PHP 5.x -- it's going away, and quickly -- get upgraded.

  4. #4
    Join Date
    Jan 2004
    Posts
    66,263
    Blog Entries
    7
    Plugin Contributions
    270

    Default Re: PHTML when loading site or admin

    Quote Originally Posted by greg_beyer View Post
    Thanks, Doc! In the meantime I learned that our hoster decided, yesterday, with no notice to customers, to discontinue, no going back, support for PHP5.6. Hostmonster, part of the "Endurance Group" https://en.wikipedia.org/wiki/Endura...national_Group. They did it across the whole corp.
    Good to know. Thanks.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    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.

  5. #5
    Join Date
    Jan 2004
    Posts
    66,263
    Blog Entries
    7
    Plugin Contributions
    270

    Default Re: PHTML when loading site or admin

    Quote Originally Posted by greg_beyer View Post
    But this should be a warning to storeowners/sites still on PHP 5.x -- it's going away, and quickly -- get upgraded.
    Yup. I've been preaching the same for years.

    https://www.php.net/supported-versions.php
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    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.

  6. #6
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    7,669
    Plugin Contributions
    104

    Default Re: PHTML when loading site or admin

    Quote Originally Posted by greg_beyer View Post
    But the rug-jerk was unconscionable.
    https://www.php.net/supported-versions.php

    PHP 5.6 has been out of support for over two years.
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.

  7. #7
    Join Date
    Mar 2016
    Location
    Marietta GA
    Posts
    67
    Plugin Contributions
    0

    Default Re: PHTML when loading site or admin

    OW! I made a mea culpa! But still, send customers an email before ya do it.

 

 

Similar Threads

  1. v155 Blank page when loading admin
    By ajohnpeters in forum General Questions
    Replies: 15
    Last Post: 5 Dec 2017, 01:25 AM
  2. v151 Site not loading on landing page - Nothing visible when View Source
    By DownRightNatural in forum General Questions
    Replies: 6
    Last Post: 8 Oct 2017, 04:45 PM
  3. v151 Newly watermarked images not loading when viewing site
    By DownRightNatural in forum General Questions
    Replies: 1
    Last Post: 6 Mar 2014, 02:17 AM
  4. Error when loading admin page
    By iamperez247 in forum General Questions
    Replies: 1
    Last Post: 19 Mar 2008, 02:55 PM
  5. error when loading site
    By ner0tik in forum Upgrading from 1.3.x to 1.3.9
    Replies: 2
    Last Post: 19 Apr 2007, 05:39 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