Beta
×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Introduction to PHP5

michael posted more than 11 years ago | from the getting-hacked-with-phpnuke-now-50%-easier dept.

PHP 343

Yet Another OO Fanatic writes "PHP core developer Sterling Hughes has a excellent presentation (mirror) about PHP5 online. So far it seems to be the best coverage of the new features in PHP5; highlights include the new object model, namespaces, interfaces, access control and exceptions. Java by any other name..."

cancel ×

343 comments

Sorry! There are no comments related to the filter you selected.

PHP5 will support... (-1, Offtopic)

greenskyx (609089) | more than 11 years ago | (#5618679)

new double sized TTF fonts...!!!

Web developer monkeys... (-1, Flamebait)

Anonymous Coward | more than 11 years ago | (#5618894)

...go back to college and get a real job

PHP5 (-1, Troll)

Anonymous Coward | more than 11 years ago | (#5618680)

What about PHP 9.0?

OoOoO (-1, Troll)

natew (234358) | more than 11 years ago | (#5618685)

OO!! oOOooOOo!! OOO!! PHP5!

wow (-1, Offtopic)

Anonymous Coward | more than 11 years ago | (#5618688)

yeah im first

PHP 5 (-1, Troll)

ethx1 (532391) | more than 11 years ago | (#5618690)

There is PHP 5!!!! Nooooo.....

Apache is Dying! Let's look at this months numbers (-1, Offtopic)

handybundler (232934) | more than 11 years ago | (#5618694)

Top Developers

Developer | February 2003 | Percent | March 2003 | Percent |Change
Apache | 22492327 | 62.72 | 244 | 86857 | 62.51 -0.21
Microsoft | 9687454 | 27.01 | 1 | 0748795 | 27.44 0.43
Zeus | 768951 | 2.14 | 794940 | 2.03 | -0.11
SunONE | 428004 | 1.19 | 419120 | 1.07 | -0.12

Re:Apache is Dying! Let's look at this months numb (2, Insightful)

winkydink (650484) | more than 11 years ago | (#5619030)

Can you say "statistically insignificant"?

Re:Apache is Dying! Let's look at this months numb (1)

Lxy (80823) | more than 11 years ago | (#5619060)

A drop in share in one month doesn't conclude to the OS dying. However, you bring up an interetsing point. When Apache loses ground, it never gets posted to Slashdot. When Apache gains, no matter how slight, it does get posted.

I'm all for the promotion of open source, and certainly Apache is a kickass product.

Jesus God and The USA FP!! (-1, Troll)

Anonymous Coward | more than 11 years ago | (#5618695)

FP :) praise the powers that be!

php sucks (-1, Troll)

Anonymous Coward | more than 11 years ago | (#5618697)

perl rocks! Troll post #1

K00l! (-1, Offtopic)

dougman (908) | more than 11 years ago | (#5618698)

W00t!

PHP 5 (-1, Troll)

Anonymous Coward | more than 11 years ago | (#5618702)

Able to crash faster, harder.

(nt) (-1, Offtopic)

Anonymous Coward | more than 11 years ago | (#5618704)

nt means no text

yikes! (2, Troll)

Telastyn (206146) | more than 11 years ago | (#5618705)

0 posts, and already slashdotted? the subscribers must've gotten to that one early!

And what's with the java comment, PHP is pretty much nothing like java. It has different uses, different strengths, and different semmantics. When are they going to properly fix PHP like making it stable? (*gasp*)

Re:yikes! (0, Offtopic)

Anonvmous Coward (589068) | more than 11 years ago | (#5618920)

"0 posts, and already slashdotted?"

One post and the moderators already get to use their redundant modreration?

Re:yikes! (0)

Anonymous Coward | more than 11 years ago | (#5618922)

Here is a quick fix to make PHP stable:

pkg_delete php
pkg_add mod_perl

Re:yikes! (0, Flamebait)

b0r1s (170449) | more than 11 years ago | (#5618928)

And what's with the java comment, PHP is pretty much nothing like java. It has different uses, different strengths, and different semmantics. When are they going to properly fix PHP like making it stable? (*gasp*)

The problem with PHP isn't stability, it's a bogus security model that makes is unusable on massively multi-user systems.

Re:yikes! (1, Funny)

Anonymous Coward | more than 11 years ago | (#5618948)

it's a bogus security model that makes is unusable on massively multi-user systems.

In other words, stability.

Re:yikes! (1)

dirvish (574948) | more than 11 years ago | (#5618963)

And what's with the java comment, PHP is pretty much nothing like java.

Yeah, what's with the flaming in an article? If that were a comment it would be modded down as a flame. Why add that line to a PHP article?

first "slashdotted" troll (-1, Offtopic)

twitter (104583) | more than 11 years ago | (#5618995)

0 posts, and already slashdotted? the subscribers must've gotten to that one early!

And what's with the java comment, PHP is pretty much nothing like java. It has different uses, different strengths, and different semmantics. When are they going to properly fix PHP like making it stable? (*gasp*)

What a great troll. You admit that you have have not read the article in question, complain about how Slashdot sucks and then complain about the subject. Nice work, you know nothing but you cast dispersions on everything. Comments like this contribute nothing and get in the way of inteligent discusion, so piss off.

Of course a large portion of the "slashdot effect" comes from the trolls who post slashdotted posts. Nasty little bastards with their silly bots hammering away to prevent information exchange. What a waste of time because it's a game that can't be won. There are too many people who want to share for the few disruptive morons.

Re:yikes! (5, Insightful)

joab_son_of_zeruiah (580903) | more than 11 years ago | (#5619069)

And what's with the java comment, PHP is pretty much nothing like java. ...
I understood the sense of this remark to be more about the PHP's and Java's capabilities to access other software systems, rather than a comment strictly about the language. Check out the PHP reference manual. Sure, the language is the first few chapters. Then check out the other *100* chapters.

One of the things I find fascinating when I compare the two at a system capability level is that they are equally capable. It's just that PHP is so much more easy to use, whereas Java is so much more orthodox. Easy to use often wins over orthodox.

In the long run PHP has as much chance to be a Java killer as .NET does. In the great battle for free vs. proprietary software do I really need orthodox?

PHP 5: The Return (-1, Offtopic)

Anonymous Coward | more than 11 years ago | (#5618710)

This time, Zend Engine takes on the Russians, and only one is going to walk out alive.

new mysql (2, Interesting)

minus_273 (174041) | more than 11 years ago | (#5618718)

just came out too. a decent combination of better features. My only wish: that there was an easier way to do subselects. I knwo almost every one uses the php+mysql+apache combination when doing stuff on linux. I also know that many others like me are really pissd off about the whole subselects thing. I for one have written my own functions to do similar things in php. I knowmany others who have as well. Im sure php developers could produce a standard way of doing it and make it faster.. oh well

Re:new mysql (5, Informative)

Christopher Cashell (2517) | more than 11 years ago | (#5618803)

I don't know that "almost everyone uses php+mysql+apache".

Personally, I much prefer php/perl+PostgreSQL+Apache. And I know I'm not the only one. Sometimes the most popular application isn't the best application (subject to your individual requirements, of course. . . but I've found PostgreSQL to be generally superior to MySQL for essentially all of my needs).

Oh, and subselects have been working great for me for years now. ;-)

Re:new mysql (0)

Anonymous Coward | more than 11 years ago | (#5619088)

Are there any (affordable) virtual hosting type companies that support PostgreSQL? I've looked, and only found really expensive ones, compared to the mysql ones.

Re:new mysql (1)

La Camiseta (59684) | more than 11 years ago | (#5618806)

I know that many of you don't like to use it, but last I heard, PostgreSQL supports subselects. And from my experience with it, it's extreamely fast and easy to set up and administer.

Re:new mysql (1)

FuzzzyLogik (592766) | more than 11 years ago | (#5618821)

personally i'm a big fan of postgresql... i tried it out because everyone uses mysql and those few who used postgresql always said it was better and they stood by it, which convinced me to try it... i haven't been disappointed by it yet. give it a shot and i believe it supports subselects... what do you have to lose? it's free too.

Re:new mysql (0)

Anonymous Coward | more than 11 years ago | (#5618967)

Face it, man, MySQL is still junk. Postgres is faster, more scalable, and more featureful.

/.'ed? (0, Offtopic)

da3dAlus (20553) | more than 11 years ago | (#5618719)

"This is what I get for running a server on pre-alpha software."

Well that, and having your website posted on slashdot. Of course it'll crash. Sorry, I'd RTFA if I could get to it...

Your're an ass, Michael (-1, Flamebait)

Anonymous Coward | more than 11 years ago | (#5618731)

getting-hacked-with-phpnuke-now-50%-easier

Michael, you're a fucking ass, and will always be a fucking ass. Should we talk about how Slashcode has been returning bogus error messages for the past two days? Or is that off limits because you're involved in it?

that thing was slashdotted with under 3 comments (-1, Offtopic)

Kunta Kinte (323399) | more than 11 years ago | (#5618733)

Serious, I checked.

Either most slashdot readers are now actually reading the articles before posting or that site is hosted on someones Zaurus.

Re:that thing was slashdotted with under 3 comment (0)

Anonymous Coward | more than 11 years ago | (#5618764)

No, it's running PHP5. That's the problem. Still very very alpha.

Re:that thing was slashdotted with under 3 comment (5, Funny)

Chester K (145560) | more than 11 years ago | (#5618864)

Either most slashdot readers are now actually reading the articles

It's a new feature of PHP5 ... Anticipatory Slashdotting.

Java? (0)

Anonymous Coward | more than 11 years ago | (#5618741)

True, true.. Why is no one coming up with real new features in programming languages? It's been a long time since there was anything truely innovative. We're essentially still using constructs that were dreamnt up for computers that had 1k RAM 1 KIPS back in the 60's. Surely with the available processing power we have today, we should be able to make languages far more expressive, easier and safer.

Re:Java? (2, Insightful)

prowley (587280) | more than 11 years ago | (#5618880)

The basis for programming languages is mathematics. Given that, we are doing quite well really. More expressive languages tend to have two downsides that faviour less expressive languages in many a case: 1) they tend to be slower than the same system written in a more traditional language, and no matter how fast processors get, there will always be incentive to squeeze the best performance out of them. 2) they tend to be less general purpose which limits their ability to become ubiquitous. If you have time to learn one language, would you pick a more specialised one which would limit what you could write, or a more general purpose one that allows more flexibility? Those are really the big drivers (or inhibitors) to language take up in my view. Scripting languages tend not to obey those rules but fill the "its either done using a script or it gets done manually" niche, so the performance comparison is different, but still there.

Java by any other name? (1)

PerlPunk (548551) | more than 11 years ago | (#5618744)

And next is a PHP-based J2EE compliant application server.

Not so odd as you would think (1)

SuperKendall (25149) | more than 11 years ago | (#5619081)

I was at a talk on JBoss, and they were saying there a "killer App" would be a PHP interpreter to run PHP inside JBoss so you could get things like real transaction and failover support...

Java by any other name... (-1, Troll)

Anonymous Coward | more than 11 years ago | (#5618745)

still reeks.

Debian packages avalible (-1, Troll)

Anonymous Coward | more than 11 years ago | (#5618756)

apt-get install php5 [debian.org]

DON'T CLICK ON THE PARENT!!! (1)

shadwwulf (145057) | more than 11 years ago | (#5619089)

The parent of this comment is a redirect to goatse.cx.

Just a word of warning! 8')

And, if you want it right now... (4, Interesting)

oGMo (379) | more than 11 years ago | (#5618774)

And, if you want it right now, instead of waiting for PHP5, go get Ruby today [ruby-lang.org] . It's got all of this, and many more neat features. I've recently been moving PHP over to Ruby, because PHP wouldn't scale to a large project (taking 4-5 seconds to load and generate a page on a hefty server, the codebase was only about a meg and a half of PHP), and because it was incessantly segfaulting for mysterious reasons. I've had no such problems since.

And ruby's a lot of fun... you can use it for tiny scripts, sites, or large projects.

Re:And, if you want it right now... (1)

Telastyn (206146) | more than 11 years ago | (#5618837)

[offtopic]

From the little I looked at Ruby a bout a year back it was something that seemed to fit in between PHP and perl in usage and in.... obfuscation. Is this a reasonable generalization?

Did you try acceleration? (0)

Anonymous Coward | more than 11 years ago | (#5618859)

PHP Accelerator [php-accelerator.co.uk] is really quite good, and is free. It compiles the code once, and then caches that for each load.

Re:And, if you want it right now... (1)

lscoughlin (71054) | more than 11 years ago | (#5618902)

And you might not be a troll, but then again, you say such trollish things.

Anyway, if it wouldn't scale with that little code and a "hefty server", then you did not write code with running.

I imagine someone else is writing you're ruby code for you as well and all your problems are gone because you're not creating them anymore.

Re:And, if you want it right now... (1)

antis0c (133550) | more than 11 years ago | (#5618903)

Specifics? I'm running a large internal PHP project, around 300 PHP files, about 2 megs of PHP code in total, and my page loads are fine, fractions of a second. The biggest bottleneck isn't PHP, but database queries in my project. So I'd like to hear about some specifics on what was causing problems.

Of course its not fair or valid to say "Well I had these problems 3 years ago so it still applies today"..

Re:And, if you want it right now... (4, Interesting)

oGMo (379) | more than 11 years ago | (#5619048)

Specifics are about the same. Little over 300 files total (only a small fraction of the complete system unfortunately), about 1.5 meg of code. This is not just a simple database interface, though. It's a complete persistant object system, widget framework, with object access controls, interface building, and the like. It makes development very fast, and lets me do things that would be very difficult with straight PHP (or anything else).

Unfortunately, when it came to building pages themselves, generating them from objects recursively was the final straw. The times really shot up, although they had been building for some time as the codesize and functionality increased.

With the new Ruby version, most of the processing, including building the pages, is moved to a backend server (written in Ruby), with a thin layer of CGI (in Ruby) that calls it. Loading the interpreter, parsing, calling the backend, processing, returning, and output is down to half a second on my old p2-350. And the capabilities are far beyond what the PHP version had (although, this was in part due to the fact it's a newer version, but some things PHP's object model would not have been able to handle, such as the integration of any given object, and adding syntax for class and method metadata).

Re:And, if you want it right now... (1)

MxTxL (307166) | more than 11 years ago | (#5618911)

and because it was incessantly segfaulting for mysterious reasons

Those reasons are undebugged code. No app just mysteriously segfaults (mystery isn't allowed in computers)... if the code was correct, it wouldn't segfault. Might be something minor... and you might have poured over it a million times, but somewhere you're code was still wrong.

Re:And, if you want it right now... (3, Informative)

oGMo (379) | more than 11 years ago | (#5618989)

Those reasons are undebugged code. No app just mysteriously segfaults (mystery isn't allowed in computers)... if the code was correct, it wouldn't segfault. Might be something minor... and you might have poured over it a million times, but somewhere you're code was still wrong.

You're wrong. No script should cause the interpreter to seg, period. If there's an error condition, it should be reported. A segfault is a bug in the interpreter, no matter how buggy my code is.

Also, you're doubly-wrong, because statement reordering would sometimes alleviate the problem. Also things like calling get_defined_classes() (or whatever it was called) would segfault on PPC, but not x86. (This was fixed recently.)

Re:And, if you want it right now... (1)

tcopeland (32225) | more than 11 years ago | (#5618925)

Yup, Ruby's pretty cool. This [ultralog.net] is all generated by Ruby... fun stuff!

Tom

Re:And, if you want it right now... (5, Insightful)

jasondlee (70657) | more than 11 years ago | (#5618959)

Doesn't scale? I guess someone had better tell Yahoo [com.com] .

jason

Re:And, if you want it right now... (1)

Cranx (456394) | more than 11 years ago | (#5619042)

Agreed, Ruby is fantastic. Classes/objects, exception handling, namespaces, introspection, oodles of libraries, iterators (these are SO addicting), etc. I've programmed in just about everything, and I can't say enough about this language. Pick up a Ruby book and give it a solid try...clean, fun, easy...can't beat it with a stick.

Re:And, if you want it right now... (1)

stonecypher (118140) | more than 11 years ago | (#5619065)

> because PHP wouldn't scale to a large project
> (taking 4-5 seconds to load and generate a page
> on a hefty server, the codebase was only about
> a meg and a half of PHP),

Sure it will. You just need to use the language well. PHP's got just as many secret places for inefficiency as C++ does.

That said, since I know you're gonna say "nuh-uh", just look at that Yahoo! just switched over to PHP. It scales. Your code just doesn't. Not the language's fault.

not java (0)

Suppafly (179830) | more than 11 years ago | (#5618777)

michael should just not post commentary to the stories that he posts, php is definately java by any other name.

Re:not java (1)

spencerogden (49254) | more than 11 years ago | (#5618853)

If you looked at the posted you'd realize the java comment was made by the submitter, not the editor.

Re:not java (1)

chrisseaton (573490) | more than 11 years ago | (#5618867)

"php is definately java by any other name"

I can't see how you think PHP is Java "by any other name" - the whole perspective is different. Java lives for objects - in PHP they're an afterthought.

Re:not java (2, Informative)

Phil.Roberts (540356) | more than 11 years ago | (#5618952)

An afterthought that they decided to base an entire re-write of the core PHP engine around....

Re:not java (0)

Anonymous Coward | more than 11 years ago | (#5619099)

It's the syntax that's important to me. Did they change all of that too, or is it as hacked on as Perl's OO?

Ruby's the best OO scripting language in wide use right now, IMHO.

Sterling Hughes' blog says (1)

TDScott (260197) | more than 11 years ago | (#5618778)

"this [the talk] is hosted on NYPHP's servers... and is running Apache 1.3.27 + PHP5. PHP5 leaks worse than the Titanic..."

And you linked to it from Slashdot and expected it to survive long enough so that any non-subscriber could click on it?!

not really (2, Interesting)

g4dget (579145) | more than 11 years ago | (#5618784)

Java has a static type system (compile-time type declarations). PHP5 presumably still has a purely dynamic type system (but the site isn't responding...).

We need good examples (3, Interesting)

phorm (591458) | more than 11 years ago | (#5618788)

Hopefully... PHP5 will either address some of the common mistakes (without becoming brainless) or at least have some good example out there.

If anyone has noticed... one of the major areas of death/slashdotting of sites apart from bandwidth are php URL's... and/or mySQL queries (often on PHP URL's). I've not yet noticed many Perl-run pages that have been slashdotted so successfully as PHP.

Now, I'm not sure if that's a faultof PHP itself, or that some of the "easier" features of PHP tend to attract less competent programmers and/or misconfigurations?

Re:We need good examples (2, Insightful)

stonecypher (118140) | more than 11 years ago | (#5619085)

> Now, I'm not sure if that's a faultof PHP
> itself, or that some of the "easier" features
> of PHP tend to attract less competent
> programmers and/or misconfigurations?

Arguably, it's most likely because PHP is built into Apache by default, so lots of people running a server out of their dorm room use it. PHP is the most likely scripting environment on small machines because, let's be frank, Tomcat is a huge pain in the ass to set up.

That said, like C++, PHP is a language which is very easy to put hidden ineffiencies into. So that may compliment the problem.

Java by any other name? (1)

FortKnox (169099) | more than 11 years ago | (#5618789)

I'm actually OFFENDED that you would compare PHP5 to Java. I don't want to start rambling off the difference (though I will mention EJB and taglibs, just to put something in the hat).
I'd rather ask the submitter if he'd like to truely argue why he thinks this new version of PHP is just like java.

Re:Java by any other name? (1)

Anonymous Coward | more than 11 years ago | (#5618843)

Like Java in that it is sharing more and more syntactical arrangements, and the object model is getting very Javalike. Not in the way that the language actually works.

Re:Java by any other name? (1)

FortKnox (169099) | more than 11 years ago | (#5618934)

Its about as similar to Java as Java is to C++. Would you say "C++ by any other name" about Java?

Re:Java by any other name? (1)

ToSeek (529348) | more than 11 years ago | (#5619027)

No, I just describe Java as "C++ for dummies."

Re:Java by any other name? (2, Funny)

FortKnox (169099) | more than 11 years ago | (#5619079)

Just to keep up the zealotous/elitist flames:
I describe C++ as "Assembly for dummies."

Different languages for different applications. I'd like to see you write an enterprise website in C++. Its best to not flame something so ignorantly.

Mmm... (-1)

lamz (60321) | more than 11 years ago | (#5618793)

...PHP

Java? Hardly. (3, Interesting)

Graelin (309958) | more than 11 years ago | (#5618818)

Java by any other name...

Leave it to a Perl guy to compare PHP to Java.

features in PHP5; highlights include the new object model, namespaces, interfaces, access control and exceptions.

Of course, Perl has had all this for some time.

Just curious, how can you have an object model without namespaces? Or interfaces for that matter? Isn't that like "New Car - with tires!"??

Either way, PHP makes for a good interface language for web apps - I guess. You can throw it on top of an application layer to do the real work. Last I checked, you could only use SOAP to do this - has anyone tested how well that performs? SOAP doesn't scale all that well.

It would be nice to let the HTML monkeys handle some of this stuff while the serious development can take place in a real language. /me dawns the flamesuit.

Re:Java? Hardly. (3, Funny)

Fammy2000 (612663) | more than 11 years ago | (#5618869)

Wait. You don't have to pay extra for tires? =)

I'm still trying to figure out why I had to pay extra for floor mats.

Re:Java? Hardly. (2, Insightful)

stonecypher (118140) | more than 11 years ago | (#5619103)

> Leave it to a Perl guy to compare PHP to Java.

Leave it to a Java guy to make asinine comments about practitioners of another langauge. Leave it to a C++ programmer (me) to compound the error.

> Of course, Perl has had all this for some time.

Yah, so have lots of languages. That makes it entering PHP no less exciting.

> Either way, PHP makes for a good interface
> language for web apps - I guess. You can throw
> it on top of an application layer to do the
> real work.

My, how casually dismissive. PHP scales far better than Perl does. Go talk to the yahoos at Yahoo!. (There are good arguments raging about PHP vs. Java in scalability, and so I won't start that here, as I don't want a bad argument to be my fault. Go read if you want to, but don't just assume that because you can't write scalable PHP it can't be done.)

Suexec-like support? (2, Interesting)

MasterSLATE (638125) | more than 11 years ago | (#5618832)

Does anyone know if this version will have better support for suexec-style permissions handling without using php as a perl module script thing? If I'm unclear, what I mean is will php commands like chown and chmod actually be functional on files not owned by the user apache runs as, based on the user who owns the site/scripts?

Re:Suexec-like support? (1)

ShotgunEd (621584) | more than 11 years ago | (#5618970)

PHP has a semi-equivalent functionality already built in. You can set the open_basedir directive. It limits a script's ability to perform file operations based on the directory set, or the working directory of the script. For example, if you set it to "." (meaning working directory), and script resides in /home/fred/html/, that script will only be able to mess with files in it's that directory and below. It's definitely not the same as SuExec, but it's a decent way of limiting the permissions of script based on who owns it - assuming, of course, that the script's path somehow reflects who owns/created it. More from the site [php.net]

Re:Suexec-like support? (1)

KillNateD (31007) | more than 11 years ago | (#5619067)


Uh, if it's running as a module in the webserver, you can't have it run with any permissions outside of the webserver's. Because it's running inside the same process.

You can use suexec w/ PHP if you run it in CGI mode because it's then running in a separate process that suexec can setuid to your user/group.

I work for a web hosting company and hate PHP mostly because most PHP developers are complete idiots.

LAMP ... what about JOLA (0)

Anonymous Coward | more than 11 years ago | (#5618835)

Ok...I know about LAMP. This is fine in the "web" community. What do /.'ers think of JOLA (Java Oracle Linux Apache) for the corporate environment.

Before the flames start, I have talked to a quite a few IT managers and they are very reluctant to try open source. Since Oracle and Java are mature, why not toss in only two open source solutions (Linux and Apache). Ease it in slowly. Then, when they don't expect it, hit them with mySQL or PostgreSQL and then PHP :)

Comments?

Re:LAMP ... what about JOLA (1)

winkydink (650484) | more than 11 years ago | (#5619013)

Given that the cover of the March 15th issue of CIO magazine [cio.com] is titled "Your Open Source Plan" [cio.com] , I'd have to say more IT managers are thinking about it than you are of. Worth a read, IMHO.

Re:LAMP ... what about JOLA (4, Informative)

MmmmAqua (613624) | more than 11 years ago | (#5619049)

Here's what I think...

I work for a company that uses both systems - LAMP for webservers, PJOLA (PHP/Java/Oracle/Linux/Apache) for the internal office/admin/order system, with some interesting interactions between the two systems.

For example, product data and changes originate in the internal system, get sent from Oracle to a MySQL master DB through an ODBC link, then the MySQL master propagates the changes down to the webservers, which are MySQL slaves. The flow of orders from MySQL to Oracle is less complicated, as each webserver transfers its orders directly to Oracle through an ODBC link.

These are just two of the interactions with external data involved in our system (data external to Oracle, that is). Here is why we don't use MySQL internally:

It's not ready for enterprise use. Flame me all you want, but that's the simple truth. Without subselects, built-in OLAP, a comprehensive data dictionary (which is crucial for system auditing), comprehensive tracing features (ditto), hot-standby failover support, clustered database support, and a dozen other things, MySQL is not suited to mission-critical environments.

It's fine for our webservers, where it is important to have a lightweight, fast database server, but not for the really important stuff; I can lose a webserver, no problem - there are several more I can redistribute the load to - but I absolutely cannot lose my office/order system. MySQL can't provide a reasonable guarantee of my data's integrity and security, so I'm not using it.

As for PostgreSQL - when we first started developing our system, we came down to two databases for the internal side: Oracle8i and PostgreSQL. We ended up choosing Oracle for performance reasons, and for clustered database support. PostgreSQL is a full-featured, stable, capable database, but it can't keep up with Oracle for speed or features. Example: Oracle9i's XMLDB - a huge boon to systems which do a lot of business-to-business (sorry, but I hate the B2B B2C, etc. crap) data interchange. Much of today's interchange is done in XML, and the ability to treat an XML file as just another table is a huge effort and timesaver. Oracle isn't the only database with XML support, but it is the only one I know of that allows you to join an XML file to an internal table for queries.

So, flame away, I'm wearing my asbestos underpants. But those are the facts as I see them.

url (0)

Anonymous Coward | more than 11 years ago | (#5618848)

Link doesn't seem to work.

Suggest you paste this into your browser's address bar.

http://talks.php.net/show/php5intro

Re:url (0)

Anonymous Coward | more than 11 years ago | (#5618889)

or click this [php.net]

OO idiot (-1, Troll)

MagPulse (316) | more than 11 years ago | (#5618858)

Maybe to a "programmer" who types code without thinking about those scary compilers, interpreters, and *gasp* actual hardware, PHP5 could be considered something in the same hemisphere as Java.

slashdot needs to start mirroring pages (-1, Offtopic)

Anonymous Coward | more than 11 years ago | (#5618863)

--instead of linking to them.

well mirroring as such may not be legal but how about a proxy.. if anybody objects to that they can make their webserver output the appropriate http headers to prevent caching.

i think.

Re:slashdot needs to start mirroring pages (0)

Anonymous Coward | more than 11 years ago | (#5618885)

Slashdot authors need to get a clue. Don't link to an obviously quoted pre-alpha server.

Re:slashdot needs to start mirroring pages (1)

colin_n (50370) | more than 11 years ago | (#5618938)

If slashdot mirrored pages that people want to see, then we might end up slashdotting slashdot. I only load up the page once and then link to all the articles. If you think that one article is approximately the same size as slashdot (possibly bigger if it has screenshots), and I do 4 click throughs per slashdot session. If you can assume that each user would require 5 times more bandwidth... then even slashdot might have a problem.

Who cares? (1, Troll)

insecuritiez (606865) | more than 11 years ago | (#5618897)

PHP 4 and previous versions taught most of us that if you run it even a 13-year-old script-kiddy can 0wn your site. New version, new features aside, PHP can't catch on much more than it has until more of the holes in it's implementation are patched. Would any of us buy a fancy car without locks? PHP is much the same, really nice to use but without security is it worth it?

Re:Who cares? (2, Interesting)

Lordrashmi (167121) | more than 11 years ago | (#5619016)

Are you a troll or would you care to point out all the security holes?

Not doing much to improve my opinion... (/.'ed) (3, Funny)

tweakt (325224) | more than 11 years ago | (#5618915)

The connection was refused when attempting to contact ny1.php.net

I tried to RTFA, and all I got was this lousy error message.

Nice and stable (5, Interesting)

Bob Bobbinson (574371) | more than 11 years ago | (#5618945)

From the blog :

PHP5 isn't ready

This is what I get for running a server on pre-alpha software.

Ok, so as many of you already know, I have my talk for NYPHP online. This talk is hosted on NYPHP's servers, and is running Apache 1.3.27 + PHP5.

PHP5 leaks worse than the titantic. With MaxRequestsPerChild at 100, apache children grew to 37MB (before we stopped counting). At MaxRequestsPerChild at 40, it was around 27mb. Finally, we've settled on a reasonable default 25 requests per child. MaxClients at 50.

This is a box that can easily handle 20 times this load. ugh.

PHP5 is pre-alpha. Don't think otherwise.

is PHP5 ZOPE? (1)

y2rayk (658441) | more than 11 years ago | (#5618956)

I know that zope is great for dynamic content. Is the new PHP better?

nice (1)

eille-la (600064) | more than 11 years ago | (#5618975)

i'll begin doing some php only when microsoft will have released Visual MSPHP. Thats it.

WORKING LINK (for now) (3, Informative)

Thoguth (203384) | more than 11 years ago | (#5618990)

http://talks.php.net/show/php5intro [php.net]

Not trying to karma-whore, I just thought I'd use my +1 for something good because nobody seemed to notice the AC link.

Re:WORKING LINK (for now) (0)

Anonymous Coward | more than 11 years ago | (#5619102)

I like the namespace examples (php parsing errors).

If it doesn't work - why use it in a presentation?

Page Mirroring (0, Offtopic)

SudoPenguin (247989) | more than 11 years ago | (#5619008)

This slashdotting is getting a little out of hand. Why doesn't slashdot actually start making articles out of these news items instead of links to other sites where no one can read the news.

Re:Page Mirroring (0)

Anonymous Coward | more than 11 years ago | (#5619032)

umm..

because that would be too much like working for subscription and ad revenue.

500 Internal Server Error (1)

Lxy (80823) | more than 11 years ago | (#5619036)

Did Slashdot just attempt an upgrade to PHP 5?

PHP5 strikes back (0)

Anonymous Coward | more than 11 years ago | (#5619038)

Internal Server Error
Apache/1.3.26 Server at slashdot.org Port 80

PHP5 wishlist (2, Interesting)

Kunta Kinte (323399) | more than 11 years ago | (#5619040)

1 - Better variable scoping features. I'd like to be able to say something like...

session
{
$SessionVar1 = 1;
$SessionVar2 = y;
}
where 'session' is a keyword that executes a block of code or variable declarations in session scope, and have those variables persist throughout the session. Same for application scope, that is variables in that scope persist for the entire life of the PHP engine, and available in all scripts. ( was that the ACLs they were refering to? in the story summary? )

2 - Built in Opcode caching [turcksoft.com] .

3 - More consistant library function naming.

4 - Support for 'taglibs'. The same functionality can be done using functions, well sort of. But this is very usefull when separating the work between web programmers and non-technical designers/maintainers.

That's my list...

But yeah, you're right, I should shut-up and code them or stop complaining.

PHP Is *not* an application server (5, Informative)

tweakt (325224) | more than 11 years ago | (#5619043)

In PHP, all you have are scripts. Sure they may be optimized, compiled, pseudo-object-oriented and even obfuscated... but they are still scripts. They may even include eachother. But they are still *SCRIPTS*.

After executing, they forget all knowledge. There is no persistence, no threading, no transactional support. All attempts to improve efficiency are afterthoughts and hacks.

At one point I tried to implement in-memory "application" wide shared data. The concept is, something may need to be loaded when the site is first loaded, and then it should be kept in RAM, and we need exactly ONE instance of it.

I gave up... using shared memory was too tricky and isn't even platform independent. It's not part of the core language, and even if it worked, it would not turn PHP into an application. It still runs in a modular fashion.

Now with a Java servlet, you have an application that is running. Within your servlet you may define some data exist indepently of web requests. Servicing a request is just one aspect of it. Its much more like a real program, which is why it're referred to as an Application Server.

For very simple things, that don't need to scale, both in usage, and codebase, then PHP is ok. But for design real web applications, which need to be managed by more than a few developers, integrate with legacy systems, implement a full three tier architecure, etc, PHP just doesn't cut it.

A lot of the bad sites which go down easily when /.'d are simply bad coding. Making 16 database accesses per page is not bad when just a few people visit at once, but when the stampede comes, your toast. Most people don't develop with that in mind.

Java has some serious strengths in the Web department, it's proven technology, and is not very complicated at all. It's just that most people aren't used to writing structured code. JAva forces you to follow somewhat good practices and the extra work pays off in maintainability. PHP and Perl you can just hack away, without any strong typing, etc and get something done very quickly but in the end it will become a mess quite fast.

I'm not saying Java will solve your problems, but there is a strong base of best practices, design patterns and example code to help you keep your code in nice shape.

With PHP, it seems like everyone has their own code libraries, utility scripts, ways of coding, etc and its really tough to resuse someone elses code. Java Interfaces and Inheritence comes in very handy.

Ok... enough ranting. Anyway, I used to be a hardcore PHP supported because you could whip together things very easy, but as I learned more java and needed to do larger projects and learned more about efficient coding, I realized with PHP you will eventually just run into a wall and that's when it's time to look for better solutions.

PHP Sucks (-1, Troll)

bellings (137948) | more than 11 years ago | (#5619054)

PHP is crap. It's essentially just like ASP, except unlike ASP you're:
  • locked into a language worse than VBScript,
  • locked into an extension model worse than ActiveX,
  • have a database interface a billion times worse than ADO (for example, the standard PHP MySQL interface has no paramatarized queries!!! Who's the supergenius who thought that up?), and
  • lack almost all the functions, procedures, methods, or objects that would make web programming useful.
For a few glaring examples where PHP doesn't give you even the most basic requirements for first-generation web language, there's no equivilant to ASP's Response.Redirect(). There's no equivilant to ASP's Server.MapPath(). The handling of forms with multiple fields of the same name (like checkboxes) is so hideously broken I don't know if I should laugh or cry.

I want to avoid saying that most PHP sites are amazingly insecure. Certainly, this must be a function of the pathetic losers who use PHP, instead of some function of the language. But after spending even a week on BugTraq, one begins to wonder exactly what most PHP developers are smoking when they write sites.

In short, I think PHP sucks. It's little suprise to me that the editors on this site find it so endearing.

Re:PHP Sucks (1)

bellings (137948) | more than 11 years ago | (#5619106)

I that PHP might possibly be the only web scripting toolbox on earth worse than ASP, and it gets marked as flamebait. I suppose it deserves it -- ASP is amazingly ugly. Comparing anything to ASP is pretty damned hostile.

But, lets be frank here. PHP really amazingly shitty.

Java??? (0, Flamebait)

BurKaZoiD (611246) | more than 11 years ago | (#5619082)

Java by any other name...

What's this Java you speak of? Oh! Yes, I think I will have a cup; two sugars, no milk, please.
Load More Comments
Slashdot Login

Need an Account?

Forgot your password?

Submission Text Formatting Tips

We support a small subset of HTML, namely these tags:

  • b
  • i
  • p
  • br
  • a
  • ol
  • ul
  • li
  • dl
  • dt
  • dd
  • em
  • strong
  • tt
  • blockquote
  • div
  • quote
  • ecode

"ecode" can be used for code snippets, for example:

<ecode>    while(1) { do_something(); } </ecode>