469,076 Members | 1,449 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,076 developers. It's quick & easy.

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
Apr 25 '06 #1
5 1957
On Tue, 25 Apr 2006 11:02:36 -0400, sinister wrote:
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)?


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

Apr 25 '06 #2
Andy Jeffries wrote in <pa****************************@andyjeffries.co.uk >
on Tue April 25 2006 11:08:

I'd say go with PHP5 on Apache2.

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


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
Apr 25 '06 #3
In article <fI********************@comcast.com>,
mi*********************@comcast.net says...
Andy Jeffries wrote in <pa****************************@andyjeffries.co.uk >
on Tue April 25 2006 11:08:

I'd say go with PHP5 on Apache2.

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


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


Silly question - forgive me but why not just use C++ ?
Apr 25 '06 #4
no***@mmm.net wrote in
<MP************************@news-text.blueyonder.co.uk> on Tue April 25
2006 12:56:

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


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

Apr 25 '06 #5

"Michael B. Trausch" <mi*********************@comcast.net> wrote in message
news:qs******************************@comcast.com. ..
no***@mmm.net wrote in
<MP************************@news-text.blueyonder.co.uk> on Tue April 25
2006 12:56:

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

Because C++ applications take a lot of time to develop, compared to PHP
applications. While they can be more efficient when running large


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.
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

Apr 25 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Tim Tyler | last post: by
2 posts views Thread by Brad Shinoda | last post: by
reply views Thread by Dave Pham | last post: by
1 post views Thread by porneL | last post: by
reply views Thread by bissatch | last post: by
2 posts views Thread by Stefan Huber | last post: by
3 posts views Thread by jmark | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.