Forum Discussion

ringoseagull_77's avatar
ringoseagull_77
Icon for Nimbostratus rankNimbostratus
Aug 25, 2010

php include problem

Hi, Got an issue on a pair of 1600 active/standby units running 10.1. The web page uses a php include to call a form. The script then calls another part of the form in the same way but this fails to get displayed. This used to work on 9.4.7, and the same code still does work on the external facing F5s which run 9.4.7. No error messages on the page, just missing form. Ran a tcpdump but got no errors or dropped packets. First guess is a difference in the way to 10.1 handles php but I can't find an error to ppoint me in the right direction. Also, inital web page is requested across http, but these requests are https. Any ideas? Code: The first file_get_contents is fine, second is failing. if(!isset($_GET['tfa_next'])) { //sanitise the request & grab the form data $fid = $_GET['fid']; $output = file_get_contents("https://www.city.ac.uk/forms/rest/forms/view/".$fid); } else { $next = $_GET['tfa_next']; $output = file_get_contents("https://www.city.ac.uk/forms/rest".$next); } echo $output;
  • Hi,

     

     

    Got an issue on a pair of 1600 active/standby units running 10.1.

     

     

    The web page uses a php include to call a form. The script then calls another part of the form in the same way but this fails to get displayed.

     

     

    This used to work on 9.4.7, and the same code still does work on the external facing F5s which run 9.4.7.

     

     

    No error messages on the page, just missing form. Ran a tcpdump but got no errors or dropped packets.

     

     

    First guess is a difference in the way to 10.1 handles php but I can't find an error to ppoint me in the right direction.

     

     

    Also, inital web page is requested across http, but these requests are https.

     

     

    Any ideas?

     

     

    Code:

     

     

    The first file_get_contents is fine, second is failing.

     

     

    if(!isset($_GET['tfa_next'])) {

     

    //sanitise the request & grab the form data

     

    $fid = $_GET['fid'];

     

    $output = file_get_contents("https://www.city.ac.uk/forms/rest/forms/view/".$fid);

     

    } else {

     

    $next = $_GET['tfa_next'];

     

    $output = file_get_contents("https://www.city.ac.uk/forms/rest".$next);

     

    }

     

     

    echo $output;
  • Hello,

     

     

    php shouldn't be affected by the LTM as it runs on the server only. Are you running ASM that might strip out some of the page content, or is there another device involved that might have an impact?

     

    Could be related to the cipher change, I think version 10 doesn't allow weak ciphers now by default? (see this post: http://devcentral.f5.com/Community/GroupDetails/tabid/1082223/asg/52/afv/topic/aft/1174246/aff/31/showtab/groupforums/Default.aspx )

     

     

    Is it any different in Firefox to IE?

     

     

    Let us know how you get on!
  • George_Watkins_'s avatar
    George_Watkins_
    Historic F5 Account
    Hi ringoseagull,

     

     

    PHP should all be executed on the server-side and rendered as HTML. The LTM doesn't know the difference between ASP, PHP, Rails, or what have you. I would take the LTM out of the equation and try accessing your application directly on the application server. Check your Apache error logs if you're still having issues.

     

     

    If everything looks good on the application server, I'd guess there is a config problem with the virtual server. Most common mistakes here are not assigning an HTTP profile to the virtual or a SNAT if needed.

     

     

    -George
  • Thanks for your replies.

     

     

    No other hardware involved. Page loads fine directly from server. VS has an http profile assigned. The page calls the forms from an https address - the 443 VS also uses the same http profile. SNAT et to automap, can't see that as an issue. Same error in all browsers.

     

     

    Been following the cipher/SSL route. The only security is the SSL cert, and that tests fine. I added the iRule for TLS renegotiation - didn't resolve the issue.
  • What if you just create a simple php, eg:

     
    $output = file_get_contents("https://www.city.ac.uk/");
    echo $output;
    

    Do you see anything? Do you see any messages in apache error log?