Php5 with support for https and ftps

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Chuck Anderson

    #1

    Php5 with support for https and ftps

    I am trying to install Php5 on my WindowsXP machine (at home, not on the
    'net). I downloaded the Php Windows binary at php.net, unzipped it to
    c:/Php5, changed my Apache config file to use Php5 with:

    LoadModule php5_module "c:/Php5/php5apache2.dll "

    .... and restarted apache (Apache/2.0.55 (Win32) mod_ssl/2.0.55
    OpenSSL/0.9.8a)

    Php5 works fine, but when I execute phpinfo, the registered streams are:
    php, file, http, ftp, compress.zlib

    I have application scripts that need to use ftps and https (to read
    access log files from the Cpanel over a secure link on my remote shared
    host).

    I went through this with Php4, and I now can't quite remember how I
    finally got the secure streams usable. I downloaded a complete package
    (and I can't remember which one it was ... d'oh!) and then picked and
    pruned away until all I had left was a Php installation I could use with
    my existing Apache 2 server and MySQL service.

    Does anyone understand what the difference is between between a version
    of Php that has https and ftps as registered streams and one that does
    not? Is it done during compilation? If so,how can I get a binary that
    was compiled that way?

    When I flip back to Php4:

    LoadModule php4_module "c:/Php/php4apache2.dll "

    .... my registered streams are:
    php, http, ftp, https, ftps, compress.zlib

    How do I get Php5 to do the same?

    --
    *************** **************
    Chuck Anderson • Boulder, CO

    *************** **************
  • Anonymous

    #2
    Re: Php5 with support for https and ftps

    Chuck Anderson wrote:
    Does anyone understand what the difference is between between a version
    of Php that has https and ftps as registered streams and one that does
    not? Is it done during compilation? If so,how can I get a binary that
    was compiled that way?
    From http://www.zend.com/manual/wrappers.http.php

    "Note: HTTPS is supported starting from PHP 4.3.0, if you have compiled
    in support for OpenSSL."


    So it's obviously done at compilation time. I believe you have to
    compile PHP yourself, there is no other official binary distribution
    that I am aware of.

    Because of laws restricting the use or export of cryptography products
    in some countries a lot of people hesitate to make binary versions that
    allow encrypted transfer available.

    Bye!

    Comment

    • Richard Levasseur

      #3
      Re: Php5 with support for https and ftps


      Anonymous wrote:
      Chuck Anderson wrote:
      Does anyone understand what the difference is between between a version
      of Php that has https and ftps as registered streams and one that does
      not? Is it done during compilation? If so,how can I get a binary that
      was compiled that way?
      >
      From http://www.zend.com/manual/wrappers.http.php
      >
      "Note: HTTPS is supported starting from PHP 4.3.0, if you have compiled
      in support for OpenSSL."
      >
      >
      So it's obviously done at compilation time. I believe you have to
      compile PHP yourself, there is no other official binary distribution
      that I am aware of.
      >
      Because of laws restricting the use or export of cryptography products
      in some countries a lot of people hesitate to make binary versions that
      allow encrypted transfer available.
      >
      Bye!
      IIRC: If apache is doing the ssl encryption, PHP doesn't need the
      openssl library to operate over ssl connections. An exception to this
      would be if you were opening an SSL connection in PHP, you probably
      need it then.

      For apache:


      For PHP, it may be more complicated, especially since you're using
      windows; it makes it more difficult to compile things it. You'll most
      likely have to put some dll's or load some extensions. This may help:


      Comment

      • Anonymous

        #4
        Re: Php5 with support for https and ftps

        Richard Levasseur wrote:
        IIRC: If apache is doing the ssl encryption, PHP doesn't need the
        openssl library to operate over ssl connections. An exception to this
        I know, I'm doing this almost every day. :-)
        would be if you were opening an SSL connection in PHP, you probably
        need it then.
        That's exactly what he is trying to do. See here:
        >I have application scripts that need to use ftps and https (to read
        >access log files from the Cpanel over a secure link on my remote shared
        >host).
        For apache:

        >
        For PHP, it may be more complicated, especially since you're using
        windows; it makes it more difficult to compile things it. You'll most
        likely have to put some dll's or load some extensions. This may help:
        http://us2.php.net/en/openssl
        Now that you mention it...

        The user comments on that page suggest that OpenSSL support is already
        compiled into the PHP4 binary distribution. You just have to define an
        environment variable to point to the config file and copy an important
        OpenSSL dll to the system32 directory. It doesn't say anything about
        PHP5 though.

        I have never cared about OpenSSL support for PHP because I never needed
        it. I only needed it in Apache. And I also still use PHP4, so not
        everything I know might be applicable to PHP5.

        @Chuck: You should really give this page a look, it might help you set
        things up correctly.

        Bye!

        Comment

        • Chuck Anderson

          #5
          Re: Php5 with support for https and ftps

          Anonymous wrote:
          Richard Levasseur wrote:
          >
          >IIRC: If apache is doing the ssl encryption, PHP doesn't need the
          >openssl library to operate over ssl connections. An exception to this
          >>
          >
          I know, I'm doing this almost every day. :-)
          >
          >
          >would be if you were opening an SSL connection in PHP, you probably
          >need it then.
          >>
          >
          That's exactly what he is trying to do. See here:
          >
          >
          >>I have application scripts that need to use ftps and https (to read
          >>access log files from the Cpanel over a secure link on my remote shared
          >>host).
          >>>
          >
          >
          >For apache:
          >http://tud.at/programm/apache-ssl-win32-howto.php3
          >>
          >For PHP, it may be more complicated, especially since you're using
          >windows; it makes it more difficult to compile things it. You'll most
          >likely have to put some dll's or load some extensions. This may help:
          >http://us2.php.net/en/openssl
          >>
          >
          Now that you mention it...
          >
          The user comments on that page suggest that OpenSSL support is already
          compiled into the PHP4 binary distribution. You just have to define an
          environment variable to point to the config file and copy an important
          OpenSSL dll to the system32 directory. It doesn't say anything about
          PHP5 though.
          >
          I have never cared about OpenSSL support for PHP because I never needed
          it. I only needed it in Apache. And I also still use PHP4, so not
          everything I know might be applicable to PHP5.
          >
          @Chuck: You should really give this page a look, it might help you set
          things up correctly.
          >
          Bye!
          >
          I have read both of the mentioned pages a few times - while I was trying
          to get Php4 to open https streams. Since doing all that, I now have
          Apache2 installed with the mod_ssl extension. I have installed OpenSSL
          0.9.8a and placed the two dll's (ssleay32.dll and libeay32.dll) in the
          correct folder (Windows/System32). I also found a version of Php4 that
          uses SSL.

          My best guess is that your first reply is correct - I need to compile
          PHP5 --with-openssl (either get the tools to do the compilation myself
          or find one already compiled that way).

          --
          *************** **************
          Chuck Anderson • Boulder, CO

          *************** **************

          Comment

          Working...