SourceForge has been redesigned. Learn more.
Close

#1811 file_get_contents() always return false

self-service
http://cppcheck.sourceforge.net/demo/
cppcheck
2014-06-25
2012-12-02
Tim Gerundt
No

We support a online demo from "Cppcheck" at the website:
http://cppcheck.sourceforge.net/demo/

But since few weeks it don't work anymore, because the file_get_contents() call from the PHP scripts returns allways false:

return @file_get_contents('http://cppcheck.sourceforge.net/cgi-bin/democlient.cgi', false, $context);

Source Code

We have no problem the call the remote cgi script from a local php installation. So the cgi-bin file must be OK. In the past we have no problem to read "*.sourceforge.net" URLs from PHP. Has this changed?

Thank you for your help!

Greetings,
Tim Gerundt

Discussion

  • Anonymous

    Anonymous - 2012-12-14
    • labels: php, cgi-bin, file_get_contents --> php, cgi-bin, file_get_contents, siteops, p3
    • status: unread --> assigned
    • assigned_to: Wayne Davison
     
  • Anonymous

    Anonymous - 2012-12-14

    Greetings,

    According to our outbound connectivity policy, I wouldn't expect this to be working, but since you indicated that this used to work, I'm going to escalate this to our operations team to evaluate.

    Regards,
    Chris Tsai, SourceForge.net Support

     
  • XhmikosR

    XhmikosR - 2013-07-16

    Bump

    This is still an issue.

     
    • Anonymous

      Anonymous - 2013-07-16

      XhmikosR,

      I'm going to talk to the team about getting this prioritized, that said though, do you have another example? Or is it cppcheck's page that you're concerned about.

      Thanks,
      Chris Tsai, SourceForge.net Support

       
  • XhmikosR

    XhmikosR - 2013-07-16

    Hi.

    I only know this issue because of cppcheck. I'm not sure if it's a general issue or not.

     
  • XhmikosR

    XhmikosR - 2013-08-04

    Any news?

     
  • Anonymous

    Anonymous - 2013-08-06
    • status: assigned --> pending
     
  • Anonymous

    Anonymous - 2013-08-06

    Greetings,

    Checking in with the team on this and they indicate that this is should be done via direct access instead of a web call. Give that a try and let us know.

    Regards,
    Chris Tsai, SourceForge.net Support

     
  • XhmikosR

    XhmikosR - 2013-08-06

    Hi.

    What does that mean?

    Note that it worked perfectly fine up until around December 2012.

     
  • Anonymous

    Anonymous - 2013-08-06
    • status: pending --> assigned
     
  • Anonymous

    Anonymous - 2013-08-06

    So what I meant by that is instead of using the "http://" path, use a direct filesystem path.

    eg.

    return @file_get_contents('/home/project-web/cppcheck/cgi-bin/democlient.cgi', false, $context);
    

    With that said though, looking at your php code again, it looks like you set http headers that are needed for this request, which doesn't seem to work with direct file access as I describe above.

    I'm circling back with the team on this issue again.

    Regards,
    Chris Tsai, SourceForge.net Support

     
  • XhmikosR

    XhmikosR - 2013-09-28

    Any news on this?

     
  • Daniel Marjamäki

    Hello! I am the maintainer for Cppcheck. The democlient was very useful. If you can make this work again I'd appreciate it very much.

     
  • Anonymous

    Anonymous - 2014-06-25
    • status: assigned --> self-service
    • assigned_to: Wayne Davison --> Chris Tsai
     

Log in to post a comment.