Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Problem with image script

Discussion in 'General Discussion' started by 2Pro4u, May 23, 2018.

  1. 2Pro4u

    2Pro4u Member

    Joined:
    Jan 17, 2017
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Earth
    cPanel Access Level:
    Root Administrator
    I have a site that aggregates news from 3rd party sites, as well as a few of my own. In this site, I have an image script that sites in the img src before the calling of a 3rd party image. This script basically converts any http image from a 3rd party domain to https, as my domain is https.

    The thing that I've noticed, is that on my other sites (not the aggregator, but what is being pulled), this script broke in pulling their image at all.

    If I go into my source, and remove the image.php from the img src, and refresh the page, the images then pull just fine.

    So on my aggregator site, I have dozens of sites, that at first appearance, look like they've stopped allowing their images to be pulled or hyperlinked to, but is what I believe to be the case, is that these site owners, have actually updated their cpanel, to these versions of cpanel that break my image pulling script that keeps my aggregator completely https, without saying images aren't https.

    I'm just starting to know php, but the image.php was provided here: - Removed -

    Can anybody here confirm my suspicions that one of the 2 recent cpanel updates broke this script, and if so, if it was because of a security reason with cpanel, or something unintentional by the cpanel dev team?

    I've looked over the last 2 cpanel changelogs, but I don't really understand if any of those fixes would have broken this image script.



    Thanks for any help someone can provide me on this issue.

    (Unfortunately, I'm unable to give a link to my aggregator to show it working/not working.)
     
    #1 2Pro4u, May 23, 2018
    Last edited by a moderator: May 23, 2018
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,323
    Likes Received:
    1,851
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello @2Pro4u,

    Can you review the Apache error log (/usr/local/apache/logs/error_log) on one of the cPanel servers the script is fetching the images from to see what appears when reproducing the issue?

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. 2Pro4u

    2Pro4u Member

    Joined:
    Jan 17, 2017
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Earth
    cPanel Access Level:
    Root Administrator
    I've looked through the apache error log for the domain name and date that would contain any error from the aggregator (on the same server) for my domain that has the images (the site that's being aggregated), and there are no image errors noted in the error log. Just a bunch of bots trying to find a Wordpress login file.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,323
    Likes Received:
    1,851
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    You'd need to check the log on the server that hosts the images, as opposed to the server that hosts the aggregator.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. 2Pro4u

    2Pro4u Member

    Joined:
    Jan 17, 2017
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Earth
    cPanel Access Level:
    Root Administrator
    They are both are on the same server, which is why it's even more surprising why it broke.
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,323
    Likes Received:
    1,851
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Check to see if an error_log file exists in the document root of the PHP script. If so, does it list any specific error messages related to the issue?

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. 2Pro4u

    2Pro4u Member

    Joined:
    Jan 17, 2017
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Earth
    cPanel Access Level:
    Root Administrator
    Nothing specific to this problem in the aggregators error_log.

    The strange thing is, I just recently switched to https myself, and I remember the whole reason I implemented this image proxy was because the site would call all these 3rd party images that weren't secure, and it would make my page show as only partially secure. Now, when I edit my code, and remove the image proxy script, and call the 3rd party images, I don't get this problem, instead the script doesn't pull the images.

    Could this have anything to do with the cpanel updates or was the https standard changed recently that would have affected this? As far as I know, I have no other code that should be filtering these non-https images, yet now, my aggregator page is *staying* fully ssl, despite not using the image proxy script any more.

    Whatever it is, it's doing the ssl checking before that image proxy script can get to it. So the server has already deemed it not to be used, before the image proxy script could convert the image to https.

    Basically my aggregator went from loads of images, to far less, and it happened roughly right after the last two cpanel updates.

    Any ideas on if the last two cpanel updates could have affected this problem I'm having? (I'm also using CloudLinux if that makes any difference.)

    Thanks for any more help you can provide.
     
  8. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,323
    Likes Received:
    1,851
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello @2Pro4u,

    Could you open a support ticket so we can take a closer look at the system and rule out any changes in cPanel & WHM that could relate to the issue you are facing? You can post the ticket number here and I'll link this thread to the ticket.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. 2Pro4u

    2Pro4u Member

    Joined:
    Jan 17, 2017
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Earth
    cPanel Access Level:
    Root Administrator
    Do you mean allow a Cpanel support team access to my server? If so, I'm sorry, but that won't be happening. I have been able to narrow down the issue slightly, the backend of our script uses SimplePie, and while it use to be able to process images from an "enclosure" tag in an rss feed, it now can no longer do that.

    While I don't know the method or process in which SimplePie accomplishes this, I can tell you that I've not modified SimplePie, and I'm quite certain my code that uses SimpePie wouldn't have been altered in a manner that would affect this.

    One of Cpanel's last two updates I believe have affected this.

    Can you tell me, is there a way to safely rollback Cpanel versions, to test the theory that one of these two recent Cpanel versions are the culprit of the problem?
     
  10. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    16,309
    Likes Received:
    393
    Trophy Points:
    583
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    You cannot roll back to earlier cPanel versions. What you might want to do is check with the developer about the script.
    github.com/simplepie/simplepie/issues

    I'm not sure if this is related to your issue but I did find this bug for example:
    github.com/simplepie/simplepie/issues/539
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    cPanelMichael likes this.
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice