Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Join Date
    Aug 2009
    Location
    North Idaho, USA
    Posts
    2,008
    Plugin Contributions
    1

    Default file_get_contents(): http:// wrapper is disabled in the server configuration

    I just notices several instances of the same myDEBUG files since July 7. Since I have no record of making any changes this month.

    No hosting upgrades/updates have been admitted to being made.
    Stuff doesn't start happening by itself.

    I appreciate any suggestions for starting places.

    MyDEBUG-ADM

    Code:
    [19-Jul-2016 07:35:13 America/Los_Angeles] Request URI: /CrypticAdmin/modules.php?set=shipping&module=usps, IP address: MYSTATICIP 
    #1  file_get_contents() called at [/home/cpanelID/public_html/includes/functions/plugin_support.php:38] 
    #2  plugin_version_check_for_updates() called at [/home/cpanelID/public_html/includes/modules/shipping/usps.php:117] 
    #3  usps->__construct() called at [/home/cpanelID/public_html/CrypticAdmin/modules.php:190]  
    
    [19-Jul-2016 07:35:13 America/Los_Angeles] PHP Warning:  file_get_contents(): http:// wrapper is disabled in the server configuration by allow_url_fopen=0 in /home/cpanelID/public_html/includes/functions/plugin_support.php on line 38 
    [19-Jul-2016 07:35:13 America/Los_Angeles] Request URI: /CrypticAdmin/modules.php?set=shipping&module=usps, IP address: MYSTATICIP
    #1  file_get_contents() called at [/home/cpanelID/public_html/includes/functions/plugin_support.php:38] 
    #2  plugin_version_check_for_updates() called at [/home/cpanelID/public_html/includes/modules/shipping/usps.php:117] 
    #3  usps->__construct() called at [/home/cpanelID/public_html/CrypticAdmin/modules.php:190]  
    
    [19-Jul-2016 07:35:13 America/Los_Angeles] PHP Warning:  file_get_contents(http://www.zen-cart.com/downloads.php?do=versioncheck&id=1292): failed to open stream: no suitable wrapper could be found in /home/cpanelID/public_html/includes/functions/plugin_support.php on line 38 [19-Jul-2016 07:35:13 America/Los_Angeles] Request URI: /CrypticAdmin/modules.php?set=shipping&module=usps, IP address: MYSTATICIP 
    #1  in_array() called at [/home/cpanelID/public_html/includes/functions/plugin_support.php:42] 
    #2  plugin_version_check_for_updates() called at [/home/cpanelID/public_html/includes/modules/shipping/usps.php:117] 
    #3  usps->__construct() called at [/home/cpanelID/public_html/CrypticAdmin/modules.php:190]  
    [19-Jul-2016 07:35:13 America/Los_Angeles] PHP Warning:  in_array() expects parameter 2 to be array, null given in /home/cpanelID/public_html/includes/functions/plugin_support.php on line 42
    MyDEBUG
    Code repeats 10 times per myDEBUG file

    Code:
    [07-Jul-2016 23:10:14 America/Los_Angeles] Request URI: /index.php?main_page=product_info&products_id=14:4bde1cede2eba37305096f5094d56aa7, IP address: 83.209.95.201 
    #1  mysqli_connect() called at [/home/cpanelID/public_html/includes/classes/db/mysql/query_factory.php:62] 
    #2  queryFactory->connect() called at [/home/cpanelID/public_html/includes/init_includes/init_database.php:23] 
    #3  require(/home/cpanelID/public_html/includes/init_includes/init_database.php) called at [/home/cpanelID/public_html/includes/autoload_func.php:48] 
    #4  require(/home/cpanelID/public_html/includes/autoload_func.php) called at [/home/cpanelID/public_html/includes/application_top.php:158] 
    #5  require(/home/cpanelID/public_html/includes/application_top.php) called at [/home/cpanelID/public_html/index.php:26]

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

    Default Re: MyDEBUG interpretation assistance (website and Admin)

    Well, hopefully it is only happening when an authorized admin is known to be logged in otherwise the activity is highly suspect.

    It looks to me like the usps.php shipping module is having difficulty identifying that there is an update available to it either by software inspection permissions or by Internet communication/response restrictions. I believe there have been some reports about various version check code and how even though there are alternate methods built in to prevent total failure, some of the alternate methods fail as well.

    The store front/2nd message doesn't seem to make much sense as it looks incomplete. There's no warning, no error, etc. Reported just a bunch of lines of code basically. Perhaps a self directed error log?
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,976
    Plugin Contributions
    96

    Default Re: MyDEBUG interpretation assistance (website and Admin)

    The pertinent bit is:
    Code:
    file_get_contents(): http:// wrapper is disabled in the server configuration by allow_url_fopen=0 i
    Your site is configured (via the base php.ini) to disable the use of the PHP function file_get_contents on an external (i.e. accessed via http vs. direct file-system) file.

    That's why the usps.php module is failing; you'll get the same behavior for any other plugins (and the Zen Cart version check used in the admin header) that do that "is there a new version" check.

  4. #4
    Join Date
    Aug 2009
    Location
    North Idaho, USA
    Posts
    2,008
    Plugin Contributions
    1

    Default Re: MyDEBUG interpretation assistance (website and Admin)

    Quote Originally Posted by mc12345678 View Post
    Well, hopefully it is only happening when an authorized admin is known to be logged in otherwise the activity is highly suspect.
    Yes, that is why I replaced the actual IP address with the text MYSTATICIP shown in the myDEBUG-adm file contents

    Quote Originally Posted by mc12345678 View Post
    It looks to me like the usps.php shipping module is having difficulty identifying that there is an update available to it either by software inspection permissions or by Internet communication/response restrictions. I believe there have been some reports about various version check code and how even though there are alternate methods built in to prevent total failure, some of the alternate methods fail as well.
    The last update to USPS shipping was back in Jan 2016 unless Ajeh snuck one in on me.

    Quote Originally Posted by mc12345678 View Post
    The store front/2nd message doesn't seem to make much sense as it looks incomplete. There's no warning, no error, etc. Reported just a bunch of lines of code basically. Perhaps a self directed error log?
    Darn. The 10 repeated sections looked the same but there is a bit difference. I just didn't want to clutter the post with a codepaste that scrolled for 3-4 screens. I'll put the entire file content at the end of this post. Sorry.

    Quote Originally Posted by lat9 View Post
    The pertinent bit is:
    Code:
    file_get_contents(): http:// wrapper is disabled in the server configuration by allow_url_fopen=0 i
    Your site is configured (via the base php.ini) to disable the use of the PHP function file_get_contents on an external (i.e. accessed via http vs. direct file-system) file.

    That's why the usps.php module is failing; you'll get the same behavior for any other plugins (and the Zen Cart version check used in the admin header) that do that "is there a new version" check.
    Sorry Cindy. That went right over the top of my head before first cup of coffee. Are you saying that a server configuration has been changed, a ZC setting has been changed or Rick had a brainfart and changed something & forgot to record the change in my notes?


    Entire myDEBUG contents. I checked the IP addresses in the various files. MSFT, Google and "this one"
    I forgot this one (or similar) was answered by DrByte a few months ago and I forgot to delete the files.
    Storefront myDEBUG under control and explained.


    Code:
    [07-Jul-2016 23:10:19 America/Los_Angeles] Request URI: /index.php?main_page=shopping_cart, IP address: 83.209.95.201
    #1  mysqli_connect() called at [/home/chainwea/public_html/includes/classes/db/mysql/query_factory.php:62]
    #2  queryFactory->connect() called at [/home/chainwea/public_html/includes/init_includes/init_database.php:23]
    #3  require(/home/chainwea/public_html/includes/init_includes/init_database.php) called at [/home/chainwea/public_html/includes/autoload_func.php:48]
    #4  require(/home/chainwea/public_html/includes/autoload_func.php) called at [/home/chainwea/public_html/includes/application_top.php:158]
    #5  require(/home/chainwea/public_html/includes/application_top.php) called at [/home/chainwea/public_html/index.php:26]
     
    [07-Jul-2016 23:10:19 America/Los_Angeles] PHP Warning:  mysqli_connect(): (HY000/2002): No such file or directory in /home/chainwea/public_html/includes/classes/db/mysql/query_factory.php on line 62
    [07-Jul-2016 23:10:19 America/Los_Angeles] Request URI: /index.php?main_page=shopping_cart, IP address: 83.209.95.201
    #1  mysqli_connect() called at [/home/chainwea/public_html/includes/classes/db/mysql/query_factory.php:62]
    #2  queryFactory->connect() called at [/home/chainwea/public_html/includes/init_includes/init_database.php:23]
    #3  require(/home/chainwea/public_html/includes/init_includes/init_database.php) called at [/home/chainwea/public_html/includes/autoload_func.php:48]
    #4  require(/home/chainwea/public_html/includes/autoload_func.php) called at [/home/chainwea/public_html/includes/application_top.php:158]
    #5  require(/home/chainwea/public_html/includes/application_top.php) called at [/home/chainwea/public_html/index.php:26]
     
    [07-Jul-2016 23:10:19 America/Los_Angeles] PHP Warning:  mysqli_connect(): (HY000/2002): No such file or directory in /home/chainwea/public_html/includes/classes/db/mysql/query_factory.php on line 62
    [07-Jul-2016 23:10:19 America/Los_Angeles] Request URI: /index.php?main_page=shopping_cart, IP address: 83.209.95.201
    #1  mysqli_connect() called at [/home/chainwea/public_html/includes/classes/db/mysql/query_factory.php:62]
    #2  queryFactory->connect() called at [/home/chainwea/public_html/includes/init_includes/init_database.php:23]
    #3  require(/home/chainwea/public_html/includes/init_includes/init_database.php) called at [/home/chainwea/public_html/includes/autoload_func.php:48]
    #4  require(/home/chainwea/public_html/includes/autoload_func.php) called at [/home/chainwea/public_html/includes/application_top.php:158]
    #5  require(/home/chainwea/public_html/includes/application_top.php) called at [/home/chainwea/public_html/index.php:26]
     
    [07-Jul-2016 23:10:19 America/Los_Angeles] PHP Warning:  mysqli_connect(): (HY000/2002): No such file or directory in /home/chainwea/public_html/includes/classes/db/mysql/query_factory.php on line 62
    [07-Jul-2016 23:10:19 America/Los_Angeles] Request URI: /index.php?main_page=shopping_cart, IP address: 83.209.95.201
    #1  mysqli_connect() called at [/home/chainwea/public_html/includes/classes/db/mysql/query_factory.php:62]
    #2  queryFactory->connect() called at [/home/chainwea/public_html/includes/init_includes/init_database.php:23]
    #3  require(/home/chainwea/public_html/includes/init_includes/init_database.php) called at [/home/chainwea/public_html/includes/autoload_func.php:48]
    #4  require(/home/chainwea/public_html/includes/autoload_func.php) called at [/home/chainwea/public_html/includes/application_top.php:158]
    #5  require(/home/chainwea/public_html/includes/application_top.php) called at [/home/chainwea/public_html/index.php:26]
     
    [07-Jul-2016 23:10:19 America/Los_Angeles] PHP Warning:  mysqli_connect(): (HY000/2002): No such file or directory in /home/chainwea/public_html/includes/classes/db/mysql/query_factory.php on line 62
    [07-Jul-2016 23:10:19 America/Los_Angeles] Request URI: /index.php?main_page=shopping_cart, IP address: 83.209.95.201
    #1  mysqli_connect() called at [/home/chainwea/public_html/includes/classes/db/mysql/query_factory.php:62]
    #2  queryFactory->connect() called at [/home/chainwea/public_html/includes/init_includes/init_database.php:23]
    #3  require(/home/chainwea/public_html/includes/init_includes/init_database.php) called at [/home/chainwea/public_html/includes/autoload_func.php:48]
    #4  require(/home/chainwea/public_html/includes/autoload_func.php) called at [/home/chainwea/public_html/includes/application_top.php:158]
    #5  require(/home/chainwea/public_html/includes/application_top.php) called at [/home/chainwea/public_html/index.php:26]
     
    [07-Jul-2016 23:10:19 America/Los_Angeles] PHP Warning:  mysqli_connect(): (HY000/2002): No such file or directory in /home/chainwea/public_html/includes/classes/db/mysql/query_factory.php on line 62
    [07-Jul-2016 23:10:19 America/Los_Angeles] Request URI: /index.php?main_page=shopping_cart, IP address: 83.209.95.201
    #1  mysqli_connect() called at [/home/chainwea/public_html/includes/classes/db/mysql/query_factory.php:62]
    #2  queryFactory->connect() called at [/home/chainwea/public_html/includes/init_includes/init_database.php:23]
    #3  require(/home/chainwea/public_html/includes/init_includes/init_database.php) called at [/home/chainwea/public_html/includes/autoload_func.php:48]
    #4  require(/home/chainwea/public_html/includes/autoload_func.php) called at [/home/chainwea/public_html/includes/application_top.php:158]
    #5  require(/home/chainwea/public_html/includes/application_top.php) called at [/home/chainwea/public_html/index.php:26]
     
    [07-Jul-2016 23:10:19 America/Los_Angeles] PHP Warning:  mysqli_connect(): (HY000/2002): No such file or directory in /home/chainwea/public_html/includes/classes/db/mysql/query_factory.php on line 62
    [07-Jul-2016 23:10:19 America/Los_Angeles] Request URI: /index.php?main_page=shopping_cart, IP address: 83.209.95.201
    #1  mysqli_connect() called at [/home/chainwea/public_html/includes/classes/db/mysql/query_factory.php:62]
    #2  queryFactory->connect() called at [/home/chainwea/public_html/includes/init_includes/init_database.php:23]
    #3  require(/home/chainwea/public_html/includes/init_includes/init_database.php) called at [/home/chainwea/public_html/includes/autoload_func.php:48]
    #4  require(/home/chainwea/public_html/includes/autoload_func.php) called at [/home/chainwea/public_html/includes/application_top.php:158]
    #5  require(/home/chainwea/public_html/includes/application_top.php) called at [/home/chainwea/public_html/index.php:26]
     
    [07-Jul-2016 23:10:19 America/Los_Angeles] PHP Warning:  mysqli_connect(): (HY000/2002): No such file or directory in /home/chainwea/public_html/includes/classes/db/mysql/query_factory.php on line 62
    [07-Jul-2016 23:10:19 America/Los_Angeles] Request URI: /index.php?main_page=shopping_cart, IP address: 83.209.95.201
    #1  mysqli_connect() called at [/home/chainwea/public_html/includes/classes/db/mysql/query_factory.php:62]
    #2  queryFactory->connect() called at [/home/chainwea/public_html/includes/init_includes/init_database.php:23]
    #3  require(/home/chainwea/public_html/includes/init_includes/init_database.php) called at [/home/chainwea/public_html/includes/autoload_func.php:48]
    #4  require(/home/chainwea/public_html/includes/autoload_func.php) called at [/home/chainwea/public_html/includes/application_top.php:158]
    #5  require(/home/chainwea/public_html/includes/application_top.php) called at [/home/chainwea/public_html/index.php:26]
     
    [07-Jul-2016 23:10:19 America/Los_Angeles] PHP Warning:  mysqli_connect(): (HY000/2002): No such file or directory in /home/chainwea/public_html/includes/classes/db/mysql/query_factory.php on line 62
    [07-Jul-2016 23:10:19 America/Los_Angeles] Request URI: /index.php?main_page=shopping_cart, IP address: 83.209.95.201
    #1  mysqli_connect() called at [/home/chainwea/public_html/includes/classes/db/mysql/query_factory.php:62]
    #2  queryFactory->connect() called at [/home/chainwea/public_html/includes/init_includes/init_database.php:23]
    #3  require(/home/chainwea/public_html/includes/init_includes/init_database.php) called at [/home/chainwea/public_html/includes/autoload_func.php:48]
    #4  require(/home/chainwea/public_html/includes/autoload_func.php) called at [/home/chainwea/public_html/includes/application_top.php:158]
    #5  require(/home/chainwea/public_html/includes/application_top.php) called at [/home/chainwea/public_html/index.php:26]
     
    [07-Jul-2016 23:10:19 America/Los_Angeles] PHP Warning:  mysqli_connect(): (HY000/2002): No such file or directory in /home/chainwea/public_html/includes/classes/db/mysql/query_factory.php on line 62
    [07-Jul-2016 23:10:19 America/Los_Angeles] Request URI: /index.php?main_page=shopping_cart, IP address: 83.209.95.201
    #1  mysqli_connect() called at [/home/chainwea/public_html/includes/classes/db/mysql/query_factory.php:62]
    #2  queryFactory->connect() called at [/home/chainwea/public_html/includes/init_includes/init_database.php:23]
    #3  require(/home/chainwea/public_html/includes/init_includes/init_database.php) called at [/home/chainwea/public_html/includes/autoload_func.php:48]
    #4  require(/home/chainwea/public_html/includes/autoload_func.php) called at [/home/chainwea/public_html/includes/application_top.php:158]
    #5  require(/home/chainwea/public_html/includes/application_top.php) called at [/home/chainwea/public_html/index.php:26]
     
    [07-Jul-2016 23:10:19 America/Los_Angeles] PHP Warning:  mysqli_connect(): (HY000/2002): No such file or directory in /home/chainwea/public_html/includes/classes/db/mysql/query_factory.php on line 62

  5. #5
    Join Date
    Aug 2009
    Location
    North Idaho, USA
    Posts
    2,008
    Plugin Contributions
    1

    Default Re: MyDEBUG interpretation assistance (website and Admin)

    Just figured out that the myDEBUG-adm files are generated by:

    Opening the USPS shipping screen for editing. Actually, 2 or 3 myDEBUG files are generated when either the UPDATE or CANCEL button is clicked.

    Also found that clicking the "Check for updates" button on the Admin Home page, causes a single, similar or identical myDEBUG to be generated. lat9 suggestion
    The result displayed is

    Your version of Zen CartŪ appears to be current.
    (You are presently using: v1.5.4)

  6. #6
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,976
    Plugin Contributions
    96

    Default Re: MyDEBUG interpretation assistance (website and Admin)

    Rick, in answer to your question:
    Code:
    Sorry Cindy. That went right over the top of my head before first cup of coffee. Are you saying that a server configuration has been changed, a ZC setting has been changed or Rick had a brainfart and changed something & forgot to record the change in my notes?
    If you've just started receiving these messages, then the server's configuration has changed. Check your admin's Tools->Server/Version Info and search for allow_url_fopen; you'll see that it's currently Off. No brainfarts involved!

    Some webhosts allow you to override their default php.ini values via cPanel and some require that you sprinkle php.ini overrides in each folder where the override should be applied.

  7. #7
    Join Date
    Aug 2009
    Location
    North Idaho, USA
    Posts
    2,008
    Plugin Contributions
    1

    Default Re: MyDEBUG interpretation assistance (website and Admin)

    TNX Cindy,

    I will ask the questions. The server is a managed VPS and the host usually asks before making changes other than a cpanel update.

    Not sure why they would have changed a setting but you are correct

    allow_url_fopen: OFF/OFF

  8. #8
    Join Date
    Jan 2004
    Posts
    66,450
    Plugin Contributions
    81

    Default Re: MyDEBUG interpretation assistance (website and Admin)

    Quote Originally Posted by RixStix View Post
    Not sure why they would have changed a setting but you are correct

    allow_url_fopen: OFF/OFF
    Hosts often lock that down in the interest of thinking they're providing security protections. It'a s low-hanging-fruit measure often taken prematurely. And while it "does" do that, there are better ways to provide the same protections without crippling legit use.
    .
    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.

  9. #9
    Join Date
    Aug 2009
    Location
    North Idaho, USA
    Posts
    2,008
    Plugin Contributions
    1

    Default Re: MyDEBUG interpretation assistance (website and Admin)

    Thanks DrByte. for the comment and for renaming the thread.

    Host has re-enabled the function but strongly prefers to have it disabled due to recent zero day incidents.

    Just to throw fuel on a p.ssing contest....

    Zencart is behind the times if they think allow_url_fopen isn't a potential security issue. It's not a matter of if, it's a matter of when. In fact, we have had it enabled for years because we understand that old way of thinking. But there was recently a vulnerability for it that affected wordpress, and we turned it off on all servers to prevent that from harming customer sites. Ultimately, your server got included in the change, and I'm sorry for that. But, it's hard to keep it separate in the automated tools.
    In fact, this is only the 3rd complaint we've had about it, so I'm not sure that there's a reason anyone should still be developing software that needs it enabled.
    In case you are curious, an article of interest:
    https://goo.gl/BxKX08

    And a general summary on why this allow_url_fopen is not something to ignore:

    "If enabled, allow_url_fopen allows PHP's file functions -- such as
    file_get_contents() and the include and require statements -- can retrieve data from remote locations, like an FTP or web site. Programmers frequently forget this and don't do proper input filtering when passing user-provided data to these functions, opening them up to code injection vulnerabilities. A large number of code injection vulnerabilities reported in PHP-based web applications are caused by the combination of enabling allow_url_fopen and bad input filtering."

  10. #10
    Join Date
    Jan 2004
    Posts
    66,450
    Plugin Contributions
    81

    Default Re: MyDEBUG interpretation assistance (website and Admin)

    The input-filtering risk is well understood -- and equally well handled within Zen Cart.


    More and more we're moving towards using CURL ... but those same hosts turn it off citing the same alarmist reasons.

    An ecommerce site is NOT a wordpress site. They're different beasts. Hosts may not understand this, which is all too often a sad inconvenience for storeowners.
    .
    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.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Why would one shipping method be disabled if quotes are pulling from the ups server?
    By townsend2009 in forum Built-in Shipping and Payment Modules
    Replies: 8
    Last Post: 15 Aug 2011, 05:32 PM
  2. File uploads are disabled in the php.ini configuration file
    By stanleymog in forum General Questions
    Replies: 2
    Last Post: 19 Aug 2008, 01:24 PM
  3. Http 404 whenever I click on anything under the Configuration Tab
    By nickita in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 14 Mar 2007, 01:42 AM
  4. Replies: 5
    Last Post: 15 Jan 2007, 06:23 AM

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