Slashdot Mirror


PHP 5 Beta 1

Sterling Hughes writes "The PHP development community is proud to announce the release of PHP 5 Beta 1. Downloads are available in both source and binary form (for Windows users). A full list of changes is available in the ChangeLog. Some of the new features include much improved OO support, completely revamped XML support, and the default inclusion of SQLite."

398 comments

  1. Windows Users by Anonymous Coward · · Score: 0, Funny

    I love the slightly condescending (in binary form) for Windows users ! Says it all really.

    1. Re:Windows Users by hhnerkopfabbeisser · · Score: 4, Insightful

      The sources can be compiled under Windows and most Unices.

      But since Windows doesn't come with a compiler, there is a binary provided for Windows.

      So what's your point?

    2. Re:Windows Users by Anonymous Coward · · Score: 0

      Too bad mysql support isn't compiled in now. So it is more or less NOT free to use php+mysql on windows. Since you have to by visual studio to recompile php under windows. Great.

    3. Re:Windows Users by carpe_noctem · · Score: 1

      the point is that windows users can't build their own binaries, so they need other people to make them.

      --
      "Quoting famous computer scientists out of context is the root of all evil (or at least most of it) in programming." - K
    4. Re:Windows Users by Anonymous Coward · · Score: 0

      Cos building binaries is so much fun.

    5. Re:Windows Users by hhnerkopfabbeisser · · Score: 1

      Maybe it's just me, but I don't see how that is condescending. It's just practical.
      Under Linux, it's practical to leave compiling to distributors or users.

      I mean, look at how condescending Redhat and Debian are, with all those compiled packages they give you...

    6. Re:Windows Users by Tony-A · · Score: 2, Funny

      So what's your point?
      "But since Windows doesn't come with a compiler,"

      Looks kinda crippled there, wouldn't you say?

    7. Re:Windows Users by larry+bagina · · Score: 1

      it does say it all. The Windows binary runs under Win32. Do you think they can offer a single *nix that runs under all *nix OS on all platforms? Do you think they can even offer a Linux-only, x86-only binary that will install and run on all x86 linux boxes?

      --
      Do you even lift?

      These aren't the 'roids you're looking for.

    8. Re:Windows Users by Richard_at_work · · Score: 3, Insightful

      Not at all. Windows comes on one architecture, so binaries are perfectly acceptable as the default install medium. THere are compatable compilers that you can source if you want. Linux/BSD/Unix needs the default install medium to be sourcecode precisely because of the number of architectures that they run on. Elementary when you think about it, windows simply doesnt need sourcecode by default, yet its available if you really want it.

    9. Re:Windows Users by pompousjerk · · Score: 2, Informative

      Yeah, and I got PHP5b1 up and running in about 10 minutes. No time spent compiling. ;)

      Nothing works! At least, nothing using PHP4's OO features. And I used a lot of PHP4's OO features!

      I'm going to spend the rest of the day tearing out my hair. Especially because I'll have to rewrite 1000+ lines of PHP code....

    10. Re:Windows Users by Goldberg's+Pants · · Score: 1

      Nobody forced you to upgrade.

    11. Re:Windows Users by Anonymous Coward · · Score: 0

      >> Windows doesn't come with a compiler
      >Looks kinda crippled there

      Actually, Microsoft gives away their compiler. Download the Windows SDK from MSDN.

      This was a key marketing point for them when they were battling OS/2 (which didn't have a free compiler).

    12. Re:Windows Users by pompousjerk · · Score: 1

      I was just joking.

      Besides, I just rewrote two of my modules. And so far, I can tell you that PHP5 is teh spiff.

    13. Re:Windows Users by samrolken · · Score: 1

      True. I think it wasn't condescending for both your practical reason, and because of standards. The standard way to distribute software on UNIX with GNU toolchain is as a tgz source file, which is ./configure, make, make install --'d. The standard way to distribute software for Windows is as binary files. So the la de da what?

      --
      samrolken
    14. Re:Windows Users by You're+All+Wrong · · Score: 1

      "Windows comes on one architecture"

      I have NT 4.0 for Dec Alpha. Not that I ever boot into it. Not that I ever reboot.

      NT4 was supported on something like 5 architectures (Alpha, x86, MIPS, PPC, erm dunno). However apps were always distributed in binary form. It's _nothing_ to do with the CPU architecture, it's to do with the windows mentality. Or at least the first 6 letters of it.

      YAW.

      --
      Your head of state is a corrupt weasel, I hope you're happy.
    15. Re:Windows Users by Goldberg's+Pants · · Score: 1

      This is what happens when I read Slashdot on 3 hours sleep:)

    16. Re:Windows Users by jeremyp · · Score: 1

      The SDK is not the compiler.

      --
      All I want is a secure system where it's easy to do anything I want. Is that too much to ask ~~ Randall Munroe
  2. They pulled MySQL out! by baptiste · · Score: 5, Interesting
    Check this:
    Due to issues surrounding the MySQL 4.0 license, the MySQL are no longer bundled with PHP. For more information on these licensing changes, please refer to the MySQL Licensing Policy.
    Wow - that's not a smart move. I guess this is a GPL (MySQL) vs Apache (PHP) license issue? Anyone have more details?
    1. Re:They pulled MySQL out! by CausticWindow · · Score: 5, Informative

      Check this thread on Google groups.

      --
      How small a thought it takes to fill a whole life
    2. Re:They pulled MySQL out! by Triumph+The+Insult+C · · Score: 3, Informative

      what's so difficult about using your own mysql installation? this refers to the bundled libraries. aside from changes mysql has made to 4.1, this is a non-issue.

      maybe this will get them to included a bundled version of postgres

      --
      vodka, straight up, thank you!
    3. Re:They pulled MySQL out! by baptiste · · Score: 4, Insightful

      Ah - well man they need to be clearer about it - the phrase makes it sound like they pulled out MySQL support. The Changelog mentions the library - but even it is really brief. I always thought PHP used your local libraries anyway - I didn't realize it came with them in 4.x

    4. Re:They pulled MySQL out! by Ark42 · · Score: 2, Interesting


      The thread mentions somebody at mysql is working on a exception to their license to all PHP to continue to bundle the mysql library extension or whatever. I would hope it gets resolved by the final PHP5 and even if not, most distros like Redhat will probably have the RPMs set so this isnt an issue anyways.

    5. Re:They pulled MySQL out! by thinkninja · · Score: 1

      Makes me glad I just switched to Postgresql 7.3.x :}

      --
      "The number of Unix installations has grown to ten, with more expected." (Unix Programmer's Manual, 2nd ed.; june 1972)
    6. Re:They pulled MySQL out! by BigBadBri · · Score: 0, Offtopic
      Old ladies and gin are sooo much more fun.

      --
      oh brave new world, that has such people in it!
    7. Re:They pulled MySQL out! by Matty_ · · Score: 2, Informative

      I am pretty sure that PHP 4 comes with a MySQL client library, and it is enabled by default during 'configure'.

      In FreeBSD Ports, it compiled the MySQL client package and uses it instead.

    8. Re:They pulled MySQL out! by Tablizer · · Score: 0, Offtopic

      Old ladies and gin are sooo much more fun

      But you must drink the gin *first*, lots of it.

    9. Re:They pulled MySQL out! by Xformer · · Score: 1

      It comes with bundled versions of a few libraries. One of these (that was most useful to me) was the GD library. The official one won't have any GIF support until next year (in relation to that bloody patent that hasn't expired everywhere yet), but the one bundled with PHP does have read-only GIF support (which is apparently still legal, patent or no).

      --
      All I want is a kind word, a warm bed and unlimited power.
    10. Re:They pulled MySQL out! by BigBadBri · · Score: 1
      no - old ladies drink gin so much more stylishly than young girls.

      Show me a woman over 40, and a bottle of gin, and I'll show you a full English breakfast (even if you have to fsck for it).

      --
      oh brave new world, that has such people in it!
    11. Re:They pulled MySQL out! by PizzaFace · · Score: 1

      This is a big deal, but (1) it appears to be an effort to light a fire under MySQL's licensing staff and (2) losing built-in MySQL support would not be all bad. It might cause PHP developers to give a little thought to their websites' back ends. This little SQLite database that is going into PHP 5 actually looks pretty neat. If a developer needs a more powerful back end, let him evaluate MySQL along with other alternatives. MySQL is increasingly profit-driven, while SQLite is good old-fashioned public domain open source, and deserves to be PHP's default database.

    12. Re:They pulled MySQL out! by oohp · · Score: 1

      Great work MySQL AB! Now everybody will use Postgres instead. What about Perl? Is the MySQL Perl module comp[romised by licensing issues as well?

  3. Improved OO! by Anonymous Coward · · Score: 4, Funny

    That's right, now you can say class { @P=split//,".URRUU\c8R";@d=split//,"\nrekcah xinU / lreP rehtona tsuJ";sub p{
    @p{"r$p","u$p"}=(P,P);pipe"r$p","u$p";++$p;($q *=2) +=$f=!fork;map{$P=$P[$f^ord
    ($p{$_})&6];$p{$_}=/ ^$P/ix?$P:close$_}keys%p}p;p;p;p;p;map{$p{$_}=~/^[ P.]/&&
    close$_}%p;wait until$?;map{/^r/&&<$_>}%p;$_=$d[$q];slee p rand(2)if/\S/;print }

    1. Re:Improved OO! by Anonymous Coward · · Score: 0

      finally!

    2. Re:Improved OO! by Anonymous Coward · · Score: 0

      this is about php, not perl ...

    3. Re:Improved OO! by chill · · Score: 1

      What does this have to do with Open Office?

      --
      Learning HOW to think is more important than learning WHAT to think.
  4. Turning into Java? by alannon · · Score: 5, Interesting

    Take a look at the OO changes page. The syntax seems to be converging with Java. I find this amusing in some ways.

    1. Re:Turning into Java? by bsharitt · · Score: 1

      Or closer to python since it is still as scripting language.

    2. Re:Turning into Java? by essdodson · · Score: 1

      That's definitely the feeling I got when reviewing their document on the new OO stuff and the Zend2 engine.

      final, etc.

      --
      scott
    3. Re:Turning into Java? by hhnerkopfabbeisser · · Score: 2, Interesting

      No offence meant, but even if PHP's OO-support will be perfected at some point in the future, it would rather be a Smalltalk-clone (or python or ruby or whatever) than a Java-clone, which makes a hell of a difference.

    4. Re:Turning into Java? by mr_klaw · · Score: 1

      Did you even look at the changes page? The semantics and syntax are moving more towards what Java uses, and whether the language itself is compiled or interpreted or a terrible combination of the two is incidental. That it's considered a "scripting" language makes no difference in how it handles visibility, interfaces, or any of the other things they are adding which python and ruby both lack.

    5. Re:Turning into Java? by justMichael · · Score: 2, Interesting

      Personally I'm glad to see it. I'm tired of having to create a new object just to call one of it's methods (see Dereferencing). Not to mention not being able to throw/catch Exceptions.

    6. Re:Turning into Java? by Otterley · · Score: 1

      Yeah, except that Python has no support for abstract classes or interfaces. It looks like they're more interested in mixins (which are not the same thing!) instead.

    7. Re:Turning into Java? by poptones · · Score: 0, Flamebait
      PHP still has this->absurdly ugly syntax. It's a pain in the ass to type, and it's an eyesore.

      fuck PHP.

    8. Re:Turning into Java? by DragonMagic · · Score: 1

      If only they could keep PHP-GTK updated to reflect a better desktop programming language like Java?

      --

      Human nature is the same everywhere; the modes only are different. -- Earl of Chesterfield
    9. Re:Turning into Java? by Tablizer · · Score: 1

      Nowhere to run, no place to hide, aaaaaahhhh!

    10. Re:Turning into Java? by JamesOfTheDesert · · Score: 1
      That it's considered a "scripting" language makes no difference in how it handles visibility, interfaces, or any of the other things they are adding which python and ruby both lack.

      Um, I can't speak about Python, but I didn't see anyhting on that PHP OO page that you can't already do in Ruby.

      For what it's worth, interfaces are useful in statically typed languages such as Java, but there is no need for them in Ruby.

      In any case it's an apples and oranges comparison. PHP and Ruby encourage different programming mindsets, so harping on particlar features misses the forest for the trees.

      --

      Java is the blue pill
      Choose the red pill
    11. Re:Turning into Java? by Anonymous Coward · · Score: 0

      Their idea of what "protected" means seems more in line with C++ than Java...their example showed a subclass accessing the protected variable rather than a class from the same package.

    12. Re:Turning into Java? by Anonymous Coward · · Score: 0

      there are many interface packages available
      in python and unlike PHP you dont have to
      alter the language to actually implement them.

    13. Re:Turning into Java? by pnatural · · Score: 2, Insightful
      Python has abstract classes:
      class Foo:
      pass

      class Bar(Foo):
      pass

      assert isinstance(Bar(), Foo)
      Interfaces aren't an issue, either. Sun(tm) Java(R) has the notion of interface to get around a language flaw -- lack of multiple inheritance. Python has MI and thus doesn't need interfaces.
    14. Re:Turning into Java? by pacman+on+prozac · · Score: 1

      You don't have to do that in the existing php.

      Just call the method like this:

      require_once("class.php");
      class::method("arg1" );

      instead of class->method("arg1").

    15. Re:Turning into Java? by Azghoul · · Score: 1

      I don't think you can fairly call it a "language flaw" when they designed it without multiple inheritence for a reason. It's not like they finished it all up and said, "Oh crap! We forgot multiple inheritence!"

    16. Re:Turning into Java? by Jerf · · Score: 1

      I don't think you can fairly call it a "language flaw" when they designed it without multiple inheritence for a reason.

      Misfeature, then.

      By hacker standards, anyhow. But Java is a B&D language that no real hacker would prefer over other non-B&D languages. (Which isn't to say some of us don't get suckered into it, often while at work, but we'd rather be doing something else.)

      I am still mystified at the academic community's love of Java.

    17. Re:Turning into Java? by Stu+Charlton · · Score: 1

      But Java is a B&D language that no real hacker would prefer ...

      probably has something to do with:

      I am still mystified at the academic community's love of Java.

      Which strikes me as either a misunderstanding or just plain hubris, I'm not quite sure yet. Don't you think some academics like Doug Lea are "tr00 hackers", given the tremendous contributions they've made to both the science & industry (i.e. Doug's concurrency libraries)?

      There's a lot to like about Java. It's not the most innovative language in the world, but in many ways, it was innovative enough for the time and purpose: a portable, garbage collected, object oriented language to replace the dominant lanugage at the time, C++, which was/is a mess.

      --
      -Stu
    18. Re:Turning into Java? by ivar · · Score: 1

      It's true they're merging. Zend and Sun have a deal going on to make PHP and Java play nice..

      Check out the actual JSR:
      http://jcp.org/en/jsr/detail?id=223
      or an article written about it:
      http://www.iapplianceweb.com/story/OEG2003061 2S005 9

    19. Re:Turning into Java? by justMichael · · Score: 1
      Just call the method like this:

      require_once("class.php");
      class::method("arg1" );

      instead of class->method("arg1").

      How does that help me do something like this?

      $cust = new Customer($db, $id);
      $city = $cust->getAddress()->getCity();

      Your approach is only going to call a function on an empty object. I want to be able to get to an Object within an Object. Unless I am missing something.

    20. Re:Turning into Java? by pacman+on+prozac · · Score: 1

      It helps you do exactly what you asked.

      I'm tired of having to create a new object just to call one of it's methods

      Then use object::method.

      If you want to use this to call an un-instanced classes method from within an object then use:

      object1->object2::method();

      Although this wasn't what you origonally asked, and this is all clearly explained on the OO sections of the manual.

      Come on people rtfm its not just there for eye candy.

    21. Re:Turning into Java? by Jerf · · Score: 1

      No, I understand all that.

      The wierd thing is so many things the academics want to do involve actively fighting Java in a way that you don't have to actively fight other languages. How many projects involve actively twiddling with Java byte codes? It's much easier to work at the compiler level; twiddling byte codes is a horrible way to do it.

      It's not that it's a "bad" language, it's that it is B&D, and actively fights attempts to change it. I don't understand why you'd want to twiddle with Java bytecodes when you could instead work on a language where you have access to the whole thing, from source to compiled code/interpreter.

      In other words, what it really boils down to is that Java is propreitary and protected, more then the language itself; goodness knows I'd never want to try to "improve" it in such a hostile environment. (Java is a BigCo playground.)

    22. Re:Turning into Java? by Otterley · · Score: 1

      Huh? That's not an abstract class. Using your example, without a mechanism to declare class Foo abstract, the language happily let me instantiate all the Foos I want.

    23. Re:Turning into Java? by pnatural · · Score: 1
      Oh, I'm sorry:
      class Foo:
      def __init__(self):
      raise NotImplementedError("This is an abstract class")
      There, the class cannot have direct instances. Does that fit your narrow, Java-centric view of programming?
  5. mysql? by codegoat · · Score: 0, Redundant
    "Due to issues surrounding the MySQL 4.0 license, the MySQL are no longer bundled with PHP. For more information on these licensing changes, please refer to the MySQL Licensing Policy."
    I am going to assume this will be addressed and fixed by the time php5 releases... But that is rediculous. Does anybody know how to add the support for mysql?
    1. Re:mysql? by Anonymous Coward · · Score: 0

      Reinstall php4 :-)

    2. Re:mysql? by Triumph+The+Insult+C · · Score: 5, Informative

      --with-mysql=/path/to/mysql

      bundled being the key word

      --
      vodka, straight up, thank you!
    3. Re:mysql? by jmaatta · · Score: 1

      MySQL isn't bundled with it, but you can easily add it yourself when compiling. You probably just need to get MySQL source or install mysql-dev package and invoke the configure script with --with-mysql=/foo/bar/mysql

    4. Re:mysql? by codegoat · · Score: 0

      yeah, I have both php4 and 5 running... just to see how 5 is ;) .php5

  6. Problems with newer versions by Sanity · · Score: 4, Insightful
    I recently developed a number of sites in PHP and ran into serious problems when it became clear that most hosting providers use older versions of PHP, and are scared to death to upgrade lest they screw things up for their existing users.

    The PHP people need to provide ways that people can upgrade the versions of PHP on their system such that they can be reasonably sure that existing users aren't suddenly going to find their sites don't work.

    1. Re:Problems with newer versions by CausticWindow · · Score: 2, Insightful

      There's no problem running different versions of php on the same webserver. We're running php 3 and php 4 here, without any problems.

      --
      How small a thought it takes to fill a whole life
    2. Re:Problems with newer versions by larry+bagina · · Score: 5, Informative
      I agree. Even though there are huge differences between version 3 and version 4 (and now version 5), there are also lots of differences between minor versions -- stuff like new functions, changes to how functions work (beyond just bug fixes), etc. Nevermind that there are hundreds of optional libraries and setup parameters, making every installation unique.

      If you're doing a non-trivial php site, and trying to make it work with different versions of php (osCommerce, for example), you end up having to rewrite many functions yourself to make sure they work consistently.

      I like PHP, but it suffers from an "incrementalism" design approach. Some stuff really needs to be rethought, and I think PHP 5 is on the right track to doing that.

      --
      Do you even lift?

      These aren't the 'roids you're looking for.

    3. Re:Problems with newer versions by Sanity · · Score: 1
      There's no problem running different versions of php on the same webserver. We're running php 3 and php 4 here, without any problems.
      The issues I encountered were with two different versions of php 4.
    4. Re:Problems with newer versions by The-Pheon · · Score: 1

      On a shared server where php is compiled as mod_php all users would share the same version. The solution is to also compile different versions of php as a cgi, then it is up to the user to choose which version to use.

      php422.cgi php433RC1.cgi php500B.cgi

      you get the idea :)

    5. Re:Problems with newer versions by Sanity · · Score: 4, Insightful
      If you're doing a non-trivial php site, and trying to make it work with different versions of php (osCommerce, for example), you end up having to rewrite many functions yourself to make sure they work consistently.
      Absolutely, this is exactly the experience I had.
      I like PHP, but it suffers from an "incrementalism" design approach. Some stuff really needs to be rethought, and I think PHP 5 is on the right track to doing that.
      I hope you are right, but right now I am more concerned about how to deal with differences between different PHP4 versions - it is immensely frustrating to inadvertantly use a function only to discover that it doesn't exist on your new ISPs version of PHP (and of-course they won't upgrade for love nor money lest they upset their other users).

      Someone involved in PHP needs to take a cold hard look at this issue and figure out how to tackle it head-on, or they will find that with each new version, people take longer and longer to take advantage of new features which will cause PHP to stagnate.

      With Java, at least I know for a fact that some Java 1.1 code will work with Java 1.4 and as a result most ISPs keep their Java versions quite up-to-date.

      Until the PHP team treat lack of backward compatability as a bug, this problem will persist.

    6. Re:Problems with newer versions by Motherfucking+Shit · · Score: 4, Interesting
      The PHP people need to provide ways that people can upgrade the versions of PHP on their system such that they can be reasonably sure that existing users aren't suddenly going to find their sites don't work.
      The only major compatibility issue that I can think of between, say, the 4.1 branch and the 4.3 branch is that register_globals defaults to 'Off' in newer versions. If you leave it that way after installing, then yes, a lot of older scripts will break. Most of the shared/virtual hosting providers I've had to do script installs on, which have actually upgraded their PHP versions, just installed 4.2x or 4.3x and then manually turned register_globals back to 'On' in the php.ini file.

      To the best of my recollection, there isn't much else that's not backwards-compatible. Even where functions have been renamed (e.g. socket_get_status), the old function names still work, and while deprecated, they don't seem to be going anywhere soon. I have no trouble digging up stuff I wrote back in '99 or 2000 and getting it to work under PHP 4.3; though I do have to enable register_globals in those cases.

      Only problem I ever ran into with PHP where stuff quit working after an upgrade was on a test Apache2 server. It turned out to be a bug related to posted form data. I wouldn't use Apache2/PHP on a production server yet anyway, though; and 1.3.27 still gets the job done. I haven't had time to play with PHP5 yet, so I'm not sure what the differences are in that version.

      I agree at the surprising number of hosts who simply haven't updated, though. There are a lot of hosts still running 4.1x, and even (yikes) 4.06, who just won't upgrade for whatever reason. I do most of my coding these days on 4.2 or 4.3, and have run into plenty of belligerent hosts who refuse to upgrade from a two-year-old release. Typically I just have my clients move to a better host; the providers who don't stay reasonably with the times will eventually figure out that it's hurting their bottom line.
      --
      "BSD: Free as in speech. Linux: Free as in beer. Windows 10: Free as in herpes." --Man On Pink Corner in #52607549.
    7. Re:Problems with newer versions by larry+bagina · · Score: 1
      With Java, at least I know for a fact that some Java 1.1 code will work with Java 1.4 and as a result most ISPs keep their Java versions quite up-to-date.

      I had the opposite experience on the client side... I was using a Java 1.4 Random method that wasn't available in Java 1.1. When I tested in JBuilder, it ran fine. When I tested in IE, it used MS's old Java classes, and didn't work. Thanks Microsoft. That's really innovative.

      --
      Do you even lift?

      These aren't the 'roids you're looking for.

    8. Re:Problems with newer versions by Billly+Gates · · Score: 2, Informative
      One of the reasons to use PHP or ASP over CGI is speed.

      Both PHP and ASP are compiled and linked directly to the webserver daemon. CGI uses an interface and the engine is not loaded directly with the web server. This makes it alot slower and you lose all the benefits of what php has to offer.

    9. Re:Problems with newer versions by Anonymous Coward · · Score: 0

      Use netacore - they always use the latest, most stable version of PHP, and give fair warning to their clientele before they upgrade the servers. Freakin' excellent hosting plan. :)

    10. Re:Problems with newer versions by Sanity · · Score: 1
      To the best of my recollection, there isn't much else that's not backwards-compatible
      To an ISP fearful of bringing his customer's websites down, that kind of assurance is simply useless. He needs a guarantee of backward compability before he is going to upgrade PHP - and the PHP development team simply don't provide anything close.
    11. Re:Problems with newer versions by VertigoAce · · Score: 1

      Seeing as Microsoft is not allowed to update their version of Java, it's not surprising that it would be out of date (technically, they have to stop by 2004, but since they can't even provide security fixes after that, they've been phasing it out for a while). That's why they no longer distribute a Java VM with the OS. If you need it they tell you to download it from someone else.

    12. Re:Problems with newer versions by Tablizer · · Score: 1

      It would be nice if hosting providers let their customers decide. Keep the old versions on the server and let customers select version via their admin options. Same with register_global.

    13. Re:Problems with newer versions by FuzzyBad-Mofo · · Score: 1

      Mod Perl

    14. Re:Problems with newer versions by Guido+von+Guido · · Score: 1
      I think part of the problem is that compiling PHP with all the appropriate options can get pretty complex. For instance, a certain smallish ISP I know well whose name I will not mention used front page extensions and a bunch of other packages which were used by their clients. It apparently was hellishly difficult to upgrade apache and PHP and and front page extensions and get all this other software to work at the same time.

      I ran into this myself, sort of. I have a user interface written in PHP on Solaris, which has been a real pain in the neck to recompile when I've needed to upgrade PHP. Using modules instead of a statically compiled apache would probably have been helpful, but then I couldn't get this commercial package to work with apache...

      I have since become disenchanted with PHP for anything but the smallest projects so I'm not going to worry about it too much. I will probably take another look at PHP 5, though.

    15. Re:Problems with newer versions by OzRoy · · Score: 1

      Actually they have done other things.

      They removed uploaded files from the $_REQUEST array. They only exist in the $_FILES array. I woudn't mind this so much except they just decided to do it. No deprecation or anything. It just disapeared one day. Took me Hours to work out why my scripts weren't working with the new version of PHP.

      When I filed a bug report asking for them to put it back in they told me they "removed it for a reason" but they never provided the reason other than to say "$_REQUEST was 'sort of' broken"

      Maybe next time they should "sort of" fix it, instead of just "sort of" removing it.

    16. Re:Problems with newer versions by ananke · · Score: 1

      This is one odd problem that I have encountered, after upgrading from php 4.2.x to 4.3.x: 4.2 series would NOT complain if there were duplicate definitions of functions in the same file. I would have never noticed that we were using badly written code [or rather, it was somebody's oversight, not to remove the duplicates]. Of course, things went to hell, after php 4.3 didn't want to load files that contained duplicate functions. I was really surprised that php 4.2.x never picked up on that.

      --
      --- d'oh
    17. Re:Problems with newer versions by kris · · Score: 1

      The PHP people need to provide ways that people can upgrade the versions of PHP on their system such that they can be reasonably sure that existing users aren't suddenly going to find their sites don't work.

      Actually, there is only one big break in the PHP line, and that is the change with register_globals. You are right that this change should have happened during the 3.x to 4.0 transition, but the powers that be were to frightened to do it then, because it would have broken quite a lot of existing code.

      The same powers that be were then forced to do this change, and during a "dot x" version number change because of the large number of security issues that many popular PHP scripts generated. These scripts often contained code along the lines of

      if (something security relevant)
      $flag = true;

      if ($flag)
      do_the_scary_stuff();

      and with PHP importing request parameters as globals automatically, it is very obvious why this is security relevant. The register_globals fix and the introduction of the $_GET and friends superglobals fixed that, but admittedly at an awkward time.

      The big hope is that PHP 5 will be an incentive for providers and hosters to upgrade their installations, and it will reunite the different streams of PHP development again.

      Anyway, if you are doing something important with PHP, you'll hopefull be on a rootserver yourself, and completly control your deployment environment yourself (Rootserver in germany -> less than EUR50 per month).

      Kristian

    18. Re:Problems with newer versions by Malcontent · · Score: 1

      They are not allowed to upgrade their version of java but nothing is preventing them from including a newer JVM from Sun or IBM.

      --

      War is necrophilia.

    19. Re:Problems with newer versions by dspisak · · Score: 1

      Yeah I have to agree here, compiling PHP is a massive PITA. In fact, compiling PHP makes compiling Apache look easy and trivial by comparison.

      Don't get me wrong, I like its ability to be modular but I swear someone needs to write a console GUI frontend for compiling PHP ala kernel source via ncurses with some intelligence to auto-download sources for various modular libraries and build them in a apt-get style.

      Hmmm of course now that I think about this problem it just sounds like you need an apt-get made just for PHP

    20. Re:Problems with newer versions by pacman+on+prozac · · Score: 1
      Then you're either not paying attention or you're not using any of the features of PHP.

      For instance between 4.3.1 and 4.3.2 the way you refer to associative arrays has changed so that:
      $array['key'] is now wrong and gives an error.
      and
      $array["key"] is now right.


      Since even the php manual cannot keep up with these changes it becomes a bit of problem as with each upgrade you never know if the new error messages are bugs or features :)
    21. Re:Problems with newer versions by tetranz · · Score: 1

      My solution to this is to look for a "Virtual Server" account. This is where you have complete control and can therefore install your own PHP. Its also much more secure. If you shop around, the costs are now not much more than good quality standard shared hosting.

    22. Re:Problems with newer versions by chegosaurus · · Score: 1

      I've never really run into problems with code being broken by running it on later versions of PHP4. I always try to stick to the core function set, and if I'm writing code for other people, the odd function_exists() can save a lot of frustration.

      3 to 4 was different, as will be 4 to 5, but we expect that don't we?

      More worrying is that ISPs very rarely upgrade PHP, even in the face of well known security holes. (And of course it's utterly trivial to find out what version of PHP a server is running.)

    23. Re:Problems with newer versions by steveg · · Score: 2, Insightful

      If you are trying to match the options from a previous install, what I do is create a page with phpinfo() on it. This displays the entire configuration, including the compile configuration. I just cut and paste that section of the output page onto the command line and I get a build of the new version with the same options.

      Doesn't help if they've changed how an option is invoked at ./configure time, but other than that it does the job.

      Runtime behavior changes are a different matter.

      --
      Ignorance killed the cat. Curiosity was framed.
    24. Re:Problems with newer versions by Guido+von+Guido · · Score: 1
      Well, I personally had two sets of problems: figuring out what was done before and getting all the software I needed to behave during compilation.

      After the first time I needed to do this, I kept a pretty detailed log out what I did, so it was less of an issue. But I had all kinds of problems with versioning, dependencies and occasionally odd bugs that only appeared in Solaris.

  7. What about apache2? by Anonymous Coward · · Score: 0, Interesting

    And what about apache 2? Up until now, they recommend that users stick with apache 1 if they want to use PHP as a module.

    1. Re:What about apache2? by hhnerkopfabbeisser · · Score: 1

      The status is the same that it has been and will be for quite a while:
      PHP itself (including the APXS2 sapi) is stable and thread-safe enough to be used with Apache 2, however thread-safety is unknown for many of the libraries PHP can link to.
      Link PHP against as few libraries as possible, and you should be fine.

    2. Re:What about apache2? by Billly+Gates · · Score: 2, Informative
      Well I tried out FoxServ on my Windows2k box because I am lazy and did not want to configure php and apache2 myself.

      You can find it on sourceforge.

      Its basically apache2, perl 5.6, tlc/tk, python 2.2, mysql, and php 4.2 installed as one package. I think their is a Unix version as well but I do not use it.

  8. Don't mod me down... by NoSuchGuy · · Score: 0

    but ASP/Mircosoft was faster then the guys from Zend. But PHP is way cooler and you don't need IIS.

    --
    Grundgesetz * 23. Mai 1949 - 30. November 2007 - http://www.vorratsdatenspeicherung.de/
    1. Re:Don't mod me down... by Anonymous Coward · · Score: 2, Interesting

      Does PHP5 cache compiled scripts yet? That's where ASP gets it's speed from.

    2. Re:Don't mod me down... by loginx · · Score: 2, Informative

      Not natively (yet) but there are several tools that do this for PHP, such as the Zend Optimizer or the popular PHP Accelerator (PHPA) http://www.php-accelerator.co.uk/

    3. Re:Don't mod me down... by Cable_Monkey · · Score: 1

      PHP5 uses Zend 2...so would the Zend Optimizer still work?

    4. Re:Don't mod me down... by loginx · · Score: 1

      Either it will be compatible or there will be a Zend Optimizer 2.

      Either way, considering all the Zend optimizer does is cache the compiled code, I don't think the versiion of the zend-engine matters all that much... it should be pretty easy for them to get a newer version for php5.

  9. OO support by Anonymous Coward · · Score: 2, Funny

    I just want to know when they're going to add OO support to as.

  10. Yeah Yeah... by Second_Derivative · · Score: 3, Interesting

    It's still lumped into a great big inconsistent namespace

    It's still made by a for-profit company who hobble the product in order to not cut into their profit margins too much (Hello? Zend Cache? Optimiser? Compiler? Everything's free in PHP-Land, for a small fee in PHP-Land...)

    I don't mind so much the fact that you can't have servlet-like objects which handle entire sections of your URLspace (as opposed to one URL -- how very un-spider-friendly. Most choke on a ? in a URL and rightly so) and remain persistent (allowing you to do funky stuff like ... pool database connections maybe? no, mysql_pconnect() doesn't count. Oh, and what's with this SQLite thing? had a bit of a fallout with the MySQL team?) ... because that kinda defeats the point of PHP anyway.

    But come on. Fellas. PHP: Hypertext Preprocessor is the name. Not PHP: Application Server. If those first two issues were fixed it might actually make a seriously powerful hypertext preprocessor. That's something it's reasonably good at. But at the moment it's some sort of bastard preprocessing language run amok that people use to write whole web applications with and other stuff Nature never intended. Perl's got an awful syntax and a total lack of convention (and mod_perl is really byzantine), and I really really really really ..... (x47) really want to like Python, but it's not re-entrant and has a big interpreter which makes its threading capabilities into nothing more than a silly joke (and last I checked, efforts to rectify the situation died back in, what, 1997?), so yeah I admit I use PHP for quite a few web devel jobs. But just because everything else sucks more, doesn't mean PHP doesn't suck any less.

    I'm not even sure what my point is anymore. But, I think what I was trying to say was this isn't much. Same stuff is true of PHP as has always been true of it... wake me up when they get round to PHP6. An earlier rant I made comparing Perl to PHP (I think I preferred Perl back then) is here. The extended comment history is pretty much the only reason I got a subscription and to be fair I think it's worth the money.

    1. Re:Yeah Yeah... by Tyler+Eaves · · Score: 1

      PHP is far more capable out-of-the box than any other web language. Plus there are free replacements for much of the Zend such, as the Alternative PHP Cache. Furthermore, what exactly the hell is your problem? Do you have some issue with people trying to put foot on the table, while still giving away the bulk of their work for free. If the Zend team could not work on PHP and related projects fulltime, do you think PHP would be near as useful as it is?

      --
      TODO: Something witty here...
    2. Re:Yeah Yeah... by Anonymous Coward · · Score: 0

      PHP: Hypertext Preprocessor is the name

      Don't you mean Personal Home Page?

    3. Re:Yeah Yeah... by larry+bagina · · Score: 1
      It's still lumped into a great big inconsistent namespace

      That is my biggest complaint. And the sucky OO, which is improving now.

      How often do I use PHP to output PDFs? Maybe PDF generation shouldn't be a compile time switch, maybe it should be a loaded extension that provides an OO class to access the PDF functions. If later down the road you decide you want to generate PDFs, you wouldn't need to recompile PHP, you would just download (or compiler) the PDF extension.

      I bet admins at hosting sites would be more likely to drop in a module than to recompile PHP at a users's request.

      --
      Do you even lift?

      These aren't the 'roids you're looking for.

    4. Re:Yeah Yeah... by Anonymous Coward · · Score: 1, Informative

      I don't mind so much the fact that you can't have servlet-like objects which handle entire sections of your URLspace (as opposed to one URL -- how very un-spider-friendly.

      Nah, it's easy http://www.sitepoint.com/article/485 -- no question marks needed!

    5. Re:Yeah Yeah... by Second_Derivative · · Score: 1

      And all three of those are dirty hacks. Routing requests by making EVERY SINGLE ONE A 404 ERROR!? Gag me. There's very little you can't force on any given framework; doing it neatly and elegantly is another matter.

    6. Re:Yeah Yeah... by Anonymous Coward · · Score: 0

      Wow, your standard ignorant /. rant.

      PHP is not made by Zend, nor are there any of their commercial products that don't have open source equivalents.

      And what in the world do you mean you can't have PHP scripts that handle entire sections of your URL-space. Of course you can.

      http://www.domain.com/products/widgets
      http://www.domain.com/products/specials

      Here /products is your PHP script.

      As for pooling database connections. That's rather unscalable, but it has nothing to do with PHP. PHP is not an application server and hopefully never will be. PHP is an extension of your web server, and the architecture of the web server drives a lot of what PHP can do. In a preforking multiprocess web server architecture like Apache-1.x you can't have a db connection pool tied to the httpd processes. What you need is a standalone process that owns these. If you have a single multithreaded web server it becomes much easier to do, but your robustness and scalability takes a huge hit.

      And if you read stuff a bit more carefully. Support for MySQL was not dropped. The bundled mysql client library was simply dropped. I know I always build PHP against my system mysql client library to make sure my versions are in synch and I think most other people do too, so nothing has changed here. And given the change from the LGPL to the GPL in the MySQL4 client libraries, a non-GPL'ed product can not legally bundle a GPL'ed library.

    7. Re:Yeah Yeah... by Anonymous Coward · · Score: 0

      Using PATH_INFO is not a hack at all. And there is no 404 involved in that case.

    8. Re:Yeah Yeah... by thinkninja · · Score: 1

      I don't mind so much the fact that you can't have servlet-like objects which handle entire sections of your URLspace (as opposed to one URL -- how very un-spider-friendly.

      mod_rewrite

      --
      "The number of Unix installations has grown to ten, with more expected." (Unix Programmer's Manual, 2nd ed.; june 1972)
    9. Re:Yeah Yeah... by Second_Derivative · · Score: 1

      I don't have a problem with people trying to earn money.

      My problem is that there's a disincentive for the developers to incorporate useful features into PHP, because it conflicts with their own interests. Yep, I know about APC and the like, but what's the chances of that getting incorporated into the official distribution anytime soon?

      My problem is that this particular twist to the project structure counts against PHP, because I sure as hell don't see how it counts for it. Perl, Python et al are totally unfettered in this regard. If I wanted to share my improvement with the community (say, if I decided to implement better Python threading as opposed to sitting on my arse whinging about it) I could be sure that I'd have no trouble doing so if my implementation was technically and legally sound. If I wanted to improve the Zend core then I could do that provided that it would never concieveably compete with a Zend product. Yes I could redistribute it as a Zend plugin, but the burden of support would be mine. The Zend core team would be my competitors, they would not be my friends.

      That's what my problem is. Stop getting so damn touchy ;)

    10. Re:Yeah Yeah... by Second_Derivative · · Score: 1

      True, but if, say you wanted to present a hierarchical URL-space as opposed to something that looks more like a flat RPC mechanism then you'd have to implement your own URL dispatcher. Such mechanisms belong in the language, or, better yet, as hooks into the host HTTPd

      But, like I said, I don't mind that because this isn't the sort of thing PHP is intended for. (OK, sorry I guess I shouldn't have brought it up in the first place then)

    11. Re:Yeah Yeah... by Second_Derivative · · Score: 1

      The PHP team quite closely related to the Zend team from what I can tell. According to their page, Zend is what's left if you strip out PHP's Server API interfaces and its standard library.

    12. Re:Yeah Yeah... by eadz · · Score: 3, Informative

      I don't mind so much the fact that you can't have servlet-like objects which handle entire sections of your URLspace
      You can! Use a PHP file instead of a directory for your DocumentRoot in apache.
      I.e DocumentRoot /var/www/servlet.php
      Now all requests are handled by servlet.php.

    13. Re:Yeah Yeah... by Second_Derivative · · Score: 1

      Issat true?

      Now that IS an elegant approach! Thanks muchly for the info, I'll try it out sometime.

    14. Re:Yeah Yeah... by rasjani · · Score: 2, Interesting
      That articly sucked big time. All those are really really really dirty hacks and shows that the writer didnt know apache too well.

      I urge that man to rtfm a bit more before posting nonsense like that. Without even testing i can tell him that mod_rewrite is 100% more elegant way to archive what he was after than any of his 3 choises combined.

      Think about these rules for example (Not verified to work but im sure someone who knows apache syntax knows what i mean)

      • rewriteengine on
        rewriterule ^/article/(.+)$ /processor.php?article_id=$1 [P,L]
        rewriterule ^/article/(.+)/page/(.*)$ /processor.php?article_id=$1&page=$2 [P,L]

      And so forth .. What you need to do in your code is to print out links that will fit the rules you have set up with mod_rewrite ..

      --
      yush
    15. Re:Yeah Yeah... by eadz · · Score: 2, Informative
      Yep. It has one drawback though, and that is all requests are handled by servlet.php. If you have an images/ directory, you'll have to put code in your servelet.php to include those files!
      A more flexable approach I use for the same effect is a .htaccess :

      RewriteEngine on
      # if requested resource doesn't exist
      RewriteCond /%{REQUEST_FILENAME} !-f
      # redirect to default request handler
      RewriteRule ^(.+) /logic.php

      This means if you request /page.html and page.html exists it serves it. If it doesn't exist the request is handled by /logic.php. You can then either serve up some content based on the url or return a 404 header.
    16. Re:Yeah Yeah... by Second_Derivative · · Score: 4, Informative

      Nah, I reckon one could handle it like this...

      <VirtualHost *>
      ServerName www.myhost.com
      DocumentRoot /home/myhost/engine.php
      Alias /res /home/myhost/resources
      </VirtualHost> ... or something. I tried it on my server and it seems to work a treat. Once again cheers for the tip

    17. Re:Yeah Yeah... by eadz · · Score: 1

      Ahh yes, much better, saves cpu cycles checking for the file. Thank YOU for the tip :)

    18. Re:Yeah Yeah... by Anonymous Coward · · Score: 0

      You are too old school for any of us to have any idea what you're talking about.

      -slashdot moderators

    19. Re:Yeah Yeah... by lewp · · Score: 1

      That is probably the most informative thing I've ever seen on Slashdot. I've been using mod_rewrite to do the same thing forever. You're great.

      --
      Game... blouses.
    20. Re:Yeah Yeah... by Christianfreak · · Score: 0, Flamebait

      For all your complaints about Perl, its still far better than PHP because of the namespace and extentablity issues alone. Besides PHP derived its syntax from Perl (they wanted to 'fix' Perl). As for mod_perl, at first it was hard to get into but they've made a ton of improvements, most times if you've used 'strict' and followed good coding practice your CGI will plug right into mod_perl with no changes. mod_perl lets you do cool things with Apache as well.

      All of this is IMHO of course. My biggest complaint about PHP is the joke that they pass as "error handling". Yeah great, thanks for exposing all my path names to the outside world if something goes wrong. And sure you can turn it off but then you never know if something went wrong. Here's a hint, how about using the error_log like everyone else, and properly stop parsing and send a code 500 to the webserver??

    21. Re:Yeah Yeah... by rycamor · · Score: 1

      Um... haven't you read the PHP licence? It's very BSD-like. Anyone, and I mean anyone, can take that source and do what they want with it, fork it, wrap it up into another product, whatever. So there is absolutely no reason to castigate Zend for anything. And PHP is not hobbled at all in terms of functionality. The only thing Zend keeps proprietary is the high-performance stuff, which is *honestly* hardly a factor with most dynamic websites, unless they are busy enough to be able to afford Zends very reasonable prices.

      Also, there is no reason to complain about "disincentive for the developers to incorporate useful features into PHP". Anyone can create a "release" of PHP that incorporates a zillion features that are not in the default PHP install. In fact, many people have.

      And anyway, if your scenario were true, then Java users on non-Sun platforms would be even more out of luck. But in fact, Java seems to keep including all kinds of useful stuff, even to the point where Sun is now moving to include a standard method for Java to interoperate with several of these scripting languages, including PHP.

      Furthermore (you didn't think I was done yet, did you? ;-)), Zend's business model is *exactly* what many developers need to be able to get their bosses to consider open source solutions: yes it's open source, but you can get a paid support license from the creators, as well as all kinds of neat tools that make you feel better about your dev team using this crazy open source stuff.

    22. Re:Yeah Yeah... by Photon+Ghoul · · Score: 1

      Do you have some issue with people trying to put foot on the table,

      He's correct in having an issue with this. It's just downright disgusting when you're trying to eat and Uncle Bob props his callous-ridden ingrown fungi-infested feet on the dinner table.

    23. Re:Yeah Yeah... by pacman+on+prozac · · Score: 4, Informative

      My biggest complaint about PHP is the joke that they pass as "error handling". Yeah great, thanks for exposing all my path names to the outside world if something goes wrong.

      Psychic abilities will be added to PHP as of version 6.6.6. From here on you will be able to simply think of the configuration you want and it will be set in php.ini. No longer will you have to read the extremely comprehensive online docs including the manual and especially not the ENTIRE SECTION dedicated to error reporting and logging that tells you extremely clearly how to do what you have just complained is impossible. You would not need to read that page and find the two links within the 1st side that show very clearly information on the display errors, error_log for custom logs and of course log errors to put the errors in the apache logfile.

      Your biggest complaint is that you are too lazy to read the manual and you expect everything to be done for you. No programming language can help you with this.

    24. Re:Yeah Yeah... by You're+All+Wrong · · Score: 1

      Isn't the simplest way to just use "Alias"

      Alias /article /processor.php

      (or something like that) and then use the 1st hack in the article?

      Note - I've never used it, I'm just guessing, but have considered using it, and am open to advice.

      YAW.

      --
      Your head of state is a corrupt weasel, I hope you're happy.
    25. Re:Yeah Yeah... by Quixotic137 · · Score: 1

      How about just changing the 404 document to a php script? I don't remember now if this is exactly correct, but something like this in the apache config:

      ErrorDocument 404 /logic.php

      If the document exists, apache will serve it. If not, apache will load the "error" document and you can do what you want with it.

    26. Re:Yeah Yeah... by Mr_Silver · · Score: 1
      It's still made by a for-profit company who hobble the product in order to not cut into their profit margins too much

      It could be worse.

      It could be a for-profit company who don't release a free product at all.

      Which would you prefer?

      --
      Avantslash - View Slashdot cleanly on your mobile phone.
    27. Re:Yeah Yeah... by eadz · · Score: 1

      The problem with that is it returns the 404 HTTP header, which is NOT what we want if the page is actually found.

    28. Re:Yeah Yeah... by Christianfreak · · Score: 1

      Ahh yes the great online documentation where i have to know the name of the function to find anything useful. Typing 'log errors' into the 'online documentation' search directs me to a google search of the entire site that does not produce the page you're refering to. Too bad that PHP doesn't come with easily accessable documentation like most other languages on a Unix system. Perl for instance has its manual divided into clearly marked sections so you can find what you're looking for without having to know Perl at all.

      Your biggest complaint is that you are too lazy to read the manual and you expect everything to be done for you. No programming language can help you with this.

      If that were true I'd like using PHP as it does do everything for you without anyone having to learn those pesky programming practices like separating presentation from design, or namespaces, or scoping.

      As for the error handling, thanks for showing me the document you refered to. However after reading it, its still seems that PHP does not throw a code 500 to the webserver. Even if it did I still stand behind what I said before, as the default implementation of errors is non-standard and exposes things like real pathnames to the outside world.

    29. Re:Yeah Yeah... by Anonymous Coward · · Score: 0

      You could throw your own 500 error:

      header("HTTP/1.0 500 Internal Server Error");

      And by utilising set_error_handler()[1] you can make it do this automatically. You can even couple it with error_log()[2] to make your own logs. Is this good enough error control for you?

      And as for your poke at PHP and programming practices, a tool is only as good as the craftsman who wields it. Sounds like your grip is rather poor on this particular tool...

      - Davey

      [1] http://php.net/set-error-handler
      [2] http://php.net/error-log

    30. Re:Yeah Yeah... by rasjani · · Score: 1

      It seems to work fine too. Allthou, its not that vice to hold your php files in root your directory ;)) (Right side mapfile is absolute path to your physical filesystem)

      --
      yush
  11. i'm... by deadsaijinx* · · Score: 1

    just glad they have so many mirrors. I was worried the /. effect would have kept me from getting it

    --
    YOU SUCK BALLS!
  12. The obligatory predictions... by UsonianAutomatic · · Score: 5, Funny
    1. PHP Sucks, Perl is a much better language.
    2. PERL sucks, PHP does most of the same stuff Perl does but you can still read your own code a week later
    3. PHP isn't a real language, it's just a bunch of wrappers thrown around stuff. PHP sucks.
    4. Who cares about MySQL support, MySQL's not a real database anyway. MySQL sucks. PostgreSQL rulez.
    5. WTF I upgraded to PHP 4.1.2 and all my form submit scripts stopped working. Whats this register_globals crap anyway what a pain.
    6. Continue with language specific criticisms; loose typing, OO not as strong as Java, et cetera.
    1. Re:The obligatory predictions... by NamShubCMX · · Score: 1
      --
      We've always been at war with Eurasia.
    2. Re:The obligatory predictions... by glwtta · · Score: 4, Funny
      You forgot the obligatory followup to number 2:

      WTF is "PERL" anyway? PHP sucks, Perl rules.

      --
      sic transit gloria mundi
    3. Re:The obligatory predictions... by Dark+Lord+Seth · · Score: 1
      2. PERL sucks, PHP does most of the same stuff Perl does but you can still read your own code a week later

      *looks at his own PHP scripts* ...

      You might want to decide to take that back... PHP readability is simply horrid... :\

    4. Re:The obligatory predictions... by Anonymous Coward · · Score: 0

      YOUR PHP readability may be horrid, but mine is great, as far as I'm concerned.

      Not only can I read it a week, month, or year later, but I can show a newbie a feature in my code, and with very little effort they can see exactly what's going on and why.

      Can't do that in perl...

    5. Re:The obligatory predictions... by Tablizer · · Score: 3, Funny

      You forgot one:

      7. OOP sucks, there is no proof it is better, it is only a personal choice that maps to some people's head better but not all and the reuse claim is so 80's because up-to-date OO'ers don't claim that anymore.

      If you are gonna put a troll out of business, do it right ;-)

    6. Re:The obligatory predictions... by geekoid · · Score: 1

      "PERL sucks, PHP does most of the same stuff Perl does but you can still read your own code a week later"
      Now I know you're kidding, butthis one really gets my goat.
      That is a problem with the developer, not the language.

      oh, and OO is needless and suck hind teat.

      --
      The Kruger Dunning explains most post on /. http://en.wikipedia.org/wiki/Dunning%E2%80%93Kruger_effect
    7. Re:The obligatory predictions... by Shinobi · · Score: 2, Funny

      "PERL sucks, PHP does most of the same stuff Perl does but you can still read your own code a week later"

      How about "PHP doesn't require you to be drunk to be able to read and debug the code you wrote earlier the same day"?

      Been there, done that....

    8. Re:The obligatory predictions... by Xpilot · · Score: 3, Funny

      6. Continue with language specific criticisms; loose typing, OO not as strong as Java, et cetera.

      The word "loose" was used correctly in a Slashdot comment! Quick, take a picture!

      --
      "Backups are for wimps. Real men upload their data to an FTP site and have everyone else mirror it." -- Linus Torvalds
    9. Re:The obligatory predictions... by ceeam · · Score: 2, Insightful

      Practical Extraction and Reporting Language -> PERL. Huh? Not?

    10. Re:The obligatory predictions... by Anonymous Coward · · Score: 0

      speaking of pictures and loose, how is your mother this morning?

    11. Re:The obligatory predictions... by glwtta · · Score: 1

      Actually, here's a good module that talks about PERL - very useful for Perl programmers.

      --
      sic transit gloria mundi
    12. Re:The obligatory predictions... by zonker · · Score: 0

      yeah, i read the comment two or three times because i couldn't believe my eyes. ;P

  13. Still re-coding for register_global_variables... by vandan · · Score: 2, Interesting

    God damn!
    I'm half-way through re-writing our website to remove our dependance on the depreciated register_global_variables stuff which I learned to live with and then was told was a stupid idea.
    I'm hoping they don't break too many other things 'cause being a php beginner, the whole process is a bit of a nightmare.

  14. Destructors! Hooray! by Wuhao · · Score: 2, Insightful

    I have always been very annoyed not having destructors in PHP. PHP5 includes destructors, along with public/private class members. I can't wait for this to be released as a stable version.

    1. Re:Destructors! Hooray! by pacman+on+prozac · · Score: 1

      You can easily emulate this exact function using register_shutdown_function('&$this','function' ) and have been able to for ages.

  15. Requires Microsoft Visual C++ by yerricde · · Score: 5, Interesting

    MySQL isn't bundled with it, but you can easily add it yourself when compiling.

    Compiling?

    Compiling PHP for Windows requires the Microsoft Visual C++ compiler version 6.0 or later.

    The Microsoft Visual C++ optimizing compiler version 6.0 or later is available only from Microsoft as part of Microsoft Visual Studio .NET, which costs $1,079 for one non-academic seat. (Microsoft no longer sells a Visual C++ optimizing compiler separately.)

    Some people are bound to bring up the $109 Microsoft Visual C++ Learning Edition, but 1. the EULA attached to its library probably does not permit distribution of generated binaries nor public performance (i.e. use on a public web site) of generated binaries, and 2. because it does not have an optimizer, the speed of generated binaries is closer to that of an interpreted program than to that of a compiled program.

    If I had any spare time, I'd fix this by porting the build to MinGW.

    --
    Will I retire or break 10K?
    1. Re:Requires Microsoft Visual C++ by codegoat · · Score: 0

      It is all free in linux ;)

    2. Re:Requires Microsoft Visual C++ by yerricde · · Score: 1, Insightful

      Does Linux support all the hardware in a typical Dell desktop machine that my parents bought before I learned about Linux?

      "So don't buy Windows-specific hardware." Why can't I find penguin logos on any of the boxes of PCI, AGP, and USB devices that I see at Best Buy or Circuit City? Where should I be shopping instead?

      Does Wine run all my legacy Windows applications for which there exists no stable Free replacement?

      Will Comcast troubleshoot the Internet connection to my machine if I'm running something other than Windows on an x86 box?

      --
      Will I retire or break 10K?
    3. Re:Requires Microsoft Visual C++ by codegoat · · Score: 0

      ahhh... It is a hassle, I know... but this is why I have both :)

      Actually, all 3. Windows, Linux and OS X ;)

    4. Re:Requires Microsoft Visual C++ by rkz · · Score: 1

      or you could use Cygwin

    5. Re:Requires Microsoft Visual C++ by Anonymous Coward · · Score: 0

      I've read posts by you before, bitching about how you don't have a job. Exactly what do you do in your spare time that would preclude activities of this nature?

    6. Re:Requires Microsoft Visual C++ by yerricde · · Score: 1

      Chores.

      Job hunting.

      Free software development, in an attempt to build my resume.

      --
      Will I retire or break 10K?
    7. Re:Requires Microsoft Visual C++ by Anonymous Coward · · Score: 0

      Free software development, in an attempt to build my resume.

      Sounds like you can kill 2 birds with 1 stone now!

    8. Re:Requires Microsoft Visual C++ by yerricde · · Score: 1

      You had enough spare time to whine about this on slashbot and promote FUD. MAybe you need to adjust your priorities.

      But I don't have enough spare time nor experience to become the maintainer of a port of such a widely used program.

      --
      Will I retire or break 10K?
    9. Re:Requires Microsoft Visual C++ by Anonymous Coward · · Score: 0

      FYI -- There's no such thing as "public performance" in software copyright law. That's an RIAAism.

      Microsoft's academic compilers are fine for academic projects, public or not.

    10. Re:Requires Microsoft Visual C++ by Anonymous Coward · · Score: 1, Informative

      Some people are bound to bring up the $109 Microsoft Visual C++ Learning Edition,

      Actually, you can download the non-optimizing compiler for free from their web site. Seriously though, who wants a compiler with no optimization?

    11. Re:Requires Microsoft Visual C++ by Anonymous Coward · · Score: 3, Informative

      MySQL isn't bundled with it, but you can easily add it yourself when compiling.

      Compiling?

      Compiling PHP for Windows requires the Microsoft Visual C++ compiler version 6.0 or later.


      Exactly version 6.0, not "later" (because you can't compile/link with GPL stuff with the 7.0/.NET compiler due to licensing restrictions).

    12. Re:Requires Microsoft Visual C++ by Mostly+a+lurker · · Score: 2, Interesting
      Actually, you can download the non-optimizing compiler for free from their web site.

      I stand to be corrected, but I believe this is no longer true. On the other hand, it may be possible to work with the Intel C++ compiler. It seems to play with MS Visual C++ stuff quite well in most cases.

    13. Re:Requires Microsoft Visual C++ by yerricde · · Score: 1

      you can't compile/link with GPL stuff with the 7.0/.NET compiler due to licensing restrictions

      Huh? Isn't this a GPL'd program compiled with Visual Studio .NET? Aren't any libraries that come with the compiler considered "major components ... of the operating system" under section 3 of the GNU GPL?

      --
      Will I retire or break 10K?
    14. Re:Requires Microsoft Visual C++ by Anonymous Coward · · Score: 0

      No, he's right. The EULA for VS.NET doesn't permit usage on GPL programs, believe it or not. I'm surprised there isn't more screeching about this

      "...(c) Open Source. Recipient's license rights to the
      > Software are
      > > conditioned upon Recipient (i) not distributing such Software, in
      > > whole or in part, in conjunction with Potentially Viral
      > Software (as
      > > defined below); and
      > > (ii) not using Potentially Viral Software (e.g. tools) to
      > develop Recipient
      > > software which includes the Software, in whole or in part.
      > For purposes of
      > > the foregoing, "Potentially Viral Software" means software
      > which is licensed
      > > pursuant to terms that: (x) create, or purport to create,
      > obligations for
      > > Microsoft with respect to the Software or (y) grant, or
      > purport to grant, to
      > > any third party any rights to or immunities under
      > Microsoft's intellectual
      > > property or proprietary rights in the Software. By way of
      > example but not
      > > limitation of the foregoing, Recipient shall not distribute
      > the Software, in
      > > whole or in part, in conjunction with any Publicly
      > Available Software.
      > > "Publicly Available Software" means each of (i) any
      > software that contains, or
      > > is derived in any manner (in whole or in part) from, any
      > software that is
      > > distributed as free software, open source software (e.g.
      > Linux) or similar
      > > licensing or distribution models; and (ii) any software
      > that requires as a
      > > condition of use, modification and/or distribution of such
      > software that other
      > > software distributed with such software (A) be disclosed or
      > distributed in
      > > source code form; (B) be licensed for the purpose of making
      > derivative works;
      > > or (C) be redistributable at no charge. Publicly Available
      > Software includes,
      > > without limitation, software licensed or distributed under
      > any of the
      > > following licenses or distribution models, or licenses or
      > distribution models
      > > similar to any of the following: (A) GNU's General Public
      > License (GPL) or
      > > Lesser/Library GPL (LGPL), (B) The Artistic License (e.g.,
      > PERL), (C) the
      > > Mozilla Public License, (D) the Netscape Public License,
      > (E) the Sun Community
      > > Source License (SCSL), and (F) the Sun Industry Standards
      > License (SISL)."
      >
      >
      >

    15. Re:Requires Microsoft Visual C++ by lpontiac · · Score: 1
      Compiling PHP for Windows requires the Microsoft Visual C++ compiler version 6.0 or later.

      I also hear that running PHP for Windows requires the Microsoft Windows operating system version NT4.0 or later. *gasp*

    16. Re:Requires Microsoft Visual C++ by autechre · · Score: 1

      I don't know. Does it support your hardware? Have you tried/checked? Since you have Comcast, why not download Knoppix and give it a try?

      (Since Dell [at least used to] ship Linux as an option with its desktop machines, your chances are better than normal. Also, my school runs Linux labs on Dell machines, as our contract is with Dell.)

      If you're not going to share what your legacy applications are, how are we supposed to know whether WINE runs them?

      Yes, Comcast will troubleshoot an Internet connection to a machine running OpenBSD. They won't tell you how to set up networking on it, but they will assume you know what you're doing. They can query their modem remotely and check in other ways to determine if it's their fault or yours.

      --
      WMBC freeform/independent online radio.
    17. Re:Requires Microsoft Visual C++ by yerricde · · Score: 1

      why not download Knoppix and give it a try?

      I know Linux can't write to NTFS partitions, but can it read them reliably?

      If you're not going to share what your legacy applications are, how are we supposed to know whether WINE runs them?

      Let me scan down my start menu. I see GIMP, Emacs, and several programs that didn't originate on the Linux side: AIM and MSN with file transfer capability, ATI TV Wonder VE video input card driver, Canon S520 printer driver, Cool Edit Pro, Maple V 5.1, Microtech 4850 scanner driver, Modplug Tracker, Olympus D-340L camera driver, Outlook Express with Hotmail support, QuickTime 6 with all the codecs that come with QuickTime 6, and StepMania (is pyDDR any good?).

      OK, so I check some of this list against Codeweavers' application database. Modplug Tracker seems to work. Maple has not been rated in Wine. (There exists a Linux version, but my school didn't have it, and now that I'm out of school, it'd be way too expensive for me to buy.) Cool Edit Pro seems to hang on the splash screen for many people. Outlook Express's EULA prohibits running it in Wine. My scanner seems to be unsupported, but gphoto can pull pictures from my camera, and the TV Wonder VE has a Brooktree chipset (which supposedly works).

      They can query their modem remotely and check in other ways to determine if it's their fault or yours.

      Thanks. I was hoping Comcast wouldn't be one of those ISPs that say 'if you're not running Windows, we'll assume everything's your fault.'

      --
      Will I retire or break 10K?
    18. Re:Requires Microsoft Visual C++ by autechre · · Score: 1

      Linux can read NTFS with no problem, and Mandrake apparently has a utility to resize the partitions now.

      GAIM and Everybuddy support for AIM file transfer seems to waver. GAIM always supports it for TOC, but I'm not sure about Oscar on either of them. Last I checked, I could receive files fine from AIM users, but my firewall prevented me from sending without a proxy (which would be a pain to set up on a 486 running OpenBSD with no compiler and a 200M hard drive). But that's OK, because I run Apache.

      I have to admit that I don't know about a lot of the other stuff; I don't have your scanner or digital camera, and I use the Hauppage WinTV that every other Linux user seems to have :). The GATOS drivers are supposed to be good for ATI under Linux, though, but I've stuck with nVidia.

      I seriously doubt that Quicktime supports anything that MPlayer doesn't; in fact, I suspect that the reverse may well be true, and you can get all the codecs in a one-file download. I have heard that pyDDR is good, but I have a PS2, so I can play RealDDR :)

      I thought there was something on freshmeat to grab Hotmail mail for you, but I can't remember. You might look there for a native tracker as well. As for ISPs, there are some that are actually _friendly_ to those running "other" operating systems (speakeasy is popular), but I'm lazy, and now Comcast has doubled my downstream/upstream bandwidth, I hardly use Usenet anymore, and I like getting discounts on cable TV so that I can watch Adult Swim and Good Eats. All Comcast seems to care about is that your system does DHCP properly.

      (It's actually a bit amazing to me that you replied to this; I guess you must actually check your posts via your user page too. That's a big problem I have with Slashdot; it's not really a discussion forum anymore, since a story is "dead" after an hour.)

      --
      WMBC freeform/independent online radio.
    19. Re:Requires Microsoft Visual C++ by MattRog · · Score: 1

      You certainly don't need to compile PHP to use it on windows. There are a lot of sources out there for Win32 bins, I know because I had to use the ISAPI module for IIS.

      And, at least in Windows, you don't need to compile anything into the bin, you just stick extra DLLs in the directory.

      --

      Thanks,
      --
      Matt
    20. Re:Requires Microsoft Visual C++ by brrrrrrt · · Score: 0

      Just compile it with gcc. gcc is available as a binary for Windows as well. No need for visual c++, microsoft foundation classes, interdev or whatever.

    21. Re:Requires Microsoft Visual C++ by bat'ka+makhno · · Score: 1

      $ grep -cE "GPL|LGPL" /cygdrive/g/Setup/eula.txt
      0

      What version of VS.NET are you talking about?

  16. Get/Set Niftiness by MickeyJ · · Score: 1

    This looks like a really cool release - the Get/Set methods would be ideal for binding a class to a database. e.g.

    $user->name = "joebloggs";

    could automagically update the tables for you.

    --
    MikeJ
    Mikesroom.org
    1. Re:Get/Set Niftiness by Anonymous Coward · · Score: 0

      Yeah good thinking. This way when I want to update five values for a user I can have 5 seperate update queries get run. user->pass='blah', user->location='blah', ... all running a new query. Wrapping up sql commands like that would be incredibly stupid.

    2. Re:Get/Set Niftiness by SPautz · · Score: 1

      It would be stupid to do things like that, but a small modification could make things speedy: stick a flag in there to indicate whether any of the updateable fields have been changed, then in the object's destructor just check the flag and update if necessary. Combine that with some information about the database (eg, which table to save to) and overloaded property access and you can have a single class that automatically handles inserts or updates for any table in your database.

    3. Re:Get/Set Niftiness by Anonymous Coward · · Score: 0

      See ADO on Microsoft platforms.

      rs("blah").Value = "blah";
      rs("blah2").Value = 2;
      rs.Update();

    4. Re:Get/Set Niftiness by Anonymous Coward · · Score: 0

      in php5:
      rs = new RecordSet();
      rs.blah = "blah";
      rs.blah2 = 2;

      ado is nice, but in this case you can get the same functionality with the tiniest big of effort

    5. Re:Get/Set Niftiness by Zelig321 · · Score: 1

      How About this:

      $user->beginUpdate();

      $user->name = 'joe';
      $user->pass = 'blah';

      $user->endUpdate();

      Where beginUpdate() and endUpdate() would ensure changes are gathered and then committed only once.

      bah...Just writing this gives me a zillion ideas on how to use all the PHP 5 stuff...

    6. Re:Get/Set Niftiness by Anonymous Coward · · Score: 0

      So, is that done with a cursor, or is it disconnected?

    7. Re:Get/Set Niftiness by raju1kabir · · Score: 1
      Where beginUpdate() and endUpdate() would ensure changes are gathered and then committed only once.

      Better yet, just let your destructor handle the update.

      --
      "Patriotism is your conviction that this country is superior to all other countries because you were born in it." -- GBS
  17. But how? by yerricde · · Score: 3, Insightful

    what's so difficult about using your own mysql installation?

    How do I tell binary PHP to use the installed binary MySQL?

    Please read this comment before replying with such an answer along the lines of "compile it yourself".

    --
    Will I retire or break 10K?
    1. Re:But how? by Anonymous Coward · · Score: 0

      likewise, you should read this page

  18. Final version by InsaneCreator · · Score: 2, Informative

    So how long until we get the final version?

    I'm currently developing a PHP project with lots of OO code and it's about as plesant as removing your eyes with a rusty spoon (some control structures implicitly copy objects, they don't know how to return references, you can't write $a->getB()->doSth(); ...).

    Improved OO support in PHP5 would be really nice riht now.

    1. Re:Final version by hhnerkopfabbeisser · · Score: 1

      When it's finished, which most people guess right now will be Q4 this year or Q1 next year.

    2. Re:Final version by Shazow · · Score: 1
      As said here...
      "Its still a good 6-9 months (at least) before a final PHP5 release."
      And that's how the cookie crumbles. - shazow
  19. Re:Still re-coding for register_global_variables.. by codegoat · · Score: 1, Informative

    if you have a huge site, doing that is a quite a tedious job. If you want a quick fix. Do the following for all of the variable arrays. -- foreach( $HTTP_GET_VARS as $key => $value ) { $$key = $value; } -- As I said, just do that for POST, COOKIE, SESSION etc. Also, you can change the order so that POST has more weight than get (POST variables overwrite GET variables.) by simply doing the POST after the GET :) Do this in one file and include it in the top of every page. (If you have a config file, do it there, so you don't have to go and include it throughout your entire site) This is an easy fix for doing what you want. -goat

  20. Yawn by Anonymous Coward · · Score: 3, Interesting

    I'm a PHP programmer and I've begun to recognize a pattern in software: when will we see the end?

    Truly, what more can you add to PHP? Why do most software packages continue to add features without actualy providing a subjective goal to strive for?

    For example, in the world of Microsoft(R) Windows we see the same operating system have plastered above it "Where do you want to go tomorrow" and above all "n% faster than previous, more stable, etc." When will the goal of a products feature-list finally be met?

    I know Perl5 accomplished its goals, and then they had an {ap-if-in-ee} to add the RegEx in yet another release of Perl titled Perl6. When will they ever make a product that has a goal? I don't call this competition...I call it beating a dead horse from its grave, like how Intel puts rocket boosters on its crumy brick CPU architecture (Pentium Pro) and adds some more features.

    Look at netBSD; it isn't dying, it's still working on its number-one goal: security.

    Linux is the same way; it stated from an original design and now is being extended. Am I sounding like I expect a new feature to be a new product? I don't think so... GNU/HURD, of which I know many people are skeptics unto, is builind upon its goals of being a Micro Kernel and add some. What if Linux all-of-a-sudden wanted to become a Micro Kernel? What if Microsoft(R) Windows(TM) all-of-a-sudden wanted to become a Micro Kernel?

    The software names, after huge changes to extend their capabilites, are becoming misleading! If you take out a RedHat Linux 5.2 system and compare it with RedHat Linux 8.x, you can't say they are both similar Linux; they are completly different! Sure, it's like comparing apples with oranges on the old and new RedHat, but Kernel-wise the latest Linux Kernel may look completly different and have completly different goals and features than what was hoped for in the verry early Linux kernels. Shouldn't to cause less confusion and more inspiration, they leave the Linux name behind with the old design and all the new stuff that would completly change Linux's software (mechanical?) appearance become known as the new project Herring(TM). I anticipate most of you will reply with "That's why we have VERSION NUMBERS", but hey? You're missing the point.

    Microsoft(R)'s Windows(TM) name isn't describing the project's code name, yet the product's retail names are somthing like 95, 98, NT, 2000, XP. Well, it is honest to say that the NT and 2000 products are similar, 95 and 98 products are similar, and the XP product isn't quite similar to 95 and 98 and 2000, but then there was the fiasco that all the 9x users went out to buy product Windows(TM) 2000 and found they had been tricked by Microsoft that 2000 would be like a 95 or 98. Anyone see my point?

    As for PHP, and perhaps Perl... Does anyone think they should continue calling those products by their initial names AFTER the programming syntax and methodology becomes completly different or non-compatible than they were first designed?

    I'm looking forward to some intelligent answers. Thanks and I'll be a PHP and Perl programmer for a long time to come. d:-)

    1. Re:Yawn by sydb · · Score: 1

      Look at netBSD; it isn't dying, it's still working on its number-one goal: security.


      I think that would be portability. OpenBSD's goal is security.

      You make some fair points. I would have to say that you can't very well expect software to change it's name just because it's evolved. I'm not the same person I was twenty years ago by a long shot but I'm not about to call myself Roger Keith. I don't expect to be exactly the same person in twenty years by I will still be recognisable. Probably.

      --
      Yours Sincerely, Michael.
    2. Re:Yawn by Anonymous Coward · · Score: 0

      DRAM REFRESH:
      *OpenBSD = security
      *NetBSD = portability

      I stand refreshed, not to be confused with corrected.

    3. Re:Yawn by c13v3rm0nk3y · · Score: 2, Insightful

      ...I've begun to recognize a pattern in software: when will we see the end?

      Well, never.

      Software design is unlike most every other discipline in the world. Your job is never finished until the product is dead. There are always bugs to fix, inconsistencies to remedy. Even the action of fixing bugs will create or uncover new ones. The fact is, if you release version 1.0, by definition you will also have to release version x.y for the entire life-cycle of the product. This also implies that versions may not be infinitely forwards- or backwards-compatible. At some point you have to abandon old releases.

      Look at netBSD; it isn't dying, it's still working on its number-one goal: security.

      According to the netBSD Goals page, security is not paramount. Certainly it take back seat to correctness of code, performance and wide platform support. Perhaps you mean OpenBSD? Either way, if you are going to make security your number one goal, you are compelled to updating and maintaining your code base! Security is a job that is never finished.

      What if Linux all-of-a-sudden wanted to become a Micro Kernel? What if Microsoft(R) Windows(TM) all-of-a-sudden wanted to become a Micro Kernel?

      Well, one of the early criticisms of Linux was that it wasn't a microkernel design. Some MINIX folks really thought Linus was taking a step backwards, though his intention was just to run a real UNIX on his intel box.

      The NT kernel can be considered a microkernel. Very few "pure" microkernel implementations exist, and even fewer exist in the wild. By most definitions the Windows NT kernel is a microkernel.

      Anyway, it's a moot point. Yes, redesigning the Linux kernel to be a microkernel would be significant, but this is why they have odd-number releases to shake the biggest bugs out. Architecture changes like this are part of any long-running project. Do I think they should do it? No. Do I think it would be more are less Linux? Again, no. If the only thing we could call linux is 2.4.x then the project is dead for sure.

      How Microsoft or the PHP people label their respective products is really not that important. I'm not sure this is any kind of trick. Oh sure, Microsoft wants to make sure that people stay current, so it markets the latest release as The Best Ever, You'll See, but everyone does that. It helps their bottom-end in all sorts of ways, not just in immediate units sold.

      Supporting old releases is expensive and painful. Few companies can afford to do so. How old releases are grandfathered is important, but we have to realize that old software must die. Personally, I'm glad Microsoft continued making improvements to Windows over the years (aren't you?). I just don't give a shit what they call it, as it is obviously cut from the same cloth when I fire up my desktop at work.

      Does anyone think they should continue calling those products by their initial names AFTER the programming syntax and methodology becomes completly different or non-compatible than they were first designed?

      I certainly do not agree.

      The fact is that PHP 3, PHP 4 and PHP 5 all do the same sorts of jobs. The language will continue to run blogs and forums, process forms and maintain accounts for porn sites. That will not change. Eventually, as 5 matures it will replace 4 as the dominant release in current use. PHP is right for bumping the major version number when major architectural changed have been made. Whether or not syntax changes all that much (and from my review of the top article, the syntax of the language is not about to change radically) is relatively unimportant. As long as the provider (PHP) gives the implementer (the PHP developer) a heads-up on those changes, and sufficient time to revie

      --
      -- clvrmnky
    4. Re:Yawn by Anonymous Coward · · Score: 0
      I'm looking forward to some intelligent answers.

      And I was looking forward to an intelligent comment.

    5. Re:Yawn by Anonymous Coward · · Score: 0

      Sadly, you are neither intelligent or stupid. You are redundant. If you were to be categorized, you would be a Neutiot.

    6. Re:Yawn by Omicron32 · · Score: 1

      Microsoft(R)'s Windows(TM)

      (R)? (TM)?

      WTF, get out, you don't deserve to be here. ;P

    7. Re:Yawn by damiam · · Score: 3, Insightful
      I'm looking forward to some intelligent answers.

      You're new here, aren't you?

      --
      It's hard to be religious when certain people are never incinerated by bolts of lightning.
    8. Re:Yawn by Anonymous Coward · · Score: 0

      I understand what this guy means. Just look what happened with Visual Studio .NET especially with VB.net != VB7! VB4-6 were pretty straight forward and then came along VB.net which fucked all VB developers thanks to MS's "ideas".

      Here with PHP, the PHP developers are doing what MS did to VB developers. Ever so changing syntax, how do call what functions in what order. Sure I like the idea of having classes and everything, but geez PHP needs to quit trying to become C++. I prefer simple and straight forward programming. I hate calling classes especially since it's just bullshit. Fuck the classes and just call the fucking functions directly for god damned once!

    9. Re:Yawn by Hard_Code · · Score: 3, Insightful

      "I know Perl5 accomplished its goals, and then they had an {ap-if-in-ee} to add the RegEx in yet another release of Perl titled Perl6."

      Have you even READ anything about Perl6? Any of the apocolypses or exegises? After lots of incremental crud got added in the (very successful) Perl5 series, they are stepping back, rethinking, refactoring, and reimplementing with a very clear and concise goal of optimizing the syntax for the most used cases, as well as fixing known warts. Additionally they are doing this on top of a generic reusable virtual machine, instead of an ad-hoc specific-use interpreter. I don't even like Perl and I realize that Perl 6 is a Good Thing.

      --

      It's 10 PM. Do you know if you're un-American?
    10. Re:Yawn by pmz · · Score: 1

      Why do most software packages continue to add features without actualy providing a subjective goal to strive for?

      Buzzwords are the ends and the means, in the fashion industry...er, I mean IT industry.

      When will the goal of a products feature-list finally be met?

      It never will. The true end of the Earth will be when Microsoft's code-base becomes so massive that it forms a black hole destroying everything within 3 light-years.

      Microsoft(R)'s Windows(TM) name isn't describing the project's code name, yet the product's retail names are somthing like 95, 98, NT, 2000, XP. Well, it is honest to say that the NT and 2000 products are similar, 95 and 98 products are similar, and the XP product isn't quite similar to 95 and 98 and 2000, but then there was the fiasco that all the 9x users went out to buy product Windows(TM) 2000 and found they had been tricked by Microsoft that 2000 would be like a 95 or 98. Anyone see my point?

      You wouldn't last a day working at Microsoft's marketing department. They brand Windows deceptively because it is in their interest to do so! They are professional liars and theives. You shouldn't be suprised.

      Does anyone think they should continue calling those products by their initial names AFTER the programming syntax and methodology becomes completly different or non-compatible than they were first designed?

      Yes, in the sense that they are now branded and well-known. For example, a new Chevy Impala bears no resemblance to the two-ton behemoth from 1971 bearing the same name. Yet, it is still familiar, and it is a car from Chevrolet, accomplishing their goals of how to market this car. It is well-publicised that Perl 6 is vastly different than Perl 5, and it is also well-known that people who assume interoperability across major versions of software are foolish. It doesn't matter that Microsoft's marketing department exerts tremendous psychological control over their customers, those customers are still foolish.

    11. Re:Yawn by Anonymous Coward · · Score: 0
      {ap-if-in-ee}

      The word you're looking for is 'epiphany.'

  21. Kinda kludgey by Sanity · · Score: 2, Informative
    There are good reasons that ISPs want to use mod_php - and using your proposed solution these benefits are lost.

    If there was some way that you could allow the user to have multiple PHP versions all being used as Apache modules where the user could select the one they want using their .htaccess file, that would be a possible solution.

    Of course, the real solution is for the PHP development team to take the issue of backward-compatability more seriously then they clearly do at the moment.

    1. Re:Kinda kludgey by elbobo · · Score: 3, Insightful

      If there was some way that you could allow the user to have multiple PHP versions all being used as Apache modules where the user could select the one they want using their .htaccess file, that would be a possible solution.

      To my knowledge this is easily doable, and often done. Although I've never properly looked into it (I keep as far away as possible from virtual hosted environments where this would make sense), I believe the idea would be to compile apache modules for each different version of php you wanted to support, LoadModule each one in in your httpd.conf, then bind each one to a specific file extension (.php3, .php4, etc).

    2. Re:Kinda kludgey by ari_j · · Score: 1

      There should be a solution possible by allowing AddType and/or AddHandler in users' .htaccess files or setting it in their VirtualHost section.

    3. Re:Kinda kludgey by stridebird · · Score: 1

      I absolutely agree with that post.

      The server can run both modules, your php installations would have to be installed separately in their own locations of course, and your PHPv3 sites identified by a .php3 extension, .php4 or .php (or anything else too). Keeping to a single php version within each would help keep httpd.conf clean, too.

      Backward compatibility, too, has never been a problem in my experience. From 3 to 4 there was only ever register_globals to think about, although I generally take the time to convert old code to check-in all the HTTP variables - it's a good opportunity to stocktake on variable usage within scripts and is and easy site-wide function. Quick fix: turn on register_globals.

      Modern php looks ugly with variables like $_POST['mybutt'] so the clean method has to be to write your own registerV() function and pass it a list of the variables expected to make them available for the page. And you can wrap up extra input checking routines at this point too as well as cookie/session management routines.

      OK off to install v 5 for a monday giggle.

  22. Here's the word by john_smith_45678 · · Score: 3, Informative

    On Sat, 28 Jun 2003, Marc Richards wrote:
    > I apologies if this is the wrong place for asking. Is non-experimental
    > Apache2 support planned for PHP 5?

    Nope. Until someone sits down and goes through every 3rd-party library that can be linked into PHP on every platform and identifies whether or not they are threadsafe and under which conditions they remain threadsafe, using PHP in a threaded web server on UNIX is going to remain experimental.

    You can of course stick with non-threaded prefork mode, in which case you basically have Apache-1.3.x. Nobody so far have been motivated to test Apache2-prefork+PHP extensively, so even that combination is going to remain experimental.

    The basic problem here is that the average UNIX library has not been written with thread safety in mind. You can write very good specific threaded programs on UNIX, but it is extremely difficult to write something which can potentially link in hundreds of random libraries and expect them to all be threadsafe.

    -Rasmus

    http://news.php.net/article.php?group=php.internal s&article=%3CPine.LNX.4.56.0306272256280.6461%40th inkpad.lerdorf.com%3E

  23. Mod Parent Up by instantkarma1 · · Score: 0

    Please mod this up. It is absolutely freakin hilarious (because this is exactly what people will say)

  24. Re:Still re-coding for register_global_variables.. by codegoat · · Score: 0

    sonova, selected something wrong. ;)
    ---

    if you have a huge site, doing that is a quite a tedious job.

    If you want a quick fix. Do the following for all of the variable arrays.
    --

    foreach( $HTTP_GET_VARS as $key => $value )
    {
    $$key = $value;
    }

    --
    As I said, just do that for POST, COOKIE, SESSION etc. Also, you can change the order so that POST has more weight than get (POST variables overwrite GET variables.) by simply doing the POST after the GET :)

    Do this in one file and include it in the top of every page. (If you have a config file, do it there, so you don't have to go and include it throughout your entire site)

    This is an easy fix for doing what you want.

    -goat

  25. JSP by nepheles · · Score: 3, Interesting

    The will be an interesting battle. JSP and PHP are now broadly identical in syntax and OO implementation. Who'll win? PHP is OS, but JSP has a huge amount of support from corporations.

    I'm betting on JSP

    --
    ((lambda x ((x))) (lambda x ((x))))
    1. Re:JSP by numark · · Score: 1

      Not to mention that Java is the latest buzzword in web applications. Most company executives are completely clueless when you say PHP, but their ears will perk up when you say Java Server Pages. The branding's just not there with PHP. (Related note: I favor PHP a lot more than JSP, but that's just my opinion, for what it's worth)

      --
      Want Slashdot headlines on your site? Try SlashHead
    2. Re:JSP by houseofmore · · Score: 1

      I'd say php has already won.

    3. Re:JSP by Anonymous Coward · · Score: 0

      Who'll win?

      Well, you can't really compare PHP to Java Web Container technology. Servlets can do so much more (for example: how do you store variables in the application or session scope in PHP? Write them into files / into a database? In Java you store them in the implicitly created Session object or in the ServletContext and they just sit there in memory, waiting for another Thread to be created for an incoming HTTP transaction).

      You can play around in PHP and do a lot of things, but once you have to something highly scalable, well architected and cross platform, you only have one choice: Java...

      PHP is great for small sites, but anybody who creates object oriented applications in PHP regrets the time spent on PHP once he learns more about Java. I know, I did...

  26. Crappy OO in older version by Anonymous Coward · · Score: 1, Troll

    Wow, I read the "OO enhancements" and I was amazed they they would call it "OO enhancements" vs "adding OO capability". I've never used PHP, so I have no real basis for this flamesque statement, but: How they heck can you call a modern language OO without abstract methods, protected field/method access, pointers/references/identifiers/etc, overloading, statics, and all that? I mean really, it sounds like the only real "OO" capability older versions had was calling blocks of code a class, and very broken (read: nearly useless) inheritence.

    Without the above it's impossible (or at least a total pain in the arse) to accomplish most of the "cool" stuff in OO such as polymorphism (needs method overriding, and modular design with inheritence (if you don't have "protected" access, you can't take advantage of inheritence without breaking modularity).

    As a side note: holy sh*t, I can't believe earlier versions did call by value with OBJECTS! Talk about a poor design decision.

    Just my rant for the day...

  27. Speed --- Enterprise ready? by NoSuchGuy · · Score: 0

    Which speed? All the comparisons between PHP, ASP, JSP... say that PHP is the winner. For example here.

    PHP5: Ready For The Enterprise? --> I think PHP5 will be ready after the first round of bugfixing of course ;->

    --
    Grundgesetz * 23. Mai 1949 - 30. November 2007 - http://www.vorratsdatenspeicherung.de/
    1. Re:Speed --- Enterprise ready? by Anonymous Coward · · Score: 0

      All the links are dead on that page.

      "It is very important to bear in mind that performance and running speed of the web scripting engine must be given TOP PRIORITY"

      Fucking retarded. When compared to database overhead, a 10% difference in scripting language speed is immaterial.

    2. Re:Speed --- Enterprise ready? by Anonymous Coward · · Score: 0
      if you found a microsoft paper that claimed ASP was faster then PHP, would you believe it?

      Why would you believe a linuxdocs paper that said PHP was faster than ASP?

    3. Re:Speed --- Enterprise ready? by mabinogi · · Score: 1

      Well here's one that says JSP is faster.
      But, then it is from a servlet container vendor.

      --
      Advanced users are users too!
  28. Re:Kiss and say goodbye to Java language!! by essdodson · · Score: 1

    Can't we say the same for ASP? It's compiled, has been for years.

    --
    scott
  29. Re:Still re-coding for register_global_variables.. by FryGuy1013 · · Score: 5, Informative

    um..

    extract($_POST);
    extract($_GET);
    extract($_COO KIE);

    ?

    --
    bananas like monkeys.
  30. Advice & Observation by calebb · · Score: 2, Informative

    Advice:
    The default method of configuring PHP is with the CGI SAPI module (i.e., php.exe); A much better choice (imo) is to configure the CLI SAPI module - all you have to do is build the CLI SAPI .dll (Depending on which webserver you're using - php4apache.dll for Apache, php4isapi.dll for IIS)

    (Also, many websites refer to the two config methods as CGI and SAPI; This is not really correct since CGI *is* a server API. What they really mean is CGI SAPI & CLI SAPI)

    So, why go through the trouble to compile .dll's to run PHP as an integrated CLI SAPI? Performance! This method was officially documented as a stable feature in the December 2002 build of PHP.

    Ok, so you're still asking WHO CARES??? Here's why you care: When you use the '.dll' method (CLI SAPI), much more of the processing work is passed onto the kernel resulting in fewer system calls. A LOT of people complain that PHP is slow & inefficient compared to other webservers, but oftentimes, these people haven't tried the CLI SAPI of PHP! Their point of reference is an ISAPI webserver (IIS) & they are comparing apples to oranges.

    To find out what SAPI you're using, just execute php -v

    Observation:
    PHP adds new functions & deprecates other functions waaaay too often; No wonder people are leery of upgrading!

    1. Re:Advice & Observation by aint · · Score: 2, Informative

      This post has some problems as there is no such thing as a CLI dll... In Windows you have two php.exe binaries, the cli in the cli/ folder, and the cgi in the root php source folder. The CLI WILL NOT work with the web server, it's a Command Line Interface.

      Regarding the DLL, you are referring to SAPI modules, not CLI. And yes, using them is preferred (although depends on who you ask :) but this topic is not related to this thread on the PHP 5 Beta.

  31. XML transformation pipeline by graveyhead · · Score: 2, Interesting

    I have always wanted PHP to have an XSLT based transformation pipeline, similar to what Apache Cocoon has. I would like to be able to write source documents in XML, arbitrarily transform XML into HTML and PHP, interpret the PHP, possibly transform again and finally output the results. I know I could build this top-down from within a single PHP document, but I'd like this pipeline to be a part of the mod_php distribution, with the .XML file extension mapped to the pipeline processor.

    Anyone wanna help me build it?

    --
    std::disclaimer<std::legalese> sig=new std::disclaimer; sig->dump(); delete sig;
    1. Re:XML transformation pipeline by jojo80 · · Score: 3, Informative

      Something like that already exists...it's called popoon and part of the bitflux cms project.

    2. Re:XML transformation pipeline by Dalroth · · Score: 2, Informative

      http://www.interakt.ro/products/Krysalis/

      You can also use PHP as a generator in Cocon.

    3. Re:XML transformation pipeline by Anonymous Coward · · Score: 0

      I did it in binarycloud.com. now it is no longer up to date with the code and probably broken.
      But I will add again it once I have time.

      They already have xml pipelines.
      Just that I was trying to do docbook xml on the fly and that is pretty heavy. probably one of the biggest dtds around..

      Well, join the list if you want to discuss more..

  32. TURCK CACHE Accelerates PHP5 by Anonymous Coward · · Score: 0

    Hi,

    I just installed php5 and installed
    turck cache, too. It works!

    e.g. phpmyadmin works perfect

    But apache benchmark (ab) shows a 15%
    speed-decrease in comparison to php4.3.3

  33. Get a clue by HeadDown · · Score: 1

    > No Java, no JSP man. Simply use PHP for web development. > Forget Java man and go to PHP! > > PHP is 4 times faster than Java technology 'JSP' (Java server > pages). Substantiate that statement. What benchmark, what workload, etc. > This tallies because compiled "C" program is 4 times faster than > Java. PHP scripts are re-interpreted, at runtime, *for every page hit*. They're not C. > Moreover, PHP is getting the object oriented features of Java > language. Yeah, *finally*. Partially. This is the 1st go. Java was designed from the start to be OO, it isn't hobbled on like with PHP. > The real usefulness of Java is 'Java applets' which run on > client browsers but on the server side you simply use PHP. Substantiate. > PHP is a very lightening fast object oriented scripting > language. PHP is 100% written in "C" and there is no virtual > machine as in Java. Nothing can beat "C" language ("C" is a > language which never dies!!) Jeez, moron. What do you think the JVM is written in? > (Java is just another language. The PHP project needs millions > of Java programmers who can add the Java's language features > like inner classes, static, private, protected and others to > PHP. PHP already has some of java' features). > Java programmers will really "LOVE" PHP as PHP class is > identical to Java's class keyword. I use Java and PHP, and I *loathe* PHP. It's single redeeming feature is that it's everywhere. For the rest, it's a language with crappy library support, that actively emcourages mixing the presentation and business layer. > Read the benchmars of Java JSP and PHP. PHP tops in the speed!! Substantiate.

    1. Re:Get a clue by Anonymous Coward · · Score: 0

      PHP: (PHP: Hypertext Processor)

      It's *designed* to mix the presentation and business layers, the only intended purpose is preprocessing HTML/XML. What you read as weaknesses, I see as strengths. They reduce the complexity, reduce the length of the development cycle, and generally make a project much easier to complete.

      If I want a *real* programming language I'll still use Java or Perl.

  34. Re:Still re-coding for register_global_variables.. by codegoat · · Score: 1

    oh sure, make me look like a dumbass.

    Thanks, didn't know that one.

  35. Re:Kiss and say goodbye to Java language!! by HeadDown · · Score: 3, Informative

    > No Java, no JSP man. Simply use PHP for web development.
    > Forget Java man and go to PHP!
    >
    > PHP is 4 times faster than Java technology 'JSP' (Java server
    > pages).

    Substantiate that statement. What benchmark, what workload, etc.

    > This tallies because compiled "C" program is 4 times faster than
    > Java.

    PHP scripts are re-interpreted, at runtime, *for every page hit*.
    They're not C.

    > Moreover, PHP is getting the object oriented features of Java
    > language.

    Yeah, *finally*. Partially. This is the 1st go. Java was designed from
    the start to be OO, it isn't hobbled on like with PHP.

    > The real usefulness of Java is 'Java applets' which run on
    > client browsers but on the server side you simply use PHP.

    Substantiate.

    > PHP is a very lightening fast object oriented scripting
    > language. PHP is 100% written in "C" and there is no virtual
    > machine as in Java. Nothing can beat "C" language ("C" is a
    > language which never dies!!)

    Jeez, moron. What do you think the JVM is written in?

    > (Java is just another language. The PHP project needs millions
    > of Java programmers who can add the Java's language features
    > like inner classes, static, private, protected and others to
    > PHP. PHP already has some of java' features).
    > Java programmers will really "LOVE" PHP as PHP class is
    > identical to Java's class keyword.

    I use Java and PHP, and I *loathe* PHP. It's single redeeming feature
    is that it's everywhere. For the rest, it's a language with crappy
    library support, that actively emcourages mixing the presentation and
    business layer.

    > Read the benchmars of Java JSP and PHP. PHP tops in the speed!!

    Substantiate.

  36. Re: Just use ODBC by Billly+Gates · · Score: 2, Insightful
    For those using a Unix or Unixlike system there is also UnixODBC.

    Problem solved.

    Its better software engineering wise to use layer with ODBC or something similiar to access your database. Changes to your database will not require whole rewrites. Also you can host the database on a different server other then your web one.

    I consider myself an amuture database programmer so feel free to correct me if I am wrong regarding something like ODBC to connect to a remote server. I think Oracle has some proprietary redirector/protocal similiar to ODBC but I have never used it and can not comment.

    Anyway its not a problem and its good on your resume to learn general sql commands and switch between Sybase, postgreSQL, and MYsql rather then hardcode to a specific database.

    I also recommend Interbase if your looking for a great way to learn ANSI sql via odbc. Its free from Borland. PostgreSQL looks cool but it has mediocre WIndows support via cygwin.

  37. Re:Kiss and say goodbye to Java language!! by crunchywelch · · Score: 4, Informative

    Uh, none of those links work, however here is a *recent* comparison of JSP and PHP using several different containers for JSP and PHP. It seems that the server setup has a great deal to do with the speed of the application (duh).

    It's interesting that people like to make comparisons to JSP and ASP all the time but don't remark on what platform they run on. Obviously JSP running on tomcat/apache through with mod_jk will be slower than with just plain Resin.

    And open should note that a statement like ' Kiss and say goodbye to Java language!!' almost sounds like a troll, when you consider Java is used for a great deal more than web applications, indeed the servlet functionality that JSP relies on is a *very* small portion of the overall tools that Java supplies to developers.

    But whatever, use the right tool for the job and try to remember it's technology, not religion. The more options the better IMO.....

    --
    1400x1250 in a 640x480 world...
  38. just installed php5 with turck cache php accelerat by Anonymous Coward · · Score: 0

    And it works. I have not found any bug yet.
    Even my old configure-Script for
    compilation of php 4.3.3 is working to
    compile 5.0.0b, too!

    Turck mmcache - a php-accelerator, encoder
    and optimizer is working, too!

  39. Re:Kiss and say goodbye to Java language!! by Anonymous Coward · · Score: 0

    A benchmark made by completely unbiased people. Whoops, I lied.

  40. Re:Kiss and say goodbye to Java language!! by alannon · · Score: 5, Insightful
    PHP is a very lightening fast object oriented scripting language. PHP is 100% written in "C" and there is no virtual machine as in Java. Nothing can beat "C" language ("C" is a language which never dies!!)
    How did this barely-literate rant get modded up to +2? What difference does it make that PHP is written in C? Java is written in C, and the JIT has some hand-coded assembler in it as well. So what? The HOWTO that is linked to hasn't been updated in 2 years and the benchmarks linked in the HOWTO are no longer even on the web.

    The raw speeds of execution between JSP and PHP may be similar (though I suspect that JSP ends up being much faster once the JIT has kicked in and optimized it, after a few executions). Additionally, there are many different JSP runners (Tomcat is only the reference implementation) and the performance between them can be very large (I recommend the JSP runner by Caucho for performance-critical systems. Besides this, PHP and JSP have a very, very large difference between them:

    PHP is usually run as a apache mod or sometimes, as a cgi. Because of this, it cannot store session state or cache inside of its process (since the process is either apache httpd, or the cgi, which terminates at the end of a page run). To get around this, any session variables get serialized and stored to disk at the end of each run, then un-serialized at the beginning of the request. This also means you can have no application-level caches of database information, since there is no place to put these. This is fine for small stateful sites or large stateless sites, but for any serious, large web application that has to maintain a lot of state, this ends up being a big performance disadvantage.

    JSP, on the other hand, is run from a servlet runner in a persistent process outside of the apache process. At the beginning of the request httpd makes a socket connection (usually a local unix socket, very fast) to the servlet runner and sends the request there. This is slightly more overhead than everything running in-process, but gives you the huge advantage of being able to cache whatever data you wish to inside the servlet runner's process. This means database lookups can be cached, sessions don't need to be stored in disk, timers for maintenance functions can be set, all within the servlet runner's process. This is great for large, complicated web applications but obviously not great for small, stateless systems, since it requires the overhead of a running JVM at all times you want the application to be available.

    Two different types of systems, two different purposes. I happen to use both in my professional web development, but use only java servlets and JSP for serious projects.
  41. Recompile for PDF support? by mgkimsal2 · · Score: 1

    You don't have to recompile all of PHP to get PDF support. Depending on distros, there are a number of precompiled .so extensions that you can use dl() on to load dynamically, without recompiling PHP. You may need to walk through recompiling *part* of PHP to make the specific module from source, but you don't need to recompile the whole thing and reploy it, just enable it because it's an .so file.

    1. Re:Recompile for PDF support? by Zontar+The+Mindless · · Score: 1

      Hell, you don't even need a .so or .dll.

      This is what I use: ezPDF.

      Sure, this is probably not quite so fast as a compiled library, but uploading 2 PHP includes to a webserver is almost certain to be a lot faster than waiting for someone at your client's hosting company to pull their finger out and install php_pdf and/or php_cpdf.

      The ease-of-use factor makes this preferable to PDFLib or cPDF in any case.

      Considered purely as a language, PHP may not be the greatest thing around. I'm a bit disappointed that it seems to be headed in a More-Java-Than-Java direction; some of the new features aren't bad, but the implementations are u-U-ugly. (Personally, I've always thought that PHP would be a great fit with prototype-based inheritance like SmallTalk or JavaScript, but that's another rant.) However, given a little time and ingenuity, you really can do just about *anything* in PHP. And it very well may be that someone's already done it -- all you have to do is look for it.

      --
      Il n'y a pas de Planet B.
  42. Exactly by Anonymous Coward · · Score: 0

    Windows users don't have time to go fucking around compiling everything they want to actually use. Linux users apparently revel in it.

    Or they can go get the binaries for their specific distribution, which are conveniently linked to from the downloads page... oh wait... they're not... not even for the stable/released versions....

    Yes, it does say it all. Windows users can get their work done. Linux users can spend their life RTFM.

    1. Re:Exactly by Anonymous Coward · · Score: 0

      Poor windows users just have to double click to install. No fucking around at the command prompt for them. If only they knew what they were missing.

    2. Re:Exactly by Delphiki · · Score: 2, Interesting

      That's kind of funny, considering the Linux users I know can all get things done. The Windows users I know quite often have to ask the Linux users how to get things done.

      --

      Feel free to mod me "-1 - Angry Jerk".

  43. Breaking MySQL support - what *sses by wytcld · · Score: 3, Interesting

    Considering that I've been a Linux/Apache/MySQL/PHP developer since they each were available, it's just disgusting that they're making it harder to support MySQL at a time when LAMP is a recognized contender against Microsoft. I am not going to fscking rebuild a bunch of sites' dbs and recode MySQL-specific PHP code just because the GPL gives these guys a rash. Certainly when PHP was under Rasmus's authorship and control, he was never this sort of jerk.

    I'm not saying I can't take the trouble to link in MySQL libraries, just that there's no good excuse for the PHP folks to make me - and thousands of others - go to this trouble. They could, if nothing else, distribute their nonGPL PHP, plus a GPL kit that adds MySQL support, if they're too scared that the GPL will give them cooties.

    --
    "with their freedom lost all virtue lose" - Milton
    1. Re:Breaking MySQL support - what *sses by elbobo · · Score: 1

      They haven't broken the MySQL extension, and it won't be any more difficult to support. All distributions will still be able to ship binary packages that link with MySQL. You won't need to compile or link anything yourself, unless compiling PHP is something you like to do anyway.

      Stop being so dramatic.

    2. Re:Breaking MySQL support - what *sses by doe · · Score: 3, Interesting

      Its would mean breaking MySQL's GPL license if PHP bundled current version of MySQL client libraries.

      This because FSF claims that Apache and PHP licenses are not GPL compatible, thus linking against those is not premitted. It does not help that MySQL AB has chosen to change their client library license from LGPL to GPL after release 4.0 of MySQL

      Nothing to do with the PHP development team really.

    3. Re:Breaking MySQL support - what *sses by Anonymous Coward · · Score: 0

      And you, Maam are a jack*ss yourself.

      Not everything in the world is 'Linux' and 'MySQL'.

  44. FREE!! -- PHP Encoder and Cacheing -- FREE!!! by Anonymous Coward · · Score: 5, Informative

    Yes yes.. To sooth all the scalp scratching surrounding PHP and FREE (quality) cacheing and encoding look no futher than

    MMcache - http://www.turcksoft.com/en/e_mmc.htm

    It's only a split second .001 slower than zend (faster than PHP Accelerator) and it FREE! Did I mention it works with Zend Optimizer , Zend Encoder and it can also Encode (protect) PHP files?

    I'm too damn good to you people! ; )


    PS: PHP makes programming fun again. Thats why people like to use it. Simple really.

    1. Re:FREE!! -- PHP Encoder and Cacheing -- FREE!!! by Anonymous Coward · · Score: 0

      APC should be even faster.

  45. APC was committed to PECL by mgkimsal2 · · Score: 1

    and PECL is "The PHP Extension Code Library (PECL)".

  46. Re:Kiss and say goodbye to Java language!! by j3110 · · Score: 1, Funny

    You are so right!

    I don't know why I ever thought that persistant state across a cluster of machines was a good idea. Why didn't I just send queries to the database every single page load?

    MVC is overrated. Struts and Webwork are toys so that developers don't have to do mindless work like design a web page. Taglibs are no match for cut'n'paste of PHP code.

    JDBC's gaurantee of levels of ANSI SQL compliance is stupid, who would want to use a database other than MySQL? Hibernate and JDO are silly; why would anyone want to map objects directly to rows in a database.

    JavaMail API is no match for PHP's mail sending and recieving. Who would want to support both IMAP and POP3 without writing their own code to handle each?

    I can't believe I've been using JSP and Servlets so long that I thought they were fast. No one ever uses many function calls to warrant actually including them in wholistic benchmarks. I know I've never developed anything more complicated than select * or hello world. I'm glad most of these benchmarks use BlackDown as their JRE, because we know a good JIT isn't worth the effort. Though I don't use anything complicated in my scripts, the speed of floating-point math that isn't IEEE compliant is so important, I would have a special section for it in my benchmark.

    I can see all those enterprise level companies that link their inventory, customer relation, warrenty information, and tech support altogether crying because they should have used Personal HomePage for their corperate infrastructure.

    Well, I'm going to go burn all my JSP books now that I can sleep better knowing they aren't useful. All those wonderful 404 links really clued me in to my idiocy. Thank you brave /.er for your help in making me to realize the errors of my ways.

    --
    Karma Clown
  47. You are brilliant. (was Re: Yeah yeah...) by JessLeah · · Score: 1

    You are brilliant. I thought I was the only human being on the planet who noticed (much less GAVE A RAT'S PATOOTIE) that PHP was now controlled by a for-profit entity. Email me some time (jb AT twu DOT net) and I'll gladly host your Web site forever. You rule.

  48. PHP5 Faqts by Bumpy+bits · · Score: 0

    http://www.faqts.com/knowledge_base/view.phtml/aid /22154 Peace

  49. Re: Just use ODBC by Anonymous Coward · · Score: 0

    Also you can host the database on a different server other then your web one.

    Not a problem with most databases except for MS Access...

    http://www.php.net/manual/en/function.mysql-conn ec t.php

    mysql_connect
    (PHP 3, PHP 4 )

    mysql_connect -- Open a connection to a MySQL Server
    Description
    resource mysql_connect ( [string server [, string username [, string password [, bool new_link [, int client_flags]]]]])

  50. Re: Just use ODBC by spencerogden · · Score: 1

    Well, with PHP yes, all of the DB function calls are prefixed with the database type, so either you write your own abstraction layer, or you do a global search and replace. Or you could use perl where the DB type is only mentioned in the connect function, only one place to change for each app.

  51. Does it really matter? by sheldon · · Score: 0, Troll

    I mean considering Windows users already have access to ASP.NET and SQL Server, why would they waste their time with PHP and mySQL?

    1. Re:Does it really matter? by larry+bagina · · Score: 2

      I use PHP + IIS + MySQL + Dreamweaver to test/debug on my local machine.

      --
      Do you even lift?

      These aren't the 'roids you're looking for.

    2. Re:Does it really matter? by Richard_at_work · · Score: 3, Insightful

      Because its trivially easy to code for a apache/php/mysql combination on a Windows system, while the production server is running on linux/BSD. Usually it helps to have a quick and dirty test environment available, and thats where apache, php and mysql on windows comes in. Install it and you have a vastly similar environment to the production box, without going outside the development machine. Ofcourse you then test the code on a live-test server to ensure the cross platform hasnt introduced any obscure bugs, but it rarely does.

    3. Re:Does it really matter? by ymgve · · Score: 3, Insightful

      Cost. Legality.

    4. Re:Does it really matter? by cscx · · Score: 0

      What the fuck are you talking about, "legality?" Seems like the PHP folks are the ones with the legality problem, with this GPL/mySQL snafu. And "cost?" He mentioned that this was assuming you already have the software.

      ASP is easier to configure, more well documented, and faster than PHP. Not to mention that it handles object oriented about 1000% better.

      Plus, the top of this page says so.

      (Three cheers for OSDN sellouts).

    5. Re:Does it really matter? by ymgve · · Score: 1

      No, he assumed everybody could get their hands on that software. Which brings up either the legality or cost issue, depending on which way you choose to aquire the software through.

    6. Re:Does it really matter? by sheldon · · Score: 1

      No, he assumed everybody could get their hands on that software.

      It's a free download.

      Go to gotdotnet.com or asp.net. And yes that includes the SQL engine.

  52. Re: Just use ODBC by Anonymous Coward · · Score: 0
    Er...

    He said database, not MS Access.

    Access is a toy, suitable only for middle managers who think they are too good for Excel.

    Yeugh!

  53. Re:Kiss and say goodbye to Java language!! by sydb · · Score: 1

    No, no, you're meant to be posting to the irony thread!

    --
    Yours Sincerely, Michael.
  54. (-1, Troll, Uninformed, Lame) by Anonymous Coward · · Score: 0

    NT

  55. Re:Kiss and say goodbye to Java language!! by j3110 · · Score: 1

    Actually, I think you mean sarcasm, but it is pretty ironic that less people know the difference now that /. had an article on it. I'm glad I don't read any of the articles!

    --
    Karma Clown
  56. Mysql and ODBC not supported! by Billly+Gates · · Score: 0, Redundant

    Take it all back.

    I looked at the manual and only found this.

    That is not good. This module needs some work and does not look too mature.

    This blows for people like myself stuck on Windows/Mysql bigtime. I also hate using DB specific function calls. ITs poor programming in my opinion that leads to more work later on and vendor lock in.

    1. Re:Mysql and ODBC not supported! by Unordained · · Score: 1

      vendor lock-in -- while i agree to a certain degree ... the fact that we're talking about php kinda makes it that way anyway. it's php. you wrote your code in it. meant to write it in python instead? there's work to be done.

      odbc would be fine -- but the lowest-common-denominator (especially when it doesn't work) really sucks efficiency-wise. you wind up not being able to take advantage of the features a different database back-end would give you, which ... other than straight performance, makes change database systems pointless.

      i'm much more in favor of using a system that knows about the neat things each database knows how to do (that it supports) -- and either emulating that functionality on databases that don't know how, or just telling you to get around it somehow. but at that point ... why not just write code for the database you chose to use?

      choosing a database system, like choosing a programming language, a platform, or any other parameter of software development, is not a choice that you should expect to randomly change. our problem is that management can be easily swayed to use a different database, and less so a different language. different platforms, when there's a choice, is a large problem too.

      i use firebird (the database back-end.) [i get a lot of heat for mentioning it.] it's good, it's fast, it's free. am i locked in? yes. in php, i've used ibase_* functions. i could use older versions of firebird, or even interbase. maybe even newer versions. (i'm still waiting for 1.5 stable.) do i care? no. the software was designed with the intent of being used with firebird -- it's a requirement, not just an option. people using the software shouldn't expect that, just because they like mysql, they should use it. i planned more than just the function calls around it -- the use of generators, transactions, specific sql (regardless of the sql standard, no two database systems support exactly the same sql) ... all make it locked-in, regardless of the function calls i used.

      i've watched my brother port Oracle code to MS SQL Server, because management changed their collective mind. (i am unanimous.) they had used ODBC -- but it still took work. later, they needed the system to work with either database: at that point, you wind up still having to write with two different codebases, switching back and forth -- odbc itself won't fix that problem. and once you have that ... you might as well have used the specific libraries to start with.

      maybe if people respected standards ...

  57. not bad by Anonymous Coward · · Score: 0

    though I liked this language a lot better when it was called Java and had organized class libraries...

    on the other hand PHP is good for quickies. Smarty is pretty handy too though I've grown rather attached to the simplicity of Perl's HTML::Template (CGI::XMLApplication is another one to keep your eye on).

    It's great to have choice, whatever the case.........

  58. Mason and Perl by Michael.Forman · · Score: 0, Offtopic


    Not to be a troll but I thought this would be an excellent opportunity to mention Mason for those of you who use PHP but are more proficient in Perl. All my previous web development has been performed in PHP, however, recently I've started to use Mason/Perl.

    Mason/Perl provides similar functionality as PHP using in-line constructs such as "<%perl> $perl = goes($here); </%perl>", "% $perl = goes($here);", "<% $variable %>", and "<& function.html &>". Its modularity has allowed me to create a dynamic website coded completely in Perl! It provides all the power of Perl, combined with the convenience of in-line PHP, and adds a new level of object-oriented modularity.

    Not that I didn't enjoy PHP, it's just that I always felt like I was coding with one hand tied behind my back. If you like Perl, check out Mason.

    Michael.

    --
    Linux : Mac :: VW : Mercedes
    1. Re:Mason and Perl by LibrarianAvenger · · Score: 1

      On that note, the Internet Public Library was created using Mason. Site content is edited by a rotating cadre of library students.

  59. Pining for the Fjords! by fm6 · · Score: 2, Funny

    I don't know whether to flame you or thank you for leaving "hl=no" in that URL. I guess I should thank you, since figuring out why Google was assuming I was Norwegian was very instructive!

  60. PHP 5 Documentation update by aint · · Score: 4, Informative

    PHP 5 isn't really documented in the PHP 5 manual yet as there are still a few features on the move, and new features to come, but here's a list of PHP 5 related articles and presentations:

    Faq: Where can I get more information about PHP5?

    Enjoy!

  61. Hehe. You've been trolled! by TheRaven64 · · Score: 1
    Reading your post, a strange feeling of familiarity swept over me. It was as if I'd read the post to which you were replying before. Then it hit me. I had. The last time a PHP article was posted on /.

    Yes my friend, you have been caught feeding the trolls.

    --
    I am TheRaven on Soylent News
  62. Re:Still re-coding for register_global_variables.. by Artifex · · Score: 1

    You don't have to move to PHP 5, if an earlier version does the job the way you want it to.

    Just like for any other piece of software: if you don't see something new worth any potential upgrade fee or hassle in converting your stuff, don't do it.

    --
    Get off my launchpad!
  63. Re:Kiss and say goodbye to Java language!! by Anthony+Boyd · · Score: 4, Interesting
    PHP is 4 times faster than Java technology 'JSP' (Java server pages).
    Substantiate that statement.

    Hey HeadDown. You're right to take the guy to task, s/he made some crazy comments. But I can at least partially substantiate speed issues. Back in 2000, I worked with Sabeer Bhatia (the Hotmail guy) on a startup called Arzoo. Our product (a Web site similar to epinions) was almost 100% Java, except for a bit of Perl for screen-scraping and searches. But anyway, it was slow -- first with Tomcat, then with JRun. At one point, we gave a private preview to 1,000 journalists. They didn't even visit the site all at once, they trickled in over the course of 3 days or so. Just that was enough to hammer the site. We ended up running cron jobs that would reboot the farm, round-robin, just to solve memory issues and instability.

    Now, you can say, well, that was 2000! Try it now! OK. At SST, we have a team that is using Tomcat now. Although the instability is gone, the speed is still an issue -- they have wait screens as you click through the app. My team is working with PHP, and has no wait screens, and no need for them (with 1 exception). Our pages are actually more computationally stressful than the Java stuff, yet PHP is delivering the result to the browser faster.

    As a final point, you might suggest that the teams I've worked with do not understand Java or how to run it well. It's no skin off my back if you make that argument -- it's not me doing this stuff, so no blow to my ego. But I think working with 2 different teams over the course of 3 years says something. Perhaps, at the very least, if Java really can handle a bigger load, it is so difficult to tune that mere mortals would do better with PHP.

  64. Both by Delirium+Tremens · · Score: 2, Informative

    Both will win.
    The latest news from Sun is that J2EE 1.5 will support scripting languages. And the reference implementation will be done in PHP.
    If you don't believe, check some of the news site reporting on JavaOne 2003.

  65. Re:Kiss and say goodbye to Java language!! by RoLi · · Score: 1
    Hi!

    I am a PHP programmer and have programmed some Java some years ago. I do PHP almost exclusively now, but I always liked Java and I am thinking that maybe JSPs may be worth a look.

    So although I currently don't feel an urgent need to switch and will definitely have to maintain PHP code for the rest of my life (probably ;-), I'd like to play a bit with JSP, especially because Java is so universal (runs on servers, browsers, desktops and embedded systems)

    What tools do you use/recommend? (What servlet engine, just an editor or a RAD-tool?)

    The way I see it, a servlet engine is more or less a JVM that puts the (standard?)output of a Java program to the webserver/browser, is that correct? (A short browse on the Apache Tomcat page could not answer that very simple question)

    Thanks a lot for answering that questions.

  66. PHP fragmentation, lack of cohesion by theolein · · Score: 4, Insightful

    I've been using PHP since the 3.0 days and always loved it's speed in development for small dynamic sites. There is truly nothing simpler (IMO) for small sites. Why on earth did PHP ever become so popular as compared to Perl/CGI? It was the simplicity.

    Most people accepted the changes from PHP3 to PHP4 without complaining as PHP4 brought simple session support and other needed features. Thousands of developers wrote scripts for small pages and uses, and those scripts got placed on help sites etc all across the web.

    The changes above 4.06 where register_globals got turned off by default and -from a simple beginners point of view- to 4.2 where a stunning array of new arrays were added for sessions, post and get variables. Those things broke almost everybodies scripts, and all those thousands of scripts across the web no longer worked as is. Due to this a lot of ISP's no longer upgraded regularly.

    At the same time PHP started jumping on the "web application" gravy train, something for which PHP with it's awkward OO support (no automatic calling of parent constructors etc), lack of stateful session support etc was not designed to do. The makers of Zend decided to go the whole hog and redo OO support, add hundreds of seldom used features but ignore problems with backward compatibility and language simplicity.

    Congratulations. Now we have a language that is slowly matching JSP in complexity (as all the 1337 "application developers are saying"), is nowhere nearly as well integrated in in true web applications as JSP is (great, it can support Java classes, how many will simply use Java then?) and is leaving the roots of it's enormous success behind.

    Take a lesson from Perl's "failure" in web site popularity. Don't keep on adding features for the love of it.

    1. Re:PHP fragmentation, lack of cohesion by aint · · Score: 2, Insightful

      BOGUS.

      First of all, the superglobals you speak of were introduced in PHP 4.1.0 not 4.2.0, and register_globals was turned off by DEFAULT (default being the keyword there) as of PHP 4.2.0, not 4.0.6. And this is not the reason why ISP's don't upgrade as configurations can be changed. This is why announcements announce these changes, why ./configure mentions it, and why it's so heavily documented. This is also why PHP has a file named php.ini

      Regarding complexity, the new PHP 5 features are OPTIONAL, you do NOT have to use OOP at all. It's your choice. You, the user, are given choices, so it's up to you to use whatever you want. The backwards compatibility remark is funny as a typical member of the PHP-DEV team is very aware of BC and tries abnormally hard to keep it. There is even a PHP 5 directive named zend2.implicit_clone to help out with these ZE2 changes.

      Basically, this post is silly and the "insightful" rating is bogus. Your typical naysayer hard at work.

    2. Re:PHP fragmentation, lack of cohesion by OzRoy · · Score: 2, Informative

      Actually if you go read that OOP page properly you will see that they added a lot of features needed to be a proper OO language. In every case they said "If you don't use this feature, the old method will be used". As far as I can tell this keeps compatability.

      As for the new arrays that appeared in newer versions of PHP that broke everyone's scripts. It's a simple configuration change that will revert PHP back to the old methods while you change your scripts to get them working again.

      Those new arrays ARE necessary. The old method of getting your form data is badly insecure. They explained all this, and gave example code as to why the old ways were bad. I believe it went something like this:

      if (isAuthenticated()) {
      $authenticated = true;
      }

      In that example $authenticated would Never be set using a form. But, if register_globals is set to on, all a person would have to do is pass a 'authenticated' parrameter to the script and they have instant access. Yes it's a pretty stupid thing for a programmer to do, but these things do happen. I think everyone should be FORCED to upgrade to the new version.

      PHP is Still simple. You can still write the basic code you want to write, but it now gives us the functionality we want to make really powerful scripts. At least I know I want them. I will use 90% of those new features as well. As far as I'm concerned these changes are LONG overdue and it's about time PHP caught up with the real world.

    3. Re:PHP fragmentation, lack of cohesion by OzRoy · · Score: 1

      I would just like to say now that I have now installed the PHP5 beta on my machine.

      A script I am writing that uses A LOT of OOP and was written for PHP4 works perfectly.

    4. Re:PHP fragmentation, lack of cohesion by brrrrrrt · · Score: 0

      It's nice for really oo minded people that they can now feel at home in php with all the new keywords and protection and 'type awareness' stuff added (I liked that last new word particularly :) I for one am very pragmatic about it. Use oo when it improves meaningful architecture of your app, improves reusability etc., but not for the sake of it. (Like for instance Java forces you to do) Mostly, structured programming (sequention, alteration, iteration) will do the job. Especially in web applications. (I daresay) Especially in simple web applications. And you can still do that. You don't have to use complex oo ways of programming, oo design patterns and the like. You can just program in whatever way you like or are used to. I hesitate to say it :) but there's more than one w... well you get it. What do you mean PHP is leaving its roots behind that have made it so successful? PHP is versatile, baby! Go ahead, use your php4 scripts under php5, I'll be surprised if it's any of the new Fancy Web Application Stuff (tm) that breaks them.

  67. Re:Kiss and say goodbye to Java language!! by sydb · · Score: 1

    I'm using definition 1a of irony.

    --
    Yours Sincerely, Michael.
  68. Re:Vlad to the Bone by Anonymous Coward · · Score: 0

    I liked it best when Vlad had shut the fuck up, and the AV3 had also shut the fuck up.

  69. Suck on my chocolate salty balls c37cbf19d78d3acb1 by Anonymous Coward · · Score: 0

    Propaganda Lies Bullshit Fake News Vast Right Wing Conspiracy Yellow Journalism

    Scientology Scientology Scientology Scientology Scientology

    anusfeast

    b2dc43f5ceef31610d294fa01c6e7399baf24e5f9fc18cf5 81 72d1ba745f0f7a35df583a06ef378df8540f6db2d365348811 ab1e29e1cddf52e115f18ee1a177b180bd9c2d0748cbd912ad e1824b92289d268fd9108dd0602490376aa0e80a094388a23d a67b154b780b78dd7ea4636eb54a8624845ace42c46005feb5 81f80485b2bd671a52ed89dcb803718638f36717fa420c99b3 094dcacdf8677789c9836ef8783d73140a616fc3d27d7330d5 03a8c5a73459631beb2cbe6af3c74628e8ca508b71f8e81b9b a5c419e9b31cc2ef21eb2cde1194b85163cbd079f5962edf69 e70e2b36b5970344e5c920495558b88a5d3252ac7f91b6710d 72d2042a0dbfc0860b41c371f148d86287af8a1450acc1060a 593450737d254ce9eacbd0e9923ea208da4ace14c5b51fd707 7d8d5b54

  70. PHP = moving target by dorker · · Score: 0

    I'm PHP. I want to be an OO language now.

  71. 'register_globals' considered evil? by Moses+Lawn · · Score: 1


    The only major compatibility issue that I can think of between, say, the 4.1 branch and the 4.3 branch is that register_globals defaults to 'Off' in newer versions. If you leave it that way after installing, then yes, a lot of older scripts will break. Most of the shared/virtual hosting providers I've had to do script installs on, which have actually upgraded their PHP versions, just installed 4.2x or 4.3x and then manually turned register_globals back to 'On' in the php.ini file.


    Isn't 'registered_globals' a gaping security hole? As I understand it, it automatically turns all incoming page variables into global PHP variables, leaving you open to all kinds of nasty shit. It's not that harder to look in the POST[] and GET[] arrays for your parameters; in fact, it's just good software engineering.

    It's like not saying 'use strict' at the top of all your Perl scripts (for different reasons) - you're just asking for trouble in anything like production code. If I don't see attention to details like that, I know I'm dealing with amateur code, or at least someone who hasn't been doing this long enough to get bit yet.


    I agree at the surprising number of hosts who simply haven't updated, though. There are a lot of hosts still running 4.1x, and even (yikes) 4.06, who just won't upgrade for whatever reason. I do most of my coding these days on 4.2 or 4.3, and have run into plenty of belligerent hosts who refuse to upgrade from a two-year-old release. Typically I just have my clients move to a better host; the providers who don't stay reasonably with the times will eventually figure out that it's hurting their bottom line.

    Like others have mentioned, this is not how the ISP is looking at it. They're not likely to upgrade something that works just fine (aside from security fixes) and breaking it for all their users just so one user can have a useful new function. That's not belligerent, that's just good business. I agree, it can be frustrating, but having seen one too many "simple upgrades" that totally screwed the pooch, I'd rather take the conservative approach.

    --

    What if life is just a side effect of some other process and God has no idea we exist?

    1. Re:'register_globals' considered evil? by Anonymous Coward · · Score: 0
      Isn't 'registered_globals' a gaping security hole? As I understand it, it automatically turns all incoming page variables into global PHP variables, leaving you open to all kinds of nasty shit. It's not that harder to look in the POST[] and GET[] arrays for your parameters; in fact, it's just good software engineering.


      I recently took a look through the scripts of the web development company I work for, and discovered that about 1 in 5 scripts had a security hole - including things that would let you, e.g., delete their entire database. All these were down to register_globals.


      Unfortunately, that is also precisely the reason they don't want to upgrade. They would have to go through 1000s of scripts replacing all their global variables from POST and GET with secure versions. Hence they stay with nice easy 4.1, and endanger their security.


      Pfft.

    2. Re:'register_globals' considered evil? by Azghoul · · Score: 1

      Maybe you can explain the issue to me a little more clearly...

      Say I have a form var named "bob". On the PHP on the other side of the submit button, I can do

      mysql_query($bob) ;

      or

      mysql_query($_REQUEST["bob"]) ;

      Just switching over to an array of vars instead of 'instant globals' isn't by-and-of-itself any more secure, is it?

      I'm genuinely curious... :)

    3. Re:'register_globals' considered evil? by Taurine · · Score: 1

      You need to consider the side effects of creating those globals. The globals that are created mirror every item passed in the GET or POST request. That means you can add things that were not in the form to the globals. If an attacker had seen the code, he might find some crucial use of a variable, that may not have been given a value.

      For example you loop on a variable, and the first time you test for it being unset and behave differently? The attacker could set an initial value for the variable just by appending it to a GET URL, and your code would behave very differently to the way you intended. If instead you only interact with the values passed in the GET or POST request through explicitly naming them to index that array, you are that bit more secure.

    4. Re:'register_globals' considered evil? by Azghoul · · Score: 1

      Ahhhhhhhh *bing* -- light went on.

      Thank you, makes perfect sense.

    5. Re:'register_globals' considered evil? by Moses+Lawn · · Score: 1


      I recently took a look through the scripts of the web development company I work for, and discovered that about 1 in 5 scripts had a security hole - including things that would let you, e.g., delete their entire database. All these were down to register_globals.

      Unfortunately, that is also precisely the reason they don't want to upgrade. They would have to go through 1000s of scripts replacing all their global variables from POST and GET with secure versions. Hence they stay with nice easy 4.1, and endanger their security.

      Sadly, I'm afraid this is not an unusual situation. It's a direct consequence of having a cool feature (CGI variables are automatically made into local vars! Wow!) added by the original developers for no other reason than "it's cool". It's a perfect example of putting things into the language without thinking through their consequenses.

      I hate to say it, but the PHP people fucked up. In this day and age, a misfeature like this should never have been allowed to happen. It's like writing an app today that reads user input into a 80 character buffer. Now we're stuck with the consequences.

      PHP developers: Bite the bullet! Turn off register_globals and pick up the pieces! The only thing you have to lose is your exploits. Well, that and some time.

      --

      What if life is just a side effect of some other process and God has no idea we exist?

  72. Re:PHP still around? by Anonymous Coward · · Score: 0

    Thank you for your opinion, Mr. Gates

  73. O.O by E_elven · · Score: 1

    Mm. The only thing lacking from PHP has been proper OO support.. now that has been rectiied. To think I was even considering Python as an alternative because of its only slightly less horrifying OO model. So Python for scripting and PHP for the web.. that's how it's supposed to be. Now I can sleep again.

    --
    Marxist evolution is just N generations away!
  74. PHP5 toghether with PHP4 by Stackster · · Score: 1

    I'm currently running PHP 4.3.2 on Apache 2.0.45. I would really like to try out php5 without messing up php4 (to see what needs fixing before upgrading to the "real" php5, whenever it is released).
    I got my libphp5.so compiled and all, but is there a nice&easy way to tell Apache to use it for files named .php5 (for instance), and the old version for .php? I could have two separate LoadModule lines (in httpd.conf), but I can't tell them apart in AddType.
    I'd really like not having to run a second httpd (on another port)...

    --

    There are 010 kinds of people. Those who understand octal, those who don't, and 06 other kinds of morons.
  75. PHP, the new "Camel" by eLoco · · Score: 2, Funny

    If PHP had an official mascot the way that Perl has the camel, I'd recommend they swap since PHP looks more like a "horse designed by committee" every day.

    --
    sig != null
  76. So, does it work properly with Apache 2.x yet? by smash · · Score: 1
    Last I heard, PHP 4.x still has broken session support with Apache 2.x.

    Any ideas if this has been fixed?

    smash.

    --
    I run: Windows, OS X, Linux, FreeBSD. Just because you have a hammer, doesn't mean everything is a nail.
    1. Re:So, does it work properly with Apache 2.x yet? by Anonymous Coward · · Score: 0

      Last I heard, PHP 4.x still has broken session support with Apache 2.x.

      Any ideas if this has been fixed?


      I run Apache 2.0.45 w/ PHP 4.3.1 and it's all groovy.

  77. Correcting you... by NineNine · · Score: 1, Interesting

    Oracle has has ODBC support for as long as I can remember. Also, if you're using Windows, it's better to use OLE DB since you then remove an entire layer for better efficiency.

    And, SQL isn't anything close to all that a real database (ie: Oracle, DB2, etc.) has to offer. Amateur programmers often completely overlook an entire layer: stored procedures. Mature databases (ie: Oracle as opposed to MySQL) has a very robust native programming language in which the code is compiled and cached in the database, making it often the best way to add business logic. (Note: whitepapers say to use some bullshit middle tier like CORBA or COM which just doesn't fucking scale, no matter what the "experts" say). The best thing that an amateur developer can understand is that something like Oracle or DB2 is a very very mature product which screams compared to any middle tier bullshit. Learn PL/SQL and REALLY build your resume.

    Note: This post was written by a former Oracle Certified Developer who got paid MAD cash in the day to write web apps.

    1. Re:Correcting you... by cscx · · Score: 1

      Oracle's OLE DB driver for Windows sucks major balls, I've used it. Needed the LOB support, and boy was it hell.

      Things were nice and fast after I finally got it working, though. This was with classic ASP; transactions were almost instantaneous.

    2. Re:Correcting you... by Desert+Raven · · Score: 1
      Oracle has has ODBC support for as long as I can remember.


      And anyone who has ever touched them has always regretted it. Oracle's native drivers are good, and allow you to do some pretty cool things. But, their ODBC drivers are pure shite.

      Mature databases (ie: Oracle as opposed to MySQL) has a very robust native programming language in which the code is compiled and cached in the database, making it often the best way to add business logic.


      True, but Oracle's implementation still is a bit wonky. Oracle's stored procedures (until very recently) would not let you return entire result sets. I found Transact-SQL (Sybase and MS) to be a far more robust and flexible solution than PL/SQL.

      Also, Oracle's SQL syntax is significantly non-standard in a few areas, especially WRT joins.
    3. Re:Correcting you... by The_DOD_player · · Score: 1

      Stored procedures are not all that great. MySQL often outperform MS-SQL using Transact-SQL. I know, I've tried it.

      Also, in a recent project we have been using vast amounts of stored procedures to do things, that would not have been an issue with better database design. For example:
      Using one varchar(date) and two ints(time) to describe a period of time.
      Oh yes, stored procedures sure was handy for all that converting, checking if time2 was smaller than time1, yet more converting, some (time1 mod 100)*1.6667 to get the minutes etc etc.... But it would have been far better just to use two datetime's.

      Lots of people use stored procedures in lack of understanding of SQL, and thats a shame. SQL is much more powerful if you can avoid "procedural" behaviour.

    4. Re:Correcting you... by NineNine · · Score: 1

      Oracle's OLE DB driver for Windows sucks major balls, I've used it. Needed the LOB support, and boy was it hell.

      I agree completely. You pertty much have to use MS's Oracle for OLE DB Provider. Oracle's versino has always sucked. Hell, their implementation of it even has a couple of parameters switched when you're passing parameters to a stored proc! It took me a long time to figure that one, since it's not documented. But MS' Oracle drivers are at least acceptable.

  78. What's up with those OO examples?? by Moses+Lawn · · Score: 1

    Is it just me, or are a lot of the examples from this page really confusing and unenlightening? I can understand most of it, but the examples for __get(), __set(), and__call() need some work.

    __get() makes sense, checking to see if there is a value before returning it, but __set() looks like copy-and-paste of __get() that didn't get finished. It checks to see if the value is already there, then sets it, otherwise -- declares an error? The example usage afterwards refers to non-existent member variables, but not to the things it's supposed to be demonstrating.

    The example for __call() is even more confusing. It looks like it's supposed to be a wrapper (for some reason) around a direct method call, but it doesn't refer to to the method that was passed in, and the usage is completely unrelated.

    I assume these are just typos made by busy people, but it *is* an official page attempting to derscribe the new features of PHP 5.

    I also wonder about the implications of the scoping rules. It looks like references to private or protected members are ignored? return null? That's nice, but is it good language design?

    All in all, it looks like there are going to be really good things happening in PHP. I personally wish they weren't going in the Java syntax direction (not only do I not care for Java, but if you're going to borrow syntax from another language, you have to be consistent or you wind up confusing programmers of both languages), but hey, it's not my decision and it seems to work. It's a lot better than before - yay for being able to do func() -> method()!

    --

    What if life is just a side effect of some other process and God has no idea we exist?

    1. Re:What's up with those OO examples?? by You're+All+Wrong · · Score: 1

      "__set() looks like copy-and-paste of __get() that didn't get finished"

      Ah, welcome to the heady world of "code reuse" ;-)

      YAW.

      --
      Your head of state is a corrupt weasel, I hope you're happy.
    2. Re:What's up with those OO examples?? by You're+All+Wrong · · Score: 1

      What's up with them? They're written by complete fucking idiots. (And I rarely swear.)

      They're so fucking stupid they don't know what "overloading" means.

      The "Overloadable Method calls and Property accesses" is *_NOT_* anything to do with overloading - it's to do with _overriding_.

      I bet you they've never even heard of the LSP either.

      This language is turning into a complete crock. It's written by people who haven't got a clue about how languages work. Anyone programming in PHP5 and claiming that they've programmed "OO" is seriously deluding themselves. They'll have a nasty shock when they meet other OO languages.

      YAW.

      --
      Your head of state is a corrupt weasel, I hope you're happy.
  79. My criticism of not supporting Legacy. by Anonymous Coward · · Score: 0

    Sure, killing the previous software seems like a logical conclusion. As my post suggested, I am quite disappointed that initial software design is considered to be The Future(TM) in essence of compatibility. As was the problem with supporting the USB host adaptor in some Other(TM) operating systems, and a major overhaul was necessary.

    I like to look at software as the way Jesus Christ(R) explained in his Parable Of The Wine Bottles(TM). I can't offer a summary of his parable, as it would not do any Good(TM) to be partial; whoever in need should read it. As blasphemous as using old software ontop of new software may be, they seem to never build it to be forward or backwards compatible.

    And I tell you; Jesus Christ is one great Software Developer(TM).hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhh

  80. Re:Still re-coding for register_global_variables.. by amanpatelhotmail.com · · Score: 2, Informative

    even better: (add to .htaccess file to your codebase directory) php_flag register_globals On

  81. Re:Kiss and say goodbye to Java language!! by OzRoy · · Score: 1

    I would also like to add that PHP IS A virtual machine as well.

    If you are not compiling your code down to a machine executable then you need to have an interpreter. In the case of Java they call it a 'Virtual Machine'. PHP runs the same way and thus must also have a 'Virtual Machine'.

  82. Re:Still re-coding for register_global_variables.. by smagruder · · Score: 1

    The quickest fix of all: Create an .htaccess file in your web root directory with a line "php_flag register_globals on". Of course, this should be viewed as a workaround while you rewrite your scripts to work with register_globals off.

    --
    Steve Magruder, Metro Foodist
  83. php drawbacks by mlong · · Score: 1

    I use PHP quite a lot and my biggest gripes are: 1. No easy way to do modules and extensions. With Perl I can use CPAN, load it right in, etc. With PHP I got to recompile PHP, and then recompile Apache. I haven't looked into PEAR but last time I looked it was still a headache. 2. For ISPs, there is no SUEXEC support for the Apache module. This creates all kinds of security holes and permission nightmares. 3. Some modules seem to be a moving target (like the socket/steams) and as already mentioned here there is little regard for backwards compatibility. You almost have to go read the user notes for each function you use to find out how it works on the various versions. With all that being said I still love it for doing web stuff. I use Perl some too but prefer PHP for web apps.

    --
    //m
    1. Re:php drawbacks by rycamor · · Score: 1

      1. If you install PHP as an Apache module, you don't have to recompile Apache. And, there are two other very easy ways of loading extension modules without even recompiling PHP: a) call the extension inside the php.ini script (so all you have to do is restart Apache), or b) use the dl(extension) function to dynamically load the module inside your scrip, in which case you don't even need to restart Apache.

      2. true, but probably not a major deal to fix, if enough people cared. Unfortunately, the average ISP is stunningly clueless about security anyway.

      3. Socket/streams are a moving target because they are *still in development*, hello... (Not for production use). Otherwise, yes there were some unfortunate changes in certain functions, but hardly on a massive scale. 99.9% of the problems with ISPs upgrading to find "all scripts broken" had to do with the simple, stupid question of register_globals, and those ISPs could have fixed that by changing exactly three bytes worth of data in php.ini (setting "off" to "on").

      Have I mentioned how clueless I consider most ISPs? Never mind...

      Not that I think PHP is perfect. My gripes with it have been in the area of inconsistent OO support, and lack of namespaces, as well as somewhat ugly scoping rules (I wish it had the "my" keyword, like Perl). I hope that PHP 5 will fix most of these, although apparently namespaces will not be included in the first release :-(.

    2. Re:php drawbacks by h3 · · Score: 1


      With Perl I can use CPAN, load it right in, etc. With PHP I got to recompile PHP, and then recompile Apache. I haven't looked into PEAR but last time I looked it was still a headache


      pear install some_package

      This method has been in the default install as of 4.3 I believe. PEAR has been around a bit longer, of course.

      -h3
  84. REGISTER_GLOBALS and why fixing is not fixing by theolein · · Score: 1

    I wrote in another post further down about the problems being incurred as PHP attempts to become all things to all men (and women). From CGI through Apache and IIS module through to commandline scripting tool a la the many other languages that already exist there. All this is fine and I've used PHP successfully from the development of small dynamic websites through commandline scripts on windows to return lists of files on a server and move them if needed through to a massively complicated "web application" called Ariadne -http://www.ariadne.nl that turned out to be so overly complex for no obvious reason that I wasted months trying to figure out how it worked (Java would have really been simpler and cleaner for that one).

    But what alwaqys got me was the argumentation behind the decsision to turn off register_globals by default. (This is also partly a repsonse to another post further down) The logic went that variables could be spoofed by an end user in order to gain access to "private" data as the variables are automatically created by PHP. I'm by no means an expert on security matters, but AFAIK there are different approaches to security in a language. One is security by design as it exists in Java (and by all accounts works extremely well), another is security in the actual software design. This means in php that you don't use the same php file for all your sensitive database connect statements and front end html output for example and that you don't use things like if ($goodboy) OpenForBusiness(); etc.

    Chopping off this only served to irritate web scripters and only marginally improved security because most scripters simply turned the auto variable creation back on and security by limiting features is not an answer IMO. You can still crack that $HTTP_POST_VARS[goodboy] or $_POST[goodboy] by bruteforce methods if you think you have something to gain by this.

    If I understand this completely wrong please correct me, but I simply see php as becoming another Perl and we already have that.

    1. Re:REGISTER_GLOBALS and why fixing is not fixing by Synn · · Score: 1

      You add the following line to your php.ini file:

      register_globals = On

      And your globals will work just like they used to. Turning the above off by default prevents tech magazine reviewers that can't code from saying how insecure the language is.

      It also keeps newbies from shooting themselves in the foot.

    2. Re:REGISTER_GLOBALS and why fixing is not fixing by Anonymous Coward · · Score: 0

      If the PHP people had half a brain, they would have never had register_globals to begin with.

      This was "fixed" because realworld OSS PHP apps were gettting hacked left and right, and PHP was getting a terrible reputation. Note how no comments say "PHP has terrible security!" -- and thank the lack of form globals for that. Call it plausible deniability.

    3. Re:REGISTER_GLOBALS and why fixing is not fixing by aint · · Score: 1

      The point isn't that the data is insecure, or that turning it off will magically make scripts more secure, but the point is users can write code with no clue where the variables are coming from, and this is especially dangerous for newbies. How many newbies initialize variables? Or even validate request data? Not very many. One can write insecure code with it on, and insecure code with it off. And secure code with it on or off. Also turning it off makes your PHP consume much less memory from hundreds of variables that you'll never use.

      You should read this:
      http://www.php.net/manual/en/security.registerglob als.php

      You don't really understand the true argument for the change, or how difficult of a decision it was.

    4. Re:REGISTER_GLOBALS and why fixing is not fixing by theolein · · Score: 1

      I see your point but still don't agree that that was the right approach. Why wasn't it fixed in that the overwriting of preexisting variables was disabled or something along those lines?

    5. Re:REGISTER_GLOBALS and why fixing is not fixing by aint · · Score: 1

      It doesn't overwrite existing variables, which is why inializing variables is a good thing. register_globals is only dangerous to poorly written code, which sometimes newbies like to do.

  85. MOD PARENT DOWN! TROLL! by vt0asta · · Score: 1

    Intelligent answers deserve intelligent questions.

    I mean seriously...are you stoned? What is your point?

    Ever since the Model T... cars have had engines. But to hell if you'll be able to easily get a modern Ford engine to work in that old Model T. I mean thats an example of a something (an engine in this case) not being backwards compatible. It still does the same thing. Maybe they shouldn't version engines anymore, just call them something else.

    Today engines can have turbo chargers, enhanced emission controls, variable valve timings, direct port fuel injection, etc. Drastically different and definitely not compatibily with older cars. However, they still make the wheels on the vehicle go round. They deserve to be called engines, regardless of the variations or enhancements or complete swapouts of thier subsystems.

    Original design goal of the early engine was NOT fuel effiency, was NOT low noise, was NOT long life, was NOT lower emmisions. It was to help make the wheels go round.

    Realize the end user names are not for your benefit as a scientist, engineer, or some BSing PHP/Perl programmer to recognize significant changes in implementaion. The are used as an identity for that project. End users can say, "oh, I have windows 98...here is a windows 98 compatible program. I can run this."

    I seriously doubt your parents design goals for you were PHP/Perl programmer, or even anonymous coward. They probably gave you a name along the lines of Jack MeHoff, maybe even with similiar design goals.

    --
    No.
  86. "Public performance" by yerricde · · Score: 1

    There's no such thing as "public performance" in software copyright law.

    Let's break down the definition of "public performance". According to 17 USC 101, "To 'perform' a work means to recite, render, play, dance, or act it, either directly or by means of any device or process". I'd assume that running a program would be considered "act[ing] it ... by means of [a] device".

    The same section defines "publicly": "To perform or display a work 'publicly' means - (1) to perform or display it at a place open to the public ... or (2) to transmit or otherwise communicate a performance or display of the work to a place specified by clause (1) or to the public, by means of any device or process". From the statute, I reason that opening up a public web interface to a program constitutes performing the program publicly, which is the copyright owner's exclusive right under section 106.

    In addition, even if this public performance angle doesn't hold, the DMCA's circumvention ban may make EULAs into binding contracts because it's impossible to gain access to the copyrighted compiler without going through or around the access control mechanism known as the installer's EULA screen. Contract law typically requires an offer, an acceptance, and consideration to create a binding contract. OFFER: the displayed contract. ACCEPTANCE: "I Agree". "CONSIDERATION": Microsoft authorizes decryption of the cab files; the user sells his soul.

    Now that I've shown the statute, do you have case law to back up your position?

    --
    Will I retire or break 10K?
    1. Re:"Public performance" by Anonymous Coward · · Score: 0

      106 (4) : in the case of literary, musical, dramatic, and choreographic works, pantomimes, and motion pictures and other audiovisual works, to perform the copyrighted work publicly;

      Computer programs are none of the above. YHL. HAND.

  87. Re:Yawn ???? by dekashizl · · Score: 1
    Software design is unlike most every other discipline in the world. Your job is never finished until the product is dead. There are always bugs to fix, inconsistencies to remedy.
    What are you basing that on??? If a good software engineer has clearly defined goals, executes intelligently and gracefully, and provides abundant documentation, then the job is finished. Period. Contract fulfilled, product delivered, payment received. Done.

    The only reason your statement is even partially true is because there are so many shitty "programmers" out there who can't even understand the code they write themselves and feel lucky any time something works, or pull out their broadsword to fix random problems that pop up and then pile crap on crap.

    In summary:
    • True: when the product is dead, your job is finished.
    • But when your job is finished, and the product dies, then you obviously suck, and how did you get the job in the first place?
  88. Some more links by Anonymous Coward · · Score: 0
    Found these while looking for info on PHP and MySQL. One of them also explains how to get the library compiled again in UNIX (but not in Windows... sigh)

    http://blogs.phparch.com/mt/archives/000014.html
    http://blogs.phparch.com/mt/archives/000019.html
    http://blogs.phparch.com/mt/archives/000024.html/a .

  89. About Languates by screenrc · · Score: 1
    Languages don't really have spccific goals. They provide tools so the programmer to deal with syntax and semantics, but specific goals? No, certainly not for general purpose languges.

    What is the goal of English?

    What is the goal of Perl?

    As you can see there is no specific goal other than the general ability to communicate with the computer. And as any human language, programming languages should have the ability to evolve with the times as progrmmers aquire new habits and tastes. Languages are designed to serve the programmer. If a language stay loyal to their own goals, its speakers ( the programmers ) will begin to evaporate. Adaptability and change of goals is a very important ingredient to the language. This is certainly true for perl.

    You will find more info about languages in Allison's article at www.perl.com Perl Philosophy .

  90. get_object_vars by mgkimsal2 · · Score: 1

    To the best of my recollection, there isn't much else that's not backwards-compatible.

    Somewhere between php 4.1 and 4.2 (IIRC) the get_object_vars simply changed behavior. It used to only return an array of object properties which had values (not null), then suddenly after upgrading it started returning *everything* even if it was null. NO documentation change, nothing in the changelog - nothing. I was more than a little surprised that such a fundamental behaviour was changed and not noted *anywhere*, when much lesser things get listed in the changelog(s) all the time.

  91. No Function overloading? by nobodyman · · Score: 1
    I was looking to get someone's opinion on this because I'm still pretty ignorant of PHP.

    I've heard that PHP does not have (or did not have) support for function overloading and that this omission was intentional.

    Personally, I really like function overloading. API's get pretty hairy when you have multiple functions that all pretty much do the same thing but do it with slightly different inputs. For example, let's say you have I want to get the bank balance... it looks cleaner (to me at least) to have something like this...
    int a, b;
    a = bankObject.getBalance(12345);
    b = bankObject.getBalance("jdoe");
    Than something like this
    int a, b;
    a = bankObject.getBalanceInt(12345);
    b = bankObject.getBalanceString("jdoe");
    This isn't a great example, but I've seen Java classes with a huge number of methods, with each method overloaded around 3 times. Seems like a pain to bloat your API by not using overloading. Obviously the developer of the API has just as much work either way but the consumer of the API would have a much more consusing time.

    So, could someone from PHP crowd explain why overloading is bad? Not trying to troll, just honestly curious. This might be a moot point -- can you overload functions now in PHP5?
    1. Re:No Function overloading? by Malcontent · · Score: 2, Informative

      It's not bad. In the case of PHP it's not needed. PHP is not a storngly typed language so you can write a getBalance() function which can take any damned thing you can pass in.

      Once inside the function you can test the passed in variable and take appropriate action.

      You can also do other crazy things like declare functions without parameters and pass parameters into them.
      You can declare methods that act as "default" method handlers.
      You can add methods to objects at runtime!.
      Hell you can even define classes at runtime.

      It's highly dynamic.

      If

      --

      War is necrophilia.

    2. Re:No Function overloading? by Anil+Kandangath · · Score: 1

      I guess it is primarily because PHP doensn't really have any data typing to start with, and having function overloading the way you have it in CPP will cause a lot of confusion.
      Having said that, it's really easy to obtain pretty much the same results using the very fact that PHP is not strict about data types. You could just have:
      function getBalance($id)
      {
      ...
      if(is_numeric($id))
      &nbs p; {...do something}
      else
      {...do something else}
      }

    3. Re:No Function overloading? by Anonymous Coward · · Score: 0

      Except that PHP 5 now works with 'hints', type declarations in method argument lists. So you will be able to define a method signature that should make it possible to support method overloading. The fact that this kind of overloading isn't supported is a minor annoyance in a pretty exciting package IMO.

      While we're on minor annoyances, I'm not overjoyed that hints don't support primitives -- I can see myself creating an awful lot of unnecesary wrapper classes.

      I'd also like some kind of context oriented casting -- something like Java's automatic invocation of toString() in string context.

      Quibbles, quibbles. PHP needed grow up. It's about to become a language you can use to design projects effectively. If you use decent enterprise patterns, you can port easily if you decide that it's time for J2EE.

  92. More info on MySQL/PHP5 by mtabini · · Score: 2, Informative

    In case anyone is interested, I've followed the PHP5/MySQL on my blog. (it also contains instructions for getting MySQL back into PHP)

  93. Re:Kiss and say goodbye to Java language!! by Qeantk · · Score: 1

    Sarcasm is often (usually) ironic.

  94. Midgard as the PHP appserver by bergie · · Score: 1

    I don't mind so much the fact that you can't have servlet-like objects which handle entire sections of your URLspace (as opposed to one URL -- how very un-spider-friendly. Most choke on a ? in a URL and rightly so)

    Midgard will do this for you using the Active pages concept.

    /Bergie

    --
    Midgard Project - Open Source CMS
  95. Re:Kiss and say goodbye to Java language!! by kris · · Score: 1

    PHP is usually run as a apache mod or sometimes, as a cgi. Because of this, it cannot store session state or cache inside of its process (since the process is either apache httpd, or the cgi, which terminates at the end of a page run).

    This is also, why PHP can easily be hosted and maintained in a shared environment and Java usually can't. You'll find a lot of commercial web hosters offering you a directory and a shared PHP interpreter for very little money, because running PHP does not incur the overhead of an application server instance per application.

    On the other hand, if you had a large PHP application that used a lot of state, needed a connection pool and needed to keep compiled code in memory, you'd probably install SRM, the script running machine. SRM is basically a persistent VM that runs precompiled PHP programs called Bananas in a way very similar to what Java does with Beans.

    Kristian

  96. Re:Kiss and say goodbye to Java language!! by kris · · Score: 1

    We ended up running cron jobs that would reboot the farm, round-robin, just to solve memory issues and instability.

    PHP is often slammed for not keeping state across requests, but saving serialized state to disk and reloading it on the next page. While this seems awkward in an ideal world, it is often the right thing to do in the real world.

    PHP does incorporate very many (often more than two dozen) client libraries written in C by third parties. These come in very different levels of maturity and many of then are not only unsafe to use in a threaded environment, but also have memory leaks or other spurious problems. The default execution modes of PHP (throw away all memory at the end of the request) and Apache (execute each PHP interpreter single threaded in a separate process, but reuse the process) is very suited to run such libraries in a stable manner even if the code being executed is slightly defective.

    The end result is often that PHP application run seemingly stable and use very little memory, whereas a comparable Java application leaks memory over time or has stability problems (one thread dies, killing the entire process with it).

    Kristian

  97. Not an accurate comparison by Brother52 · · Score: 1

    If you want "persistent process outside of the apache process", this is exactly what FastCGI is. PHP can be built as FastCGI application. Although this is, like in-memory session storage, is very rarely used in "any serious, large web applications".

  98. php5 won't have namspaces as promised by Anonymous Coward · · Score: 0

    namespaces was pulled from php5 because the php developers couldnt' figure out how to do it. (read it for yourself on zend.com)

    we'll be switching to java, thanks. (after waiting for fucking months to develop our software further because we were told namespaces will be in php5)

    1. Re:php5 won't have namspaces as promised by Rutje · · Score: 1

      R.T.F.M.

      "This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."

      --

      I want my karma, and I want it now!
  99. Re:Still re-coding for register_global_variables.. by MungoBBQ · · Score: 1

    extract($_POST);
    extract($_GET);
    extract($_COOKIE);


    Sure, but that doesn't fix the problem - that assuming that a variable is set by a cookie when it may as well be set by a GET variable is very unsafe/unwise/unsmart...

  100. Re: Just use PEAR/DB by PizzaFace · · Score: 4, Informative

    Instead of ODBC, you'd be better off using the pear/db module as middleware. It supports more databases (mysql, odbc, sqlite, pgsql, etc.) and if it isn't the future standard for database access in PHP, something like it will be.

    I've been using PHP's built-in (until now) MySQL functions, because they're faster than pear/db, but this licensing dust-up has convinced me that portability among database vendors is worth a performance hit. And the pear/db module is getting increasing attention and is likely to get faster.

  101. Re:Kiss and say goodbye to Java language!! by version5 · · Score: 1
    The definitive source of JSP and servlet information is found here. If you want the exact definition of what a servlet container is, this is where to look.

    To put it simply, a servlet container runs java objects that extend the abstract HttpServlet class. At the heart of it, the servlet container will provide you with a HttpRequest, containing the session and any objects stored in it, cookies, request headers, etc., and HttpResponse, which contains a PrintWriter that you can use to output whatever you want. Servlet containers also do things like user authentication and application management. There's quite a lot of configurable options for this stuff.

    With J2EE being all the rage these days, there's a lot of inertia behind writing MVC web apps. Writing apps in JSP has nearly the same maintenance hassles as writing them in PHP. Instead of writing a JSP/PHP page that checks that a user is logged in and creates connections to a database, the idea is for JSP to deal with presentation and servlets and java beans to manage the database connections and "business" of the web application.

    Some of the cooler (newish) tools that people are using with servlets are XDoclets and object relation persistence

    So... take a look around. I strongly suggest checking out the Struts Framework. And this IDE's not bad. And this tool is pretty fun. I mean, I use it...

    --

    "It's Dot Com!"

  102. Re: Just use PEAR/DB by Jellybob · · Score: 1

    I'll second that, I'm using PEAR DB on several high traffic websites, and while it is slightly slower, it's also a lot more friendly to use.

  103. Re:Still re-coding for register_global_variables.. by FryGuy1013 · · Score: 1

    how so? It's trivial for someone malicious to edit the cookie text file to hack a site that trusts say $_COOKIE["isRoot"]. It is client side too. Any one of those three could be unsafe.

    Also, I was merely pointing out an easier/cleaner way to replace the kludge in the parent post. I still don't think register_globals is quite the security hole that people make it out to be though.

    --
    bananas like monkeys.
  104. Re:Still re-coding for register_global_variables.. by MungoBBQ · · Score: 1

    All you say is true. However, it is more a question of how the following code is written of course. I didn't mean to come off like you didn't know your stuff - if I did I apologize. The problem with the register_globals approach is that people are not aware of the possible security holes it creates and uses it in unsafe manners. SQL-inject is easy if you treat a variable unsafely.

  105. OO features by ajs318 · · Score: 1

    I always thought that the whole point of PHP was to be a NON-Object Oriented language.

    I mean, call me old-fashioned, but I prefer telling the computer how to process the data, rather than telling the data how to let the computer process it!

    Look at JavaScript for a freakin' awful example. In any sensible language, if you want to find the length of a string, you call a function and pass the string as a parameter. In JavaScript, you have to read something like foo.length, which most probably is making a function call "behind the scenes" but it's this abstraction layer that causes bloat. Either it has to measure the length of the string every time you access the property, which takes time, or it has to measure it every time it changes and store it, whether you want it or not, which takes space. And it all adds up - it's called the Ton of Feathers Effect. Why should I have to buy a faster processor, more RAM or a bigger disk simply because some programmer can't be arsed to shave a few clock cycles or a few bytes off here and there?

    If I want to measure the length of a string, I'll call a function to find it out; and if I want to use the value ever again, I'll store it in a variable. If I just want to act conditionally on the length and not care about the actual value once I've chosen a branch to follow, maybe I'll even put the function evaluation right there in the conditional.

    Microprocessors don't, as far as I know, have strong typing or object-orientation. This probably is for a very good reason. They are completely artificial concepts.

    What I'd REALLY like is a "forget" statement, so I can say free up the space that was being used by one variable and park another variable {any one that will fit, I'm not fussy - say just the next variable I declare} in there. Oh, and maybe a "pretend" statement {just for debugging purposes - I can't see it being any use in real life} for making temporary assignments that will be undone immediately after the variable is read.

    e.g.

    $foo = 10;
    .....
    pretend $foo = 5; next time, and only that one time, we look at $foo we will see the value 5
    if ($foo == 5) { test passes, but $foo goes back to 10 immediately once read
    .....
    }

    Sod it. I'm off back to my little shack to practice "Identifying Edible Objects In A Forest for Beginners" and "A First Course in Not Getting Eaten".

    --
    Je fume. Tu fumes. Nous fûmes!
  106. you can use PHP as regular CGI by DrSkwid · · Score: 1

    #!/usr/local/bin/php
    <?

    phpinfo();

    ?>

    --
    There are places where the networks are not touching,and there are places where they are-Boeing's Lori Gunter
  107. Re: Just use ODBC by daBass · · Score: 1

    Even if you stick to ANSI SQL (which version?) most databases have too many differences and you can greatly optimize things and make life lot easier for yourself by using the tools available in the database. And then I haven't even touched stored procs yet!

    Middleware suck. The whole pg_connect(), syb_connect() in PHP is silly, though. The least you can do is create your own getConnection() and such. ADODB is OK for useability, but it is painfully slow to include on each page.

  108. Servlets by daBass · · Score: 1

    Use mod_rewrite to have certain URL patterns handled by a PHP page. Works wonders!

  109. bitflux cms by Anonymous Coward · · Score: 0

    This looks interesting... I am however unable to download the demo. Is there a lits of mirrors anywhere?

  110. Re: Just use PEAR/DB by The_DOD_player · · Score: 1

    ....Or just write your own minimalistic layer. Its not a big deal, and you suffer no performace hit.
    If you really narrow it down, its perhaps 20 lines of code in to support the different function names and a couple of lines for a different database connect.

  111. ARRGH by Second_Derivative · · Score: 1

    IT DOESNT WORK ON APACHE2

    Damn it. The following does:

    Alias / /home/myhost/engine.php/
    Alias /res /home/myhost/resources/

    . ...but it rather lacks the elegance of the Apache1 version. Not to mention the request path HAS to go through mod_alias now. Blech.

  112. Apache2 threaded MPM by Thrakkerzog · · Score: 1

    Does php5 play nice with the threaded MPM in apache2? It would be nice to actually be able to implement real database pooling in php.

  113. Re:Kiss and say goodbye to Java language!! by dkf · · Score: 1
    As a final point, you might suggest that the teams I've worked with do not understand Java or how to run it well. [...]

    Hmm, experience says that for server-side stuff this probably indicates that someone hasn't told these programmers about the difference between String and StringBuffer. It's amazing how many Java programmers (including many who ought to know better) just don't get it.


    Comes of hiring monkeys for peanuts instead of Real Programmers (for caffeine and something disgusting from a vending machine! :^)

    --
    "Little does he know, but there is no 'I' in 'Idiot'!"
  114. Slowly starting to get interesting by kill-1 · · Score: 1

    PHP starts to get interesting... When they release PHP 7 I might switch from Perl to PHP.

  115. Re:Kiss and say goodbye to Java language!! by gr1dl0ck · · Score: 1
    PHP is usually run as a apache mod or sometimes, as a cgi. Because of this, it cannot store session state or cache inside of its process (since the process is either apache httpd, or the cgi, which terminates at the end of a page run). To get around this, any session variables get serialized and stored to disk at the end of each run, then un-serialized at the beginning of the request.

    If it ever really gets off the ground, this project plans to change that.

  116. Re:Yawn ???? by c13v3rm0nk3y · · Score: 1

    My comments were based on experience. I'm a software developer that has worked on several commercial applications over the years, for a variety of markets. What is your commentary based on?

    Every piece of software has a life-cycle, and version releases are just levels of maturity until the project is no longer worth the time and effort to put into it.

    Whether or not you practice good release management has nothing to do with this fact. Those goals you speak of are for releases so that you can keep a lid on creeping featurism and not introduce new regressions. There is rarely, if ever, a penultimate and overarching engineering plan for any significant software project. Most developers aren't even totally sure what the project will do, or who will use it. It is the implementers that often drive most of the development changes over time. Take a look at this slide. Note the "maintenance" bullet. That is where the majority of your time and money is spent on a software project over the whole of it's life.

    Software development lifecycles and management practices are well known. You might want to check here and here as well. Note that these are CompSci theories. In the Real World, software development rarely works out so cleanly.

    In summary:

    • Software release management practices insist on version releases and sometimes redesign of fundamental aspects of the project. This is expected and useful.
    • All projects have a life-cycle, and reach the end of their useful life (in terms of maintenance). At this point they are grandfathered.

    The second item does not indicate anyone "sucks". It's a fact of software development. Some projects have a longer life, some very short. It all depends on what it does, and who is using it.

    --
    -- clvrmnky
  117. Those new arrays are NOT necessary. by brlewis · · Score: 1

    Those new arrays are not necessary. They could have changed the language to include a simple declaration of what variables are inputs, like define-input in BRL. This eliminates all the security issues and is nearly as simple.

  118. When is "soup" done? by mabhatter654 · · Score: 1
    I agree!

    There comes a point in cooking where one more spice, one more ingredient takes away from the whole rather than adds to it. I believe several languages lately have had that problem. Perl has obviously gone too far--and lost it's simplicity, and it looks like PHP is going the same way as well. Maybe PHP 4 is good enough to call "done" If it gets much more complex, new users will be confused and something else will take it's place. That's why BASIC has been around forever it seems--It's not the greatest, but it stays put so everyone can start somewhere!

    Many of the .com era technologies are great ideas, but need development in to lean, mean, systems. I'd propose a 3-5 year hold on any new versions just to let the environment settle down and give time to let the systems grow from "really good" to "legendary".

  119. MySQL licensing exemption for Open Source projects by Anonymous Coward · · Score: 0

    Would be nice if all you trolls actually did some research before getting all bent out of shape about things.

    http://lists.debian.org/debian-legal/2003/debian -l egal-200306/msg00061.html

  120. Re:They pulled MySQL out! [Clarification] by Anonymous Coward · · Score: 0

    The GPL license (which MySQL has recently switched to for its client libraries -- from LGPL) does not permit non GPL software to link to it. This means that if PHP provides linking to the GPL version of MySQL's client libraries (the 4.x version and later versions of 3.x) it is breaking the law and that would CERTAINLY be "not a smart move".

    Because there are still LGPL versions of the MySQL (3.x) library available, PHP can continue to include the mysql extention for users to link against their own copy of libmysqlclient without having to worry about licensing issues. This is a good thing.

    In order to support the newest features in MySQL however, one must use libmysqlclient >= 4.1 (they changed the protocol) which requires a different PHP extention (not available due to licencing issues stated above).

    MySQL authors are "working on an exception" for PHP, but at the moment the ball is entirely in their court.

  121. OMiGawd, It's Perl!! AAAAHHHHH!! (faints...) by garyebickford · · Score: 1

    I allus have disliked Perl, 'cause the code tends to look like the keyboard sneezed on the paper. I've had some concern about PHP going the same way. I prefer PHP to just about everything else, but...

    From its early tight-albeit-primitive beginnings, PHP seems to have gotten larger and larger, with a fairly incoherent library naming scheme that kinda, but not really, follows C/C++ conventions. I can no longer know all of PHP without constant updating and study, which means I have a high likelihood of not writing optimal code. I don't really want "more than one way to do it." - well maybe two. or three. :O)

    The lack of fibrary coherence is frustrating. I spend too much time looking in the docs to see which calling and return convention is used for each function, and how a function is spelled. To make things harder, the function docs are not explicit in the function summaries about what, if anything, is returned.

    I haven't looked at the PHP5 specs. I have a couple of hopes. The major one is that the language itself will have been pruned down, and most of the libraries separated out as loadable modules. The second is a redesign of the entire library system (in this or some future version) to provide a single, coherent API-face.

    The kitchen-sink approach was great in getting PHP to be the most popular web programming language, but it's time for some discipline. In particular, the syntax convention for using common C library calls is decidedly mixed up in PHP4. Too many of the function libraries are apparently 'first cut' hacks that got something working but were subjected to any design cleanup.
    Suggestion: There is a parallelism between the PHP libraries and standard C, C++, and POSIX libraries. It's reasonable to consider a kind of meta-library in PHP that, at compile time, reads (which ones of?) the .h files in the target machine's include directories and builds a glue library for those libraries. At least for C++ libraries, there's enough info to build a glue class. This would provide a semi-automated library constructor mechanism and ease cross-language programming.

    PHP4 has adopted various 'features' that make programmers in other languages more comfortable but are bad ideas. For example, assignments within IF statements may be a convenience, but it is a primary cause of coding errors, because, e.g., "if (a=b) {foo();} is no longer syntactically testable for a minor, and very common, typo. The compiler has no way to know if you meant to assign b to a, or to just test for equality. This is a BAD THING. The required vigilance and difficulty in debugging negates the convenience. Now it is a problem in PHP4. I'm sure there are a number of pieces of PHP4 code out there with exactly this bug in them.

    PHP design needs to get back to the roots of what made PHP better for its primary uses, instead of following all the bad ideas of other languages, just because folks are used to them.

    --
    It's easier to be a result of the past, but more fun to be a cause of the future! http://www.spacefinancegroup.com/
  122. Re: Just use PEAR/DB by lamz · · Score: 1

    That's an interesting comment. I have done exactly what you described, and found that I needed only five functions:

    connect_to_db()
    -connects to the database and returns the connection token
    -also, caches the connection token, to save having to do it a second time

    get_sql_array()
    -given a SQL SELECT statement, this returns all fields in an array

    get_sql_array_of_hashes()
    -given a SQL SELECT statement, this returns an array of hashes, where each element in the array represents a record with a hash, where each key in the hash is the name of the field

    execute_sql()
    -given any SQL statement, this executes it and returns a count of records affected

    sql_quote()
    -given a string, this function escapes the string and encloses it in single quotes, appropriate for inclusion in a SQL statement or query

    I only ever call the last 4, since each (except sql_quote) calls connect_to_db().

    I have versions of the above 5 functions for connecting to MS SQL Server, MS Access, and MySQL in Perl, VBScript and PHP. I have little problem switching between Perl, VBScript and PHP since these (and many more) functions are available in all three.

    If another database or language comes along, I can have my mini-library ported in an hour or so, since, as The DOD player noted, it is only 20 lines or so of code.

    In the last year, we have been doing projects almost exclusively in PHP, and I have been considering moving to the Pear DB library. Anyone care to comment on their experience with Pear?

    --

    Mike van Lammeren
    It will challenge your head, your brain, and your mind.

  123. Hi Rasmus!! by garyebickford · · Score: 1

    I'm glad to see the PHP Guru checking out the /. posts, and participating. Thanks from the community!!

    --
    It's easier to be a result of the past, but more fun to be a cause of the future! http://www.spacefinancegroup.com/
  124. Re:Still re-coding for register_global_variables.. by llin · · Score: 1

    Any site that stores auth data in an unsigned cookie is asking for trouble anyway , of course 'register_globals off' can't protect against that. It will, however, protect you against variable injection w/ uninitialized variables, which is definitely a *good* thing. Even the most careful of us can make mistakes. One less thing to worry about.

    Languages/APIs are meant to make it easier to do useful stuff and harder to do stupid things.

  125. Re:Yawn ???? by dekashizl · · Score: 1

    The fine line between hack-and-slash-just-get-it-done coders and software-development-as-deep-science is actually wide enough to capture a lot of real world projects. Not every software project is an operating system with continuous iterations.

    Consider a small software project that ends up as the code embedded on a miniature computer attached to an oil pipeline sensor array, buried underground. Or a pacemaker. Or any number of other areas of engineering where it's actually important to get it right the first time, and you don't have another chance. These are just a few obvious examples.

    And I would expand my point to be even more general, which is to say that just because intellectuals expound on a subject, the scope of the subject is based on our (you and I and whoever else is discussing it) idea of what it is, not the intellectual's. In other words, just because Brooks or Royce or Joel or anybody else provides a template for projects does not mean that all projects fall under that template.

    Perhaps my comments in the post to which you responded were a bit harsh and overly specific (and I apologize if I've offended any bad programmers), but I think in a sense we are both right (though obviously I am more right than you).

  126. Re:stop digging :P by pacman+on+prozac · · Score: 1

    Nothing throws a code 500 to the webserver, all they do is crash :)

    That error is generated by the webserver when a cgi process either dies or fails to return a valid set of headers.

    PHP is able to keep going through a large amount of errors and still render the rest of the page intact, which is imo the correct way to go since it is perfectly possible for the programmer to use the header() commands to create an errormsg 500 response if needed.

    Too bad that PHP doesn't come with easily accessable documentation like most other languages on a Unix system.

    Yea like the regexp manpages or sed/awk. What other languages exactly? The manual is online in 25 different languages, with local mirrors in most countries, browsable online or downloadable in about 8 different formats and searchable in the internets #1 search engine. How could it possibly be more accessible?

    Typing 'log errors' into the 'online documentation' search directs me to a google search of the entire site that does not produce the page you're refering to.

    If you type "log errors" into the search engine without selecting any options then the error_log page is the first one you get and the second is the page explaining the entire error handling/logging functionality. Perhaps google is doing something strange due to your location/IP address?

  127. Re: Just use PEAR/DB by Lennie · · Score: 1

    Maybe you'd want to look into adodb.

    --
    New things are always on the horizon
  128. "Literary works" by yerricde · · Score: 1

    In both the United Kingdom and the United States, a computer program is considered a "literary work", which is defined in section 101:

    ''Literary works'' are works, other than audiovisual works, expressed in words, numbers, or other verbal or numerical symbols or indicia, regardless of the nature of the material objects, such as books, periodicals, manuscripts, phonorecords, film, tapes, disks, or cards, in which they are embodied.

    Neither in statute nor in case law does the definition of "literary works" extend only to those written in a natural language.

    If you disagree that computer programs are "literary works", please reconcile with 17 USC 102, which doesn't mention computer programs explicitly at all.

    --
    Will I retire or break 10K?
  129. Re:Yawn ???? by c13v3rm0nk3y · · Score: 1

    Quote from my very last response:

    Note that these are CompSci theories. In the Real World, software development rarely works out so cleanly.

    Obviously, there are a variety of ways to approach software development, and for cases like embedding software in bodies, space craft and remote industrial devices, we have to take these practices with a grain of salt. I said as much in my last comment.

    However, the exception does not make the rule.

    This did not start with a talk about embedded systems. This started with your comments about software names in general and PHP 5 in the specific. It is unlikely we are going to send PHP into space any time soon. There are other more tried and tested technologies we use for that purpose.

    I was responding to those comments, wherein you suggested that it was misleading that PHP 5 might no longer be "PHP" simply because it has gone through 3 public major releases, and the language has changed somewhat incrementally over the years. My response was simply, "that is what software does".

    Honestly, I found your orignal comments confused and misguided, and many of your assumptions lacking in logic or not based on real experience. I still think you've missed my main points which I've carefully and neutrally discussed over the length of this thread.

    So, I'm going to assume your last comment was a joke; even if it wasn't, you can consider this next comment of mine as humour, also.

    You are entitled to your opinion, as we all are. The entitlement, however, does not make you "right" in any sense of the word. I disagree that your are correct about your original comments in any way until you are able to argue your case clearly and logically, without any ad hominem attacks or straw-man arguments.

    <span class="old-timer">
    My advice is to get a little education and experience under your belt before making sweeping judgements about software life-cycle management.
    </span>

    'nuff said.

    --
    -- clvrmnky
  130. Welcome to the Real World by MattRog · · Score: 1

    I welcome this change; philosophically I think that the inclusion was one that should have never been there in the first place.

    Anyway, to those people whining 'What about when I can't compile the bin?' - welcome to the real world. What about those of us who use a different DBMS than MySQL? We get by, and so you will, too.

    --

    Thanks,
    --
    Matt
  131. Well why didn't they say so? by yerricde · · Score: 1

    Just compile it with gcc. gcc is available as a binary for Windows as well.

    So you're saying I can compile PHP and MySQL in MinGW? Why didn't the documentation say so?

    --
    Will I retire or break 10K?
  132. There's a difference. by yerricde · · Score: 1

    There's a difference between requiring Windows and requiring Visual Studio. Windows is $300 by itself for one seat or bundled with 99.odd percent of all PCs. Visual Studio, on the other hand, is over $1000 for one seat and is not typically bundled with PCs.

    --
    Will I retire or break 10K?
  133. Amazing how the topic can drift by yerricde · · Score: 1

    I have heard that pyDDR is good, but I have a PS2, so I can play RealDDR

    Can you play "Around The World" by Red Hot Chili Peppers in Konami's DDRMAX? No. DDRMAX does not support adding recordings from CDs.

    All Comcast seems to care about is that your system does DHCP properly.

    I guess Comcast does "just work".

    I guess you must actually check your posts via your user page too.

    I have notification turned on.

    If I do go to Linux in the near future, it'll probably be Knoppix in the CD-ROM drive (F:) that I never use anymore since I got a burner (G:).

    --
    Will I retire or break 10K?
  134. PHP5 by Kriekbot · · Score: 1

    - The SQLite extension is now bundled and enabled by default.
    - Removed the bundled MySQL client library.


    The MySQL client libraries have been GPL'd. That means people that make a living creating PHP/MySQL based solutions that they wish to remain proprietary are forced to buy a license from MySQL to get around the GPL stipulation that there code must be open. This situation may change as there is talk between the PHP dev team and MySQL to work on a solution that may exempt PHP. It's still up in the air, but until a conclusion is reached, MySQL is no longer bundled. SQLite is really not a database, but an SQL interface for a flat file. MySQL is overkill for most sites anyways. It's extremely fast and it can be run anywhere. The host doesn't need a database installed. So for most sites that don't really need all that a RDBMS can offer, or their host isn't capable of providing it, SQLite is really a great alternative. Good for hosts as well.

    --
    The unexamined life is not worth living
  135. MySQL situation summary by vladkrupin · · Score: 1

    a few facts:

    1. MySQL support is not gone. Only the bundled library is gone. You can still compile PHP to use MySQL, and will be able to do so (in a similar way you can use Microsoft's SQL server from PHP, but that doesn't mean that PHP is shipped with Microsoft SQL's server code - see the difference?)

    2. There are very good chances of MySQL making an exception from their 'GPL way or the highway' rule for PHP because close PHP+MySQL relationship is very benefitial for both of them. Such an exception is in the talks right now, as I am writing this.

    3. MySQL 3 client, which has been bundled with PHP for a long time now, can still be bundled, if someone felt the need to do so. It's only MySQL 4 client that is GPLed in such a way that it's not possible to put it into PHP.

    Plus, a couple of rant points:
    a. While it sucks, there is nothing wrong with MySQL AB creating that whole licensing mess - they have the right to do so, and, more importantly, they have the right to earn their living, which is what they are trying to do.

    b. I do not know why this made it to slashdot in the first place. PHP5 beta should really (IMO) be considered alpha at best. The code is not only not in code-freeze, but a few aspects of the API have not been hashed out yet. There will be major changes coming in the new beta-2, if that's how it will be called. So, consider this a very early release, try it if you feel but do not expect it to work reliably. Moreover, do not even expect the final PHP5 to closely resemble what you see in this 'beta'.

    --

    Jobs? Which jobs?
  136. Re:Kiss and say goodbye to Java language!! by j3110 · · Score: 1

    Both you, kris, and anthony would probably do yourself well by taking a look at Jetty or Resin.

    Java doesn't leak away memory unless you are running in a Solaris machine, or someone coded a class that keeps pointers to objects that should have died long ago. If you don't handle state properly, and you keep it in memory but don't periodically check to see if it expired, of course you are going to have problems.

    Some JSP engines store persistance on disk, in a database, or across a cluster in either variety as well.

    When people quote Tomcat and JRun as reasons why PHP is faster than JSP, I just want to shoot them in the head. At least give Jetty (open source) a chance even if you don't give Resin ($$$), BEA ($$$), or Websphere ($$$) a chance. I wouldn't trust Macromedia (JRun) to make any server-side product really... Anyone that thinks you don't need a sine function in a language to display flashy graphics obviously doesn't have much going on in the head. Tomcat was a donated reference implementation. It's primary goal until recently seems to have been stability. Now they seem to have switched gears for performance. Jetty on the other hand is appearantly programmed by a savant. Within days of the release of NIO, he seems to have reworked the entire engine to support NIO. I really don't see how anyone could not be pleased with jetty though. I set it up on a dual processor server at the local university, and classes of 15 start and restart Jetty and they don't complain about speed at all. JBoss embeds Jetty because it's so good. Jetty doesn't support working through Apache (that's what makes Tomcat slow more than anything I would say), so you may not be happy with that, but just about any project worthy of J2EE is worthy of 100$/mo dedicated hosting.

    Be sure, in any case, to try different VM's to see what works best for your project. The IBM JRE seems to be the fastest, but some argue that BEA's VM (JRockit) is actually faster for server-side stuff. Both should be free, but I'm not sure of the licensing terms.

    I've seen some other FUD around going the other way too. PHP's Zend compiler is a JIT compiler as well. The speed of the two should be comperable. They both have their place, but I will probably never recommend PHP for large projects because it's so hard to seperate the logic from the presentation, where there are at least 3 tools to do this with Java.

    If the future of the Web is rich clients, I'm curious if PHP+Javascript+XUL will turn out better than Java Webstart. It will be interesting to see what happens, but I'm banking on Java because of the massive numbers of backers in the industry.

    I hope no one got the wrong idea, but I love PHP too, and am very excited about the new version. But that one crazy AC trying to compare Java and PHP the way he did was just silly :) I have a hard time believing he was serious though, I woulda probably modded him as funny. It's sad someone actually fell for his post. There really is no speed or stability difference, it's just easier to make small sites with PHP, and large sites (or integrate with legacy systems) with J2EE.

    --
    Karma Clown
  137. Re:Yawn ???? by dekashizl · · Score: 1
    Well, setting the record straight, that original argument regarding names and versions was posted by an AC who was not me, and frankly I didn't really agree with what he was saying, but it did seem like an interesting starting point for a discussion.

    As for the branch that our little sub-thread took, I only responded initially to your statement (emphasis mine):
    Your job is never finished until the product is dead. There are always bugs to fix, inconsistencies to remedy.
    I accept that you in a later post acknowledge that "In the Real World, software development rarely works out so cleanly." My issue was with your extremely absolute mandate regarding the eternal nature of all software projects. No doubt I brought no new insight to you with what I said, since I am sure you knew it already to be true and employed hyperbole for the sake of making a point, but that can be a dangerous logic game to play. I am glad we are now in agreement (I think).

    And yes, when I said "I am more right than you" I was kidding. But as far as making "sweeping judgements about software life-cycle management," I feel you should swallow that pill, for it was I who was massaging your own sweeping statements by pointing out counterexamples, not attempting to make any bold claims of my own.

    I also hope anybody who is still reading this thread is enjoying it.
  138. Re:Yawn ???? by c13v3rm0nk3y · · Score: 1

    My apologies. I had assumed you were the OP. I generally browse threads with all AC comments disabled, but must have turned that back on during moderation.

    As for the statement you take umbrage with, I still stand by the exact quote. Perhaps my opinion is slanted because I mostly maintain code for a living.

    I never run out of bugs to fix or features to implement between major releases, and have seen a few products age beyond their useful life until a complete rewrite is warranted. Between maturing customer needs and ever-changing hardware, I just don't see that changing much in the near future, especially in the enterprise client-server world. No matter how hot your coders are, and how well the project managers do at managing the project, there is always post-release maitenance. This is my specialty, and it has served me well.

    As we've discussed, there are a lot of exceptions to this. I've been out of embedded market for some time, but was once involved in the planning stages for an aerospace project. The specs on that one changed almost daily, and we had one chance to get it right.

    However, it is unlikely that PHP will ever go to space in the near future, and PHP is what got us this far into this discussion. Very odd.

    --
    -- clvrmnky