PHP4 or PHP5, and apache: pros/cons

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

    #1

    PHP4 or PHP5, and apache: pros/cons

    I'm starting a database/web interface project, using Linux and postgresql.

    I've programmed in PHP4 in the past, and for this new project am unsure
    whether to use PHP4 or PHP5.

    My main concerns are stability and security.

    What are the pros/cons/issues for PHP4/PHP5 with apache (either 1.3 or 2)?

    TIA,

    S


  • Andy Jeffries

    #2
    Re: PHP4 or PHP5, and apache: pros/cons

    On Tue, 25 Apr 2006 11:02:36 -0400, sinister wrote:[color=blue]
    > I'm starting a database/web interface project, using Linux and postgresql.
    >
    > I've programmed in PHP4 in the past, and for this new project am unsure
    > whether to use PHP4 or PHP5.
    >
    > My main concerns are stability and security.
    >
    > What are the pros/cons/issues for PHP4/PHP5 with apache (either 1.3 or 2)?[/color]

    I'd say go with PHP5 on Apache2.

    It's faster and has better object support (which for a new project may be
    useful).

    If you don't wish to use any of PHP5's new features you can still write
    PHP4 style code but run it on a PHP5 installation.

    I'm running it on 4 web servers and it's beautiful.

    Cheers,


    Andy


    --
    Andy Jeffries MBCS CITP ZCE | gPHPEdit Lead Developer
    http://www.gphpedit.org | PHP editor for Gnome 2
    http://www.andyjeffries.co.uk | Personal site and photos

    Comment

    • Michael B. Trausch

      #3
      Re: PHP4 or PHP5, and apache: pros/cons

      Andy Jeffries wrote in <pan.2006.04.25 .15.08.06.34206 3@andyjeffries. co.uk>
      on Tue April 25 2006 11:08:[color=blue]
      >
      > I'd say go with PHP5 on Apache2.
      >
      > It's faster and has better object support (which for a new project may be
      > useful).
      >[/color]

      Totally agreed. The new object model in PHP 5 is worth looking into. It
      allows you to create your own class libraries that you can reuse in other
      PHP 5 applications, essentially empowering you to create your own
      customized framework for applications that can totally use an OOP model to
      make things happen.

      This, when implemented correctly, can turn into very concise, readable code.

      - Mike

      Comment

      • nospa@mmm.net

        #4
        Re: PHP4 or PHP5, and apache: pros/cons

        In article <fIOdnYt6ueKfzN PZRVn-gQ@comcast.com> ,
        michael.trausch .no.spam@comcas t.net says...[color=blue]
        > Andy Jeffries wrote in <pan.2006.04.25 .15.08.06.34206 3@andyjeffries. co.uk>
        > on Tue April 25 2006 11:08:[color=green]
        > >
        > > I'd say go with PHP5 on Apache2.
        > >
        > > It's faster and has better object support (which for a new project may be
        > > useful).
        > >[/color]
        >
        > Totally agreed. The new object model in PHP 5 is worth looking into. It
        > allows you to create your own class libraries that you can reuse in other
        > PHP 5 applications, essentially empowering you to create your own
        > customized framework for applications that can totally use an OOP model to
        > make things happen.
        >
        > This, when implemented correctly, can turn into very concise, readable code.
        >
        > - Mike
        >[/color]

        Silly question - forgive me but why not just use C++ ?

        Comment

        • Michael B. Trausch

          #5
          Re: PHP4 or PHP5, and apache: pros/cons

          nospa@mmm.net wrote in
          <MPG.1eb8652473 f3e1b2989877@ne ws-text.blueyonder .co.uk> on Tue April 25
          2006 12:56:
          [color=blue]
          >
          > Silly question - forgive me but why not just use C++ ?
          >[/color]

          Because C++ applications take a lot of time to develop, compared to PHP
          applications. While they can be more efficient when running large
          applications over and over again, the application model isn't one that I'd
          want to use for web development. Since PHP handles things like GET and
          POST request methods, and things like COOKIES and session support, database
          support, and the like, and it is a language that is primarily used for web
          development, I'd use that over C++, any day.

          Now if I were going to write a GUI interface for something where I've
          devised a database backend or other back-end server process, and I want to
          run the program on an end-user's computer, I'd probably use C++. That's
          because PHP, while GREAT for web-based applications, is not something I'd
          use for a program running on somebody's system.

          - Mike

          Comment

          • sinister

            #6
            Re: PHP4 or PHP5, and apache: pros/cons


            "Michael B. Trausch" <michael.trausc h.no.spam@comca st.net> wrote in message
            news:qsKdnbs5r9 Z6-tPZnZ2dneKdnZyd nZ2d@comcast.co m...[color=blue]
            > nospa@mmm.net wrote in
            > <MPG.1eb8652473 f3e1b2989877@ne ws-text.blueyonder .co.uk> on Tue April 25
            > 2006 12:56:
            >[color=green]
            >>
            >> Silly question - forgive me but why not just use C++ ?
            >>[/color]
            >
            > Because C++ applications take a lot of time to develop, compared to PHP
            > applications. While they can be more efficient when running large[/color]

            Heh heh.

            When I coded some web app/DB stuff years ago, I first started with C. Then
            moved to C++. Ended up at PHP.

            As you say, PHP is easier.

            Still like C and C++ for other things.
            [color=blue]
            > applications over and over again, the application model isn't one that I'd
            > want to use for web development. Since PHP handles things like GET and
            > POST request methods, and things like COOKIES and session support,
            > database
            > support, and the like, and it is a language that is primarily used for web
            > development, I'd use that over C++, any day.
            >
            > Now if I were going to write a GUI interface for something where I've
            > devised a database backend or other back-end server process, and I want to
            > run the program on an end-user's computer, I'd probably use C++. That's
            > because PHP, while GREAT for web-based applications, is not something I'd
            > use for a program running on somebody's system.
            >
            > - Mike
            >[/color]


            Comment

            Working...