Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Join Date
    Jun 2016
    Location
    Suffolk VA
    Posts
    590
    Plugin Contributions
    0

    Default Warning in error logs

    I'm getting a warning in the error logs that I haven't been able to isolate. The reason for it is pretty obvious, but I don't see where it's coming from.

    [18-Apr-2023 03:04:03 America/New_York] Request URI: /index.php?main_page=product_info&cPath=1&products_id=70, IP address: 51.222.253.20
    #1 getimagesize() called at [/home/newnatur/public_html/includes/templates/fluorspar/templates/tpl_modules_main_product_image.php:19]
    #2 require(/home/newnatur/public_html/includes/templates/fluorspar/templates/tpl_modules_main_product_image.php) called at [/home/newnatur/public_html/includes/templates/fluorspar/templates/tpl_product_info_display.php:51]
    #3 require(/home/newnatur/public_html/includes/templates/fluorspar/templates/tpl_product_info_display.php) called at [/home/newnatur/public_html/includes/modules/pages/product_info/main_template_vars.php:153]
    #4 require(/home/newnatur/public_html/includes/modules/pages/product_info/main_template_vars.php) called at [/home/newnatur/public_html/includes/templates/fluorspar/common/tpl_main_page.php:167]
    #5 require(/home/newnatur/public_html/includes/templates/fluorspar/common/tpl_main_page.php) called at [/home/newnatur/public_html/index.php:94]
    --> PHP Warning: getimagesize(images/https://www.newnaturalsonline.com/images/new_logo_fb.jpg): failed to open stream: No such file or directory in /home/newnatur/public_html/includes/templates/fluorspar/templates/tpl_modules_main_product_image.php on line 19.

    The same warning is being generated on line 23 of ...tpl_modules_main_product_image.php. I believe it's coming from the variable '$current_page_base' being incorrectly defined. But that variable occurs in so many places in Zencart that I haven't been able to figure out which of them is creating the problem. Can anyone help?

    I see that the variable is used in the One Page Checkout plugin, which we did install but are not using. However, that plugin is also on my test installation and is not generating an error there, so I don't think that is the source.

  2. #2
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,564
    Plugin Contributions
    89

    Default Re: Warning in error logs

    I'm guessing that the image for the product with an id of 70 has somehow been defined as https://www.newnaturalsonline.com/images/new_logo_fb.jpg instead of just new_logo_fb.jpg.

  3. #3
    Join Date
    Jun 2016
    Location
    Suffolk VA
    Posts
    590
    Plugin Contributions
    0

    Default Re: Warning in error logs

    Quote Originally Posted by lat9 View Post
    I'm guessing that the image for the product with an id of 70 has somehow been defined as https://www.newnaturalsonline.com/images/new_logo_fb.jpg instead of just new_logo_fb.jpg.
    That file isn't the image for that product. But you've given me a hint as to where to look, thanks.

  4. #4
    Join Date
    Jun 2016
    Location
    Suffolk VA
    Posts
    590
    Plugin Contributions
    0

    Default Re: Warning in error logs

    Further investigation shows that it's happening whenever you click on any product. The example I gave just happened to be product number 70. I'm seeing it on multiple product numbers. So I still think it's related to $current_page_base having the wrong value.

  5. #5
    Join Date
    Feb 2009
    Location
    UK
    Posts
    1,245
    Plugin Contributions
    1

    Default Re: Warning in error logs

    I see the same is happening with some of the manufacturers images in the top menu's Brands dropdown. If it was a site wide issue then I would have thought that all of the manufacturers images would be affected. I would compare the way all of those manufacturers images were added to the site (hard-coded in a php file or through the database - I'm not familiar with this template) as there must be something different between each of them. That might then give an idea as to why it is also happening on product images.
    Simon

  6. #6
    Join Date
    Nov 2007
    Location
    Woodbine, Georgia, United States
    Posts
    4,036
    Plugin Contributions
    61

    Default Re: Warning in error logs

    I would have to guess that because it's not all uploaded images, that it's most likely something you did when adding them. Did you use a spreadsheet or similar upload to add products? Try a different image index.php?main_page=product_info&cPath=1&products_id=70 and see if a different image works... then we know it's the image.

    ~Melanie
    PRO-Webs, Inc. :: Recent Zen Cart Projects :: Zen Cart SEO – 12 Steps to Success
    **I answer questions in the forum, private messages are NOT answered. You are welcome to contact us via our website for professional engagements.

  7. #7
    Join Date
    Jun 2016
    Location
    Suffolk VA
    Posts
    590
    Plugin Contributions
    0

    Default Re: Warning in error logs

    Quote Originally Posted by mprough View Post
    I would have to guess that because it's not all uploaded images, that it's most likely something you did when adding them. Did you use a spreadsheet or similar upload to add products? Try a different image index.php?main_page=product_info&cPath=1&products_id=70 and see if a different image works... then we know it's the image.

    ~Melanie

    It's not the image, because that isn't the image for that product. And also it's happening on any product that is clicked on, not just product ID 70. It was just coincidental that the specific warning I copied was for product ID 70. Other products have generated the same error.

    I also tried changing the image file name and get exactly the same warning.

  8. #8
    Join Date
    Jun 2016
    Location
    Suffolk VA
    Posts
    590
    Plugin Contributions
    0

    Default Re: Warning in error logs

    Quote Originally Posted by simon1066 View Post
    I see the same is happening with some of the manufacturers images in the top menu's Brands dropdown. If it was a site wide issue then I would have thought that all of the manufacturers images would be affected. I would compare the way all of those manufacturers images were added to the site (hard-coded in a php file or through the database - I'm not familiar with this template) as there must be something different between each of them. That might then give an idea as to why it is also happening on product images.
    What is it you see happening? I clicked on each of the manufacturer images and no warnings were generated. I'm not sure how you could see the entries in my log anyway, or am I completely missing what you meant?

    The manufacturers' brand images were uploaded via my FTP program, just like everything else except for the primary image in each product. Those were uploaded using the product image field in the regular product entry process.

  9. #9
    Join Date
    Nov 2007
    Location
    Woodbine, Georgia, United States
    Posts
    4,036
    Plugin Contributions
    61

    Default Re: Warning in error logs

    What is it you see happening? I clicked on each of the manufacturer images and no warnings were generated. I'm not sure how you could see the entries in my log anyway, or am I completely missing what you meant?

    The manufacturers' brand images were uploaded via my FTP program, just like everything else except for the primary image in each product. Those were uploaded using the product image field in the regular product entry process.
    It doesn't matter, Zen Cart posted to the database the image file names and is somehow ADDING the http... to the image file entry. My guess, is if you look in your database you would likely find these particular images saved in this manner. So logically, since some are ok and some are not.... There are a few commonalities to troubleshoot, images file being one (but I see you already tried changing the filename), database tables, things like were they all edited or added at the same time or is this just a new thing, etc.

    ~Melanie
    PRO-Webs, Inc. :: Recent Zen Cart Projects :: Zen Cart SEO – 12 Steps to Success
    **I answer questions in the forum, private messages are NOT answered. You are welcome to contact us via our website for professional engagements.

  10. #10
    Join Date
    Feb 2009
    Location
    UK
    Posts
    1,245
    Plugin Contributions
    1

    Default Re: Warning in error logs

    Quote Originally Posted by HeleneWallis View Post
    What is it you see happening? I clicked on each of the manufacturer images and no warnings were generated. I'm not sure how you could see the entries in my log anyway, or am I completely missing what you meant?

    The manufacturers' brand images were uploaded via my FTP program, just like everything else except for the primary image in each product. Those were uploaded using the product image field in the regular product entry process.
    Melanie has given the good answer. So BTW, the Brands dropdown shows four manufacturers the first and fourth having no image (just the alt text is displayed) and inspecting these two 'images' in a browser's dev tools shows the image's corrupted link inside the <img> tag - they wouldn't have produced an error log.
    Last edited by simon1066; 19 Apr 2023 at 04:16 PM.
    Simon

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v157 FedEx Module Version 1.5.4, PHP Warning and Deprecated error in logs
    By Mattie C in forum Addon Shipping Modules
    Replies: 3
    Last Post: 12 Aug 2020, 11:58 PM
  2. Replies: 8
    Last Post: 5 Sep 2019, 09:25 PM
  3. Replies: 7
    Last Post: 16 Dec 2018, 04:00 PM
  4. v155 Email error warning in logs
    By KGL Racing in forum General Questions
    Replies: 1
    Last Post: 30 Nov 2018, 04:37 PM
  5. v151 "Warning: An error occurred" and no debug logs
    By emiLy in forum General Questions
    Replies: 13
    Last Post: 2 Apr 2014, 07:37 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