v4 and v5 on the same machine

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

    v4 and v5 on the same machine

    We want to set up a PHP server for instructors to teach PHP, but
    different instructors have different needs. Is it possible to install
    PHP 4.3.8 *and* PHP 5 on the same machine? Perhaps using different
    ports or something to keep them separated? I have a Windows 2003
    Server running IIS6.

    Thanks.
  • Sebastian Lauwers

    #2
    Re: v4 and v5 on the same machine

    Mike wrote:[color=blue]
    > We want to set up a PHP server for instructors to teach PHP, but
    > different instructors have different needs. Is it possible to install
    > PHP 4.3.8 *and* PHP 5 on the same machine? Perhaps using different
    > ports or something to keep them separated? I have a Windows 2003
    > Server running IIS6.
    >
    > Thanks.[/color]

    I have php 4.3.8 and 5.0.0 running great on windows xp pro.
    Although it's with Apache 2.0.50, this shouldn't be a big deal with ISS.

    I've installed PHP4 as CGI and PHP5 as an apache module.

    There are some tutorials out there that show how you can do it, never
    searched for IIS though, but i'm sure some geek managed it.

    If you need more info.

    HTH,
    Sebastian

    Comment

    • Chung Leong

      #3
      Re: v4 and v5 on the same machine

      "Sebastian Lauwers" <dacrashanddie@ nospam.9online. fr> wrote in message
      news:411abd0a$0 $18796$626a14ce @news.free.fr.. .[color=blue]
      > Mike wrote:[color=green]
      > > We want to set up a PHP server for instructors to teach PHP, but
      > > different instructors have different needs. Is it possible to install
      > > PHP 4.3.8 *and* PHP 5 on the same machine? Perhaps using different
      > > ports or something to keep them separated? I have a Windows 2003
      > > Server running IIS6.
      > >
      > > Thanks.[/color]
      >
      > I have php 4.3.8 and 5.0.0 running great on windows xp pro.
      > Although it's with Apache 2.0.50, this shouldn't be a big deal with ISS.
      >
      > I've installed PHP4 as CGI and PHP5 as an apache module.
      >
      > There are some tutorials out there that show how you can do it, never
      > searched for IIS though, but i'm sure some geek managed it.
      >
      > If you need more info.
      >
      > HTH,
      > Sebastian[/color]

      On Apache 2 I managed to get both running as modules with the following:

      LoadModule php4_module c:/php/sapi/php4apache2.dll
      LoadModule php5_module c:/php5/php5apache2.dll

      AddType application/x-httpd-php .php
      AddHandler php-script .php5

      ..php5 files are handled by the PHP5 Apache handler, while .php are handled
      by the PHP4 Apache filter (because php4_module is loaded first). Couldn't
      get them to use different php.ini though. Even though PHP4 is running as a
      filter, it still thinks the SAPI type is apache2handler.

      Maybe the behavior is different on Linux. Anyone?


      Comment

      • Andrew Crowe

        #4
        Re: v4 and v5 on the same machine

        Hi,
        [color=blue]
        > We want to set up a PHP server for instructors to teach PHP, but
        > different instructors have different needs. Is it possible to install
        > PHP 4.3.8 *and* PHP 5 on the same machine? Perhaps using different
        > ports or something to keep them separated? I have a Windows 2003
        > Server running IIS6.[/color]

        Not sure if this will apply to you, but we've had PHP4 and 5 running on
        multiple sites on our IIS5 server (different versions on different sites
        tho, no one site had both), and we needed different php.ini files.

        The easiest way of doing this I found was to hex edit php5ts.dll and
        replace all instances of "php.ini" to "ph5.ini", thus allowing different
        php.ini files to exist in the WINNT folder

        Andrew

        Comment

        • Mike

          #5
          Re: v4 and v5 on the same machine

          Thanks to everyone who responded. We have worked out our political
          differences and decided to use PHP5 for everyone!

          Andrew Crowe <andrew@adaptiv etechnologies.c om> wrote in message news:<411c9aeb$ 0$9402$afc38c87 @news.easynet.c o.uk>...[color=blue]
          > Hi,
          >[color=green]
          > > We want to set up a PHP server for instructors to teach PHP, but
          > > different instructors have different needs. Is it possible to install
          > > PHP 4.3.8 *and* PHP 5 on the same machine? Perhaps using different
          > > ports or something to keep them separated? I have a Windows 2003
          > > Server running IIS6.[/color]
          >
          > Not sure if this will apply to you, but we've had PHP4 and 5 running on
          > multiple sites on our IIS5 server (different versions on different sites
          > tho, no one site had both), and we needed different php.ini files.
          >
          > The easiest way of doing this I found was to hex edit php5ts.dll and
          > replace all instances of "php.ini" to "ph5.ini", thus allowing different
          > php.ini files to exist in the WINNT folder
          >
          > Andrew[/color]

          Comment

          • Sebastian Lauwers

            #6
            Re: v4 and v5 on the same machine

            Chung Leong wrote:
            [color=blue]
            > On Apache 2 I managed to get both running as modules with the following:
            >
            > LoadModule php4_module c:/php/sapi/php4apache2.dll
            > LoadModule php5_module c:/php5/php5apache2.dll
            >
            > AddType application/x-httpd-php .php
            > AddHandler php-script .php5
            >
            > .php5 files are handled by the PHP5 Apache handler, while .php are handled
            > by the PHP4 Apache filter (because php4_module is loaded first). Couldn't
            > get them to use different php.ini though. Even though PHP4 is running as a
            > filter, it still thinks the SAPI type is apache2handler.
            >
            > Maybe the behavior is different on Linux. Anyone?[/color]

            If i'm not mistaking, it is possible to specify the php.ini when you
            compile a module. Thus, you can have both php4 and php5 as modules
            loaded. This isn't possible under MS-Win.


            Sebastian

            --
            The most likely way for the world to be destroyed,
            most experts agree, is by accident.
            That's where we come in; we're computer professionals.
            We cause accidents.
            --Nathaniel Borenstein

            Comment

            Working...