How can I veiw HTTPS headers in PHP5?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Harmony504
    New Member
    • Oct 2007
    • 14

    #1

    How can I veiw HTTPS headers in PHP5?

    I am using PHP5.2.5. I am trying to view headers from an SSL site using the following:
    [PHP]
    error_log(print _r(get_headers( 'https://urltoserver/file.fdf')));
    [/PHP]

    I continue to get the following error:
    Code:
    PHP Notice:  get_headers() [<a href='function.get-headers'>function.get-headers</a>]: Unable to find the wrapper &quot;https&quot; - did you forget to enable it when you configured PHP?
    
    [28-Jan-2008 09:45:06] PHP Warning:  get_headers() [<a href='function.get-headers'>function.get-headers</a>]: This function may only be used against URLs.
    So what do I need to do to use get_headers()?
  • sandeepsandeep
    New Member
    • Dec 2006
    • 50

    #2
    change the line in php.ini and restart the server
    ;extension=php_ openssl.dll to extension=php_o penssl.dll
    in php.ini file.
    simply remove ";" char.

    Thanks,
    Sandeep Agrawal

    Comment

    • Harmony504
      New Member
      • Oct 2007
      • 14

      #3
      Originally posted by sandeepsandeep
      change the line in php.ini and restart the server
      ;extension=php_ openssl.dll to extension=php_o penssl.dll
      in php.ini file.
      simply remove ";" char.

      Thanks,
      Sandeep Agrawal
      I did that. It still doesn't work.

      Comment

      • Harmony504
        New Member
        • Oct 2007
        • 14

        #4
        I used get_loaded_exte nsions to see if the openssl dll was loaded and it is not. I did uncomment this in the php.ini and I restarted Apache. Is there something else I can do to load this dll? I chan't use dl() becuase of threading.

        Thanks

        Comment

        • Harmony504
          New Member
          • Oct 2007
          • 14

          #5
          Originally posted by Harmony504
          I used get_loaded_exte nsions to see if the openssl dll was loaded and it is not. I did uncomment this in the php.ini and I restarted Apache. Is there something else I can do to load this dll? I chan't use dl() becuase of threading.

          Thanks
          You were right. It works when openssl is loaded. Apache was not actually restarting for me before so my change to load openssl never took place. Now it is working.

          THANKS!

          Comment

          Working...