Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2015
    Location
    New Jersey USA
    Posts
    64
    Plugin Contributions
    0

    Default PHP warning log files - plugin_support.php

    Zen Cart 1.5.4 PHP 5.6, Image Handler, Zen Lightbox, Edit Orders, Easy Populate, third party template M***n

    Log folder is getting lots of these every day:

    [17-Jan-2021 22:24:50 America/New_York] PHP Warning: file_get_contents(http://www.zen-cart.com/downloads.ph...check&id=170): failed to open stream: HTTP request failed! HTTP/1.1 503 Service Temporarily Unavailable
    in /home/MYSITE/public_html/MYCART/includes/functions/plugin_support.php on line 38
    [17-Jan-2021 22:24:50 America/New_York] PHP Warning: in_array() expects parameter 2 to be array, null given in /home/eMYSITE/public_html/MYCART/includes/functions/plugin_support.php on line 42


    Looks like it's trying to find info on Plug In 170 but nothing there?

    Here are lines 32 to 44 of my plugin_support.php file:

    function plugin_version_check_for_updates($plugin_file_id = 0, $version_string_to_compare = '')
    {
    if ($plugin_file_id == 0) return FALSE;
    $new_version_available = FALSE;
    $lookup_index = 0;
    $url = 'http://www.zen-cart.com/downloads.php?do=versioncheck' . '&id='.(int)$plugin_file_id;
    $data = json_decode(file_get_contents($url), true);
    // compare versions
    if (strcmp($data[$lookup_index]['latest_plugin_version'], $version_string_to_compare) > 0) $new_version_available = TRUE;
    // check whether present ZC version is compatible with the latest available plugin version
    if (!in_array('v'. PROJECT_VERSION_MAJOR . '.' . PROJECT_VERSION_MINOR, $data[$lookup_index]['zcversions'])) $new_version_available = FALSE;
    return ($new_version_available) ? $data[$lookup_index] : FALSE;
    }


    Advice, fixes greatly appreciated.

    Thanks, Ted

  2. #2
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: PHP warning log files - plugin_support.php

    Zen Cart v1.5.4 was released in December 2014, and is officially no longer supported.

    The best fix is to upgrade to a newer version that contains fixes for the issues you mention.
    .

    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.

 

 

Similar Threads

  1. v155 v1.5.5f, Responsive Classic + PHP 7.1- Errors in Log Files
    By himmon in forum General Questions
    Replies: 10
    Last Post: 14 Sep 2018, 06:38 PM
  2. v154 Warning: in_array() expects parameter 2 to be array, null given plugin_support.php
    By BlackOrchidCouture in forum General Questions
    Replies: 2
    Last Post: 15 Nov 2016, 09:23 PM
  3. Replies: 6
    Last Post: 16 Jul 2013, 10:58 PM
  4. PHP Warning: Empty delimiter. in Server Error Log
    By skipwater in forum General Questions
    Replies: 6
    Last Post: 30 Nov 2009, 10:18 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