Slashdot Mirror


PHP 4 End of Life Announcement

perbert writes "The PHP development team has announced that support for PHP 4 will continue until the end of this year only. After 2007-12-31 there will be no more releases of PHP 4.4. Critical security fixes will be made available on a case-by-case basis until 2008-08-08. For documentation on migration for PHP 4 to PHP 5, there is a migration guide. There is additional information available in the PHP 5.0 to PHP 5.1 and PHP 5.1 to PHP 5.2 migration guides as well."

125 comments

  1. Thank God by Daengbo · · Score: 4, Insightful

    I hope that everyone has moved beyond PHP 4.X by this point. 5.X is more secure and capable.

    1. Re:Thank God by Arancaytar · · Score: 5, Informative

      You'd be surprised how many shared web-hosts are still out there running ancient and unpatched PHP versions. Partly out of laziness and partly out of an unwillingness to make their customers work on their equally ancient applications. register_globals being enabled can be one of the least security concerns there.

      See also http://gophp5.org/

    2. Re:Thank God by flight_master · · Score: 2, Informative

      I am the owner of a shared hosting provider, and partially I need to rebuke your statement.
      Sure, most of our systems do run on the latest LAMP stack (Apache 2, MySQL 5, PHP 5), however we still have some systems runnning PHP4, as clients insist on using old software like phpBB (for example) that doesn't run at all on version 5. Not to mention, those of us who use cPanel need to wait for them to get the entire system stable before we can upgrade.

      This combines well for us though - we announced that PHP4 support will officially end September 30th of this year :-D Now we have a reason to say that too.

      --
      "Free software" is a matter of liberty, not price.
    3. Re:Thank God by NeoThermic · · Score: 4, Informative

      For those using phpBB2, as long as you're not using an obscure PHP5 config, it will work fine. We just don't officially support it as phpBB2 was written for PHP3 and PHP4 only (since those were the only versions out when it was released). Or, get them to move over to phpBB3, which not only supports PHP4 and PHP5, but will actually run on PHP6-dev versions. (Although if you're running -dev on a live server...)

      NeoThermic

      --
      Use my link above, or to view my server, NeoThermic.com
    4. Re:Thank God by KermodeBear · · Score: 1

      You would think.

      I work for a company that hosts several major, big name websites; millions of hits a day. There has been a massive resistance to move from PHP4 to PHP5 for several reasons, one of them being that nobody in management wants to spend the time necessary to test ALL of the code under PHP5 and those in charge of the servers don't want to spend the time upgrading the machines. It would not surprise me if we were still on PHP4 a year from now. After all, "If it ain't broke, don't fix it."

      Hopefully, this announcement will move things forward a little bit. Writing code for PHP4 is an excruciating, painful experience, especially after having written code in PHP5 prior. The addition of exception handling alone is a big time saver, not to mention destructors, a faster object model, PDO, SPL, and a bunch of other things.

      --
      Love sees no species.
    5. Re:Thank God by ctr2sprt · · Score: 1

      Yep, I work for a hosting company, and I wish to emphasize your point that a lot of customers are running old apps held together by spit and baling wire that won't work on PHP5. And if we tell those customers to get with the program and fix their shit, they will just go find someone who will give them PHP4.

      Another problem is that RHEL3 and RHEL4 - which are still, by a wide margin, the most common versions out there - don't support PHP5. They support it in the sense that RPMs exist and you can install them, but RedHat won't manage the patches for you. When you have literally thousands of servers to keep patched, as we do, that's a very, very big deal. We would basically have to bring in a team of two or three people to do nothing but maintain up-to-date PHP RPMs and do QA on them. Even if you assume those people make only $40k a year, that means that our cost to offer PHP5 for RHEL3 and 4 would be $80k+ a year. Look at it that way and you'll start to see why very few big hosting companies want to offer PHP5.

    6. Re:Thank God by Anonymous Coward · · Score: 0

      Agreed. I still know people who refuse to get off RedHat 7.3, and have paid me a pretty penny to backport contemporary software to it.

    7. Re:Thank God by Anonymous Coward · · Score: 0

      I've been bugging my ISP for years to make PHP5 available. I'd move if I could, but they have other features we need.

    8. Re:Thank God by rhizome · · Score: 1

      I hope that everyone has moved beyond PHP 4.X by this point.

      Someone forgot to tell Redhat. They only make PHP5 available for Release 5, which is very much in the minority of their installation base.

      --
      When I was a kid, we only had one Darth.
    9. Re:Thank God by Arancaytar · · Score: 1

      Congratulations on providing competent hosting then! :)

      I know that PHP5 is (fortunately) getting increasing support from hosts. I myself switched to a different one for exactly this reason and would never consider a host that doesn't have PHP5.

      However, unless the statistics are skewed or outdated, they still show PHP5 adoption well below 50%...

  2. Re:If only... by heretic108 · · Score: 1, Interesting

    I'd say good riddance to a braindead language.

    Agreed - on TFA I was hoping to see the 'PHP4 to Python' migration guide

    --
    -- In the beginning was the WORD, and the WORD was UNSIGNED, and the main(){} was without form and void...
  3. Like the say: by Anonymous Coward · · Score: 0

    PHP is like training wheels without the bike.

  4. Needed But Will Be Troublesome by detain · · Score: 5, Insightful

    While I can completely understand the need for this to occur, I can see this causing alot of problems for many small businesses, personal webpages, and hosting companies. PHP5 is definitly worthwhile switching to from PHP4, but there are so many poorly coded sites out there that wont run properly under PHP5, and this at some point is going to cause a nightmare for various hosting companies.

    Your typical small business or personal webpage will frequently use PHP, and have little knowledge of how to fix their code to get it working, or how to upgrade their 3rd party software to a PHP5 Compatible version. At the same time hosting companies who will reach a point where they need to upgrade to PHP5 in order to keep their systems as secure as possible (because PHP4 security fixs might not be coming out) will be faced with many angry customers who are unwilling to spend time or money to change a site that they see as working previously.

    I can completely understand why a company might need to stop supporting an old version of their product at some point when newer ones are freely available, I just am not looking forward to all the headaches its going to cause. I can hear the phones of angry customers threatening to kill me because i "broke their site" now.

    Oh well, hopefully all PHP5 code will wind up working just fine in PHP6 when it comes out.

    --
    http://interserver.net/
    1. Re:Needed But Will Be Troublesome by timmarhy · · Score: 1
      "there are so many poorly coded sites out there that wont run properly under PHP5, and this at some point is going to cause a nightmare for various hosting companies."

      cry me a river? upgrading pains are a part of the IT industry, people need to either accept this or get out.

      --
      If you mod me down, I will become more powerful than you can imagine....
    2. Re:Needed But Will Be Troublesome by fyoder · · Score: 1

      I can hear the phones of angry customers threatening to kill me because i "broke their site" now.

      Run two versions of apache, one for most sites with php5 (many php apps that worked on php4 will work on php5), and one for the minority of 'legacy' sites using php4. I believe the trick is to have them listen on different ip addresses.

      --
      Loose lips lose spit.
    3. Re:Needed But Will Be Troublesome by 1110110001 · · Score: 1

      You could just use FastCGI to use as many different PHP versions as you want, with the same webserver on the same port and IP.

    4. Re:Needed But Will Be Troublesome by detain · · Score: 1

      That wont solve the problem, actually we already run PHP4 and PHP5. The basic problem here is that support for PHP4 is ending. That means that at some point there wont be all the security updates for PHP4 that are still coming out for PHP5.

      So running PHP4 and PHP5 at the same time still will be just as much of a security risk as running PHP4 by itself.

      --
      http://interserver.net/
    5. Re:Needed But Will Be Troublesome by BVis · · Score: 1

      So sandbox all your customers who won't do the work to upgrade to php5 off on discrete servers (or use virtualization to accomplish the same thing). Make sure your customers understand (or at the very least are given information regarding) the fact that their security is affected by php4 no longer being maintained, and let them make the decision. Do your due diligence as far as security is concerned (code audits if you're able) but, ultimately, you can lead a horse to water, but you can't keep him from getting eaten by the script kiddy pirahnas.

      --
      Never underestimate the power of stupid people in large groups.
    6. Re:Needed But Will Be Troublesome by Tablizer · · Score: 1

      Couldn't hosting sites offer both versions? In theory, the customer could set a switch somewhere to select between them. Or, put a flag file in the folder(s) where the scripts are to indicate which interpreter to use. For example, if there is a "use_php_4.flg" file, then the 4 intertpreter is used.

    7. Re:Needed But Will Be Troublesome by Anonymous Coward · · Score: 0

      End of life? Fact: *BSD is dying

  5. Re:If only... by jkrise · · Score: 1, Troll

    If only the subject had left out the "4." "PHP End of Life." I'd cheer for that. I'd say good riddance to a braindead language.

    Are you saying Microsoft is a braindead company for tying up with Zend to enhance PHP on Windows servers? Microsoft and Zend Technologies Announce Technical Collaboration to Improve Interoperability of PHP on the Windows Server Platform

    --
    If you keep throwing chairs, one day you'll break windows....
  6. What about CentOS? by mcrbids · · Score: 1

    I have a large (ahem... LARGE) codebase written in PHP4 that's running CentOS 4. Supposedly, CentOS will be updated until 2010. But how could they keep this promise if the underlying packages are no longer supported?

    Guess I'll have to see what PHP5 will do to my software, thinking I could put this off for another couple years.

    (sigh)

    --
    I have no problem with your religion until you decide it's reason to deprive others of the truth.
    1. Re:What about CentOS? by timmarhy · · Score: 1

      it's possible centos will put their own security patches into their php4 packages. they've done similar stuff before.

      --
      If you mod me down, I will become more powerful than you can imagine....
    2. Re:What about CentOS? by Anonymous Coward · · Score: 0

      Ahem - I presume you mean 'Redhat' when you say 'they've done similar stuff before.'

      CentOS just repackage.

    3. Re:What about CentOS? by Christianfreak · · Score: 1

      Same issue here. Really I think this is a problem with PHP more than with CentOS. The Cent folks try very hard to make sure that updates don't break your stuff and they are very good at that. One of the main reason I use it.

      The PHP folks dug themselves a hole by making a language that's so fundamentally broken as to require breaking everything with an upgrade.

    4. Re:What about CentOS? by Anonymous Coward · · Score: 1

      The PHP folks dug themselves a hole by making a language that's so fundamentally broken as to require breaking everything with an upgrade. My PHP 4 code works fine with PHP 5. Many of the items in PHP 4 that break in PHP 5 are carryovers from PHP3 that were depreciated in PHP 4. Stop writing PHP 3 code and other depreciated PHP 4 code and you'll have less issues when migrating (never mind that you've had three years to convert your code and still have another year left).
    5. Re:What about CentOS? by Anonymous Coward · · Score: 0

      You mean _redhat_ folks try very hard to make sure that updates don't break your stuff and they are very good at it.

      Centos just leeches, and that's perfectly okay, but it's really annoying when people talk like they did it themselves.

  7. Re:If only... by misleb · · Score: 2, Insightful

    Are you saying Microsoft is a braindead company for tying up with Zend to enhance PHP on Windows servers?


    Sure, why not? They're just doing whatever makes business sense. It has nothing to do with the quality or capabilities of the language.

    -matthew
    --
    "THERE IS NO JUSTICE, THERE IS ONLY ME." -Death
  8. Seems strange to me by ls671 · · Score: 2, Insightful

    Sorry, all I have done in PHP was modify or patch other programs so I do not know much about it.

    But in Java/J2EE, I still run applications that were developed (and even compiled sometimes) in java 1.0 on the java 5 platform without any changes or security issues. I see some "backward incompatible changes" in the PHP migration info.

    With the java/J2EE/jsp programs I have running here and there, I sure do enjoy the care the maintainers of a language take to insure backward compatibility even if it is sometime a little more difficult and involves deprecating faulty methods and creation of equivalent with new names instead of changing the behaviour of existing methods.

    So this seems strange to me but hey ! I don't want the PHP community to start throwing flames at me and java, we would quickly get outnumbered I would guess ;-)

    --
    Everything I write is lies, read between the lines.
    1. Re:Seems strange to me by Jeconais · · Score: 0, Flamebait

      The bigger issues is that PHP4 isn't very good (I'm not saying that PHP5 is perfect, but it is significantly better). It shipped in an insecure manner, and a lot of programs rely on that behaviour to run.

      An example would be the "Magic Quote GPC" runtime option, that auto escaped " and ' etc. People used this (and still do) as the sole defence against SQL-Injection.

      The other thing is that PHP4 wasn't really developed with forward compatibility in mind. One of the changes between 4 and 5 is that the variable $this is reserved - now obviously, good programmers would never call anything "this", they'd assign it a descriptive name. Sadly, PHPs ease of use has meant that everyone with a text editor and a <? echo "hello world" ?> * script calls themselves a programmer. So I've seen ever this issue cause problems.

      Getting rid of PHP4 is a very good idea.

      J

      * - short tags was another strange idea, try having short tags turned on and using "include()" on an xml file (Of course, you shouldn't use include for that purpose...)

    2. Re:Seems strange to me by gazbo · · Score: 1
      Because PHP 5 isn't just a few new libraries, constructs and bug fixes - it's a different object model, and as the other reply said, some misfeatures are deprecated for security reasons.

      PHP 5 is an upgrade to PHP 4 in the same way that C++ is an upgrade to C.

    3. Re:Seems strange to me by panaceaa · · Score: 4, Informative

      PHP began as a hacky side project of a lone developer (Rasmus Lerdorf). I'm not wholly aware of the details, but my understanding is that Rasmus was a Perl coder and wanted to generate minorly dynamic web pages by putting Perl-like code inside of his HTML. As the capabilities of his technology grew, he released it as an open source project, and due to its extreme ease of use it quickly turned into a popular web development language.

      The reason PHP5 could not continue backward compatability is because of its roots: It was designed to be EASY. In the first few releases, there wasn't serious thought put into making a proper software development language. But as web pages became more complex, soft typing, lack of proper scope, and lack of OOP patterns made developing complex PHP applications a world of horror. In addition, concepts like putting all query parameters into the scope of the program, which made developing simple applications easy, created a difficult situation for those trying to make complex applications secure. So to remove these security problems, and to remain relevant by providing richer programming constructs like classes, PHP had to break backwards compatibility.

      And while Java is mostly backwards compatible, the technologies for developing Java on the web have changed dramatically. Originally, JSP developers would put Java code right in their HTML! Today this is highly frowned upon (though backward compatible). So developers switched to JSP tags, such as the JSP Standard Tag Library, which coincidentally enough aren't backward compatible between versions. If you're running a Java app server, you'll definitely run into problems when upgrading WebSphere, WebLogic or Tomcat, due to updated tag libraries and other JARs being incompatible with their previous versions. These problems aren't as bad as porting your average PHP app from PHP4 to PHP5, but upgrading versions not a straight-forward process with either programming language.

      Stepping back, PHP is in a pretty similar spot to Visual Basic. VB.NET is wholely incompatible with VB6. Microsoft has announced a dropping of support for VB6. However, half of VB developers still program in VB6. Many VB programmers don't understand VB.NET's features, and hence are quite reluctant to move to VB.NET (and they're probably angry, too). And most existing VB6 code would nearly require a complete rewrite to get running in VB.NET. What might just happen is that Microsoft and PHP will have to continue supporting their legacy versions or simply lose beginning programmers as customers. Microsoft will probably continue to end-of-life VB6, but I believe they will release a language highly similar to VB6 that's easier to move over to. It will be interesting to see whether PHP follows a similar path or just leaves its developers to either learn PHP5 or move to another webby language, like Python.

    4. Re:Seems strange to me by RAMMS+EIN · · Score: 1

      ``java 1.0 on the java 5 platform without any changes or security issues.''

      Unfortunately, PHP and security issues can only be put in the same sentence when "many" is also present.

      --
      Please correct me if I got my facts wrong.
    5. Re:Seems strange to me by ls671 · · Score: 1

      Thanks for your insightful reply!

      I would just wish to point out that, regardig jar files and Tag Libraries, the golden rule is to not put them in your global server scope. Put all your jar files and Tag Libraries in application specific scopes.

      I run application servers with applications that use different versions of the jar files and different versions of the Tag Librairies without problems. So I do not really understand what upgrading my application server or the JVM has to do with the versions of the jar files and the versions of the Tag librairies I use in my applications.

      --
      Everything I write is lies, read between the lines.
    6. Re:Seems strange to me by Tony+Hoyle · · Score: 1

      Java does have upgrade issues just the same - I worked on one project that was written on java 1.3 and simply couldn't be ported because there were too many changes (different parameters to many functions, plus the killer was some stuff didn't appear to work at all in the 1.4 variant when the client was behind MS Proxy server.. never fathomed that one). Luckily you can run your own private JRE without affecting everything else on the machine (we tended to say one machine == 1 application though as is common in the windows world - this app wouldn't run on any other platform either.. it was ancient and porting it would have been a complete rewrite, java not helping one tiny bit..).

    7. Re:Seems strange to me by ls671 · · Score: 1

      Hi Tony,

      I would need more details about your case because there was not a single method that was removed in java 1.4. All methods suported in 1.3 are supported in 1.4 and they do take the same number of parameters. In 1.4, like in any updates, new methods and classes are ADDED. But the old 1.3,1.2,1.1,1.0 methods and classes are still supported. Based on that, I don't understand how what you described could occur.

      As far as the MS proxy problems, it was probably the more sophisticated HTTP/1.1 handling in newer versions of java that gave problems to your old proxy that did not support HTTP/1.1 proxying correctly. Forcing HTTP/1.0 or changing the setting of your HTTP Connection with regards to keep-alives might have solved this problem.

      --
      Everything I write is lies, read between the lines.
    8. Re:Seems strange to me by 1110110001 · · Score: 4, Insightful

      PHP5 could not continue backward compatability, PHP had to break backwards compatibility, ...

      I keep reading this and am wondering if you ever ported code from PHP4 to PHP5. I did it with a bigger project and the only problem I had was, that someone had uses StdClass without creating an empty instance first. Took about a day to fix that. It's nothing like VB6 vs. VB.NET.

    9. Re:Seems strange to me by mrdaveb · · Score: 2, Informative

      PHP3 to PHP4 was also a big jump. But if you actually look at the backwards incompatibility list between PHP4 and PHP5, it is a very short list of very minor tweaks. I can say with a very good level of confidence that they aren't going affect me at all! OK, I can say this because I already switched, but you see my point.

      There have been big steps forward 'under the hood' and with the new object orientation and better scoping... but this is basically all new stuff. Nothing widely used has been removed. I think they will start carefully stripping out the cruft for PHP6

      --
      Homme petit d'homme petit, s'attend, n'avale
    10. Re:Seems strange to me by massysett · · Score: 1

      or move to another webby language, like Python.

      How good is Python as a web language? Python is very easy to use and structured, while PHP is yucky. Does PHP have some strong points that make it particularly suitable for Web development vs. Python?

      I ask because it seems to me that anyone who has an informed opinion about PHP says it has serious shortcomings. I wonder if PHP is like Windows: acknowledged to be technically inferior, but widely used because it has a huge adoption rate.

    11. Re:Seems strange to me by sgtrock · · Score: 2, Informative

      If you're interested in Python Web development, you'll find a host of network and Web specific frameworks. I suggest checking out Twisted, Zope, Plone, and Django for examples. You may also find some other goodies when you explore the Python Cheese Shop.

      Of course, no mention of Python can pass by without someone bringing up Ruby on Rails, so I'll just do that right now. :) However, I have no experience with it whatsoever, so I'll withhold any opinion.

    12. Re:Seems strange to me by M.+Baranczak · · Score: 1

      Does PHP have some strong points that make it particularly suitable for Web development vs. Python? PHP is an absolutely horrible language. (I won't reiterate all the ways in which it's a horrible language, because I'm pressed for time, and you've probably heard it all anyway.) But its one killer feature is convenience - and that's why it's become so popular. The basic features of PHP can be quickly learned by anybody with half a brain, and deploying PHP apps is usually just a matter of putting the files into Apache's web doc directory. I've never worked with Python, so I don't know what it's like... but ever tried deploying a Ruby-on-Rails app? It's a total clusterfuck. Java is better (especially since most modern IDEs will do all the gruntwork for you) but it still doesn't quite reach that level.

      This situation is a damn shame. Most programmers who get into PHP don't realize the awful truth until it's much too late, and they have several thousand lines of code to feed and care for. Remember kids, it's not worth it!
    13. Re:Seems strange to me by Anonymous Coward · · Score: 0

      now obviously, good programmers would never call anything "this", they'd assign it a descriptive name. Sadly, PHPs ease of use has meant that everyone with a text editor and a <? echo "hello world" ?> * script calls themselves a programmer.
      So, are you saying *you* were never a beginner? You didn't do "hello world" on your first day because you already knew everything about programming?
    14. Re:Seems strange to me by asdfghjklqwertyuiop · · Score: 1

      How good is Python as a web language? Python is very easy to use and structured, while PHP is yucky. Does PHP have some strong points that make it particularly suitable for Web development vs. Python?


      Yes, PHP is a piece of junk language to be sure, however it is ubiquitous, convenient, and works ok for simple web pages. It is also understood by web design software (like dreamweaver) and is doable by web design people who aren't hardcore programmers (I guess that was its whole point).

      That said, one approach I've taken in the past a couple of times for bigger/more complicated apps is writing the guts of the application as a standalone program (a daemon or service) and giving it an XML-RPC interface. Then, I'd write a simple PHP web interface which talks to the real application via XMLRPC (there's an xmlrpc client library out there for php).

      Now, there is obviously overhead in using it this way, so it usually doesn't make sense to do all of this for some simple database frontend (which is all that a lot of web apps are). But for bigger, more complicated things it may be worthwhile. Design people can fidget with the front-end easily, the PHP mess is kept small and simple, and you get to use whatever language you want for the real work (pretty much all modern languages have easy to use XML-RPC libraries now). Plus, this makes it quite easy to write other sorts of interfaces to the application, should you ever want to (like, a simple command line utility for system administrators to check the status of report generation, in one of my cases)

      My favorite language is python, but unfortunately due to its syntax it does not work well for templating (doesn't cleanly embed in HTML or anything else). The python templating systems that exist add "impurities" to the Python syntax in templates to indicate things like the beginning and end of a block. I wound up using Cheetah for one unfortunately short lived project. I intially hated cheetah because of its syntax, however after actually using it I found it to be surprisingly intuitive from the perspective of a python programmer. Often I wasn't sure how to write some construct in cheetah, but I'd just try what I thought would be correct and it just worked, time after time. I wish its error handling/reporting sucked less, but I find myself wishing that of many templating systems.

      I've only ever written about 2000 lines of ruby code just to see what it was like. I liked it a lot, but not more than I liked python. I hated rails, but ruby syntax embeds fine.
    15. Re:Seems strange to me by lems1 · · Score: 1

      I couldn't agree more.

      This makes me feel that's time to take the plunge and re-write my apps in Perl. Perl will always be around and it works flawless on webapps (as it has worked for a very long time).

      Moving from PHP4 to a more robust and secure PHP5 is necessary. (though IMHO very stupid)

      The right thing would've been, of course, to write something that's simple to use, but also very secure, from scratch (Python, Perl, etc come to mind). With the availability of an almost infinite possibilities brought by Class::DBI, Template Toolkit and other nice modules, I don't think there is any need in PHP any longer. At least not for me.

      I'll start my slow migration right now, that way my apps will survive the test of time...

      --
      This sig can be distributed under the LGPL license
    16. Re:Seems strange to me by Tsar+Ivan+IV · · Score: 1
      Python has several excellent templating systems. The problem is that there are so many templating systems (and HTTP frameworks, and object-relational mappers) to choose from, someone trying to figure out where to start with Python web development is likely to become frustrated and choose Rails instead. Genshi has proven very effective for me. Genshi does an excellent job of reporting template errors (your concern with Cheetah). Version 0.4 even supports embedding clean python syntax (via

      <?python ... ?>
      blocks) although this is frowned upon.
    17. Re:Seems strange to me by Dalfiatach · · Score: 1

      I ask because it seems to me that anyone who has an informed opinion about PHP says it has serious shortcomings. I wonder if PHP is like Windows: acknowledged to be technically inferior, but widely used because it has a huge adoption rate.

      Personally I think (and this will almost certainly be considered trolling) that those who hate PHP and claim it cannot be used for complex projects are simply poor programmers....or perhaps, more accurately, unimaginative programmers. The kind of people who have to do things by the book at all times, who have little initiative. Coders like that need the ridiculously over-specced rigidity of what they consider "real" languages: all those rules make them feel nice and safe. Somebody else referred to the academic atmosphere, almost "high church theology" of J2EE and company - I though that was hugely insightful myself.

      I've built fairly substantial corporate projects in PHP. Large billing and e-commerce and purchase control systems. One in particular has been running happily for four years now and runs nearly all the global business of a medical device company - processing millions of euro a year. Every 6 months or so, I get a call to come in and do some work on it - and that work is, invariably, extending the system to cover even more of their business processes. It's really a mini-ERP at this stage. In PHP, running for years, everybody more than happy, and in those 4 years I've probably spent less than 10 weeks in total on actual development. Did the whole thing by myself, too.

      If I'd done it in Java (or .Net) it would have taken me 6 months and a whole squad of codemonkeys to get the first beta version out the door, and the damn thing still probably wouldn't be working properly, and every minor tweak would cost a fortune and take weeks. But I'd have used a "real" language, ye see, so that makes the cost and lack of actual delivery OK.

      --
      Day by day, the penguins steal my sanity
    18. Re:Seems strange to me by shish · · Score: 1

      I still run applications that were developed (and even compiled sometimes) in java 1.0 on the java 5 platform ... how is this relevant? The story is about dropping support for the old runtime. You can still run php4 code under php5, just like you can run java 1 code in java 5...
      --
      I mod down anyone who says "I will be modded down for this", regardless of the rest of their comment
    19. Re:Seems strange to me by ls671 · · Score: 1

      Thanks, I am glad to learn that in PHP, backward incompatible means the same as backward compatible in Java. The PHP upgrade page list backward incompatible changes.

      --
      Everything I write is lies, read between the lines.
    20. Re:Seems strange to me by oliderid · · Score: 1

      I'm currently developping a PHP5 driven web service (front-end web site). It is certainly a huge improvment over PHP4. You 've got absract, extends, and so on. Great

      But I just spent two hours trying to do a dumb thing like an array/collection of objects
      inside a class :
      a dumb thing like in c#
      String[] myobjects;

      All I got was this fatal error:
      "Object of class stdClass could not be converted to string"
      I had to go backward and use a messy hash table instead.
      I'm sure it is possible(I hope so), but I didn't have enough time to do it.

      PHP5 is still half-glue language half object oriented. Fast, Easy and Fun but for a true object oriented solution you should look elsewhere.

  9. Re:If only... by misleb · · Score: 1, Offtopic

    Agreed - on TFA I was hoping to see the 'PHP4 to Python' migration guide


    Or Ruby! After learnign Ruby, I never want to type a line of PHP garbage again. Python's good too, I suppose. But my experience with the Twisted framework turned me off to Python.

    -matthew
    --
    "THERE IS NO JUSTICE, THERE IS ONLY ME." -Death
  10. Re:If only... by rubycodez · · Score: 1

    Microsoft sure panders to braindead customers.

  11. We need something like PHP by pooh666 · · Score: 1

    I just wish it wasn't PHP..

    1. Re:We need something like PHP by Anonymous Coward · · Score: 0

      Like Python with TurboGears or Django?

  12. Translation by a16 · · Score: 2, Informative

    cry me a river? upgrading pains are a part of the IT industry, people need to either accept this or get out. Maybe so, but let me translate what you just said slightly:

    cry me a river? upgrading pains are a part of the IT industry, my customers need to either accept this or go to a host that hasn't upgraded yet, and stop paying me money. I'm guessing you aren't running a business...

    I work for a reasonably large hosting company that held off until a few months ago to announce that we're going to PHP5 in a few weeks. Before this point, we'd had a steady trickle of 1-2 customers a month asking when we are going to PHP5. Since the announcement, we've had up to 4-5 customers a week complaining that they will leave if we dare upgrade, they can't stand companies that change things for the sake of upgrading, etc. etc. The fact is that there are a *lot* of small business websites, designed for them by some employee x years ago, which will break when we go V5 (heck, even disabling register globals screws up most of these client sites) and the customer has no employees capable of fixing it. We've been helping customers with extra hand-holding when it comes to ensuring they will be ok, but it is costing us time to support these customers, and a reasonable percentage will simply leave us a week before the swap.

    I really do believe their will be massive demand for a PHP 4 only reliable host rolling their own security updates, after end of life. I know a reasonable percentage of our client base that would likely consider them...
    1. Re:Translation by LighterShadeOfBlack · · Score: 1

      I'm sure some people won't like it. Most businesses don't like spending money, even if they know it's for their own benefit in the long-term. If they've got code that they have no means of supporting that's bad management, I mean how can a business rely on something that they have no means of updating or fixing if it goes wrong?

      If a small business owner got an employee who knew a bit about electrical wiring to come in and wire their physical place of business, and then a few years later a safety regulator comes in and says the wiring is unsafe and could cause a fire would the business owner find it unreasonable that he should have to pay to get a professional to do the job properly? I'd hope not. And this is the same situation. PHP4 and things like register_globals present a security risk and by stubborn or ignorant website owners believing that they shouldn't need to update their code it puts everyone on the server at risk.

      --
      Spelling mistakes, grammatical errors, and stupid comments are intentional.
    2. Re:Translation by petermgreen · · Score: 1

      If they've got code that they have no means of supporting that's bad management, I mean how can a business rely on something that they have no means of updating or fixing if it goes wrong?
      afaict the typical scenario is that a small buisness cannot afford to have a proper software engineer on staff even if they can find one so things are either written by an employee who happens to have some skill in the area or by a contractor. Either way those commisioning the site will not have the skill to judge if the resulting code is well written and maintainable or not, that won't be discovered until the person who commisioned the site has to get someone in to change something.

      If a small business owner got an employee who knew a bit about electrical wiring to come in and wire their physical place of business, and then a few years later a safety regulator comes in and says the wiring is unsafe and could cause a fire would the business owner find it unreasonable that he should have to pay to get a professional to do the job properly?
      Assuming the safety inspector directly or indirectly (by indirectly i mean things like mandatory insurance and inspections required to get it) had the force of governement behind them. They would probablly pay up grudgingly because they had no choice but to do so or close up buisness.

      To my knowlage there aren't government enforcers chasing down websites that use php 4 and register globals or webhosts that offer those features (sure there are laws like data protection in some countries but those are difficult to enforce until after the damage is done).

      --
      note: i'm known as plugwash most places but i screwd up registering that here somehow in the past and now can't register
    3. Re:Translation by Crimsonjade · · Score: 1

      I really do believe their will be massive demand for a PHP 4 only reliable host rolling their own security updates, after end of life. I know a reasonable percentage of our client base that would likely consider them... Such a company would likely charge a premium rate over a normal host. In which case, does it not make sense for the client to get a hired gun to come in and migrate the code for PHP 5? It shouldn't be hard, we are talking about small businesses here.
    4. Re:Translation by chez69 · · Score: 1

      dude, just drop the dumbasses that insist on old versions of PHP. Offer to help them move, but if the clowns won't move, your going to pissing money away when your server gets pwned by some stupdid script kiddy.

      do what most businesses do, drop the customers that you lose money on.

      --
      PHP is the solution of choice for relaying mysql errors to web users.
    5. Re:Translation by chez69 · · Score: 1

      the cost of your network getting broken into and having customer credit card numbers leaked is much larger then hiring some intern to move your software to a secure environment.

      We had some guy from a local college in my last job do that. he'd come in and maintain the braindead cold fusion apps every other quarter.

      --
      PHP is the solution of choice for relaying mysql errors to web users.
  13. Re:If only... by aneeshm · · Score: 1

    Are you saying Microsoft is a braindead company

    Are you seriously asking such a question? ;)

  14. It's about time by dandaman32 · · Score: 1

    PHP 4 has been around for forever, and PHP 5 is so much more powerful with the new object model. I've been driving myself mad trying to ensure PHP 4 compatibility for one of my projects, and not being able to use basic OOP features like class constants and public/private/protected variables can drive you batty. It's good that someone at Zend Corp has finally stepped up to the plate and gave PHP 4 its long-deserved kick in the pants. And PHP 5 isn't that hard to migrate to, you can compile it from source and have it installed in 2 hours max with no downtime if you read the manual and know what extensions you need and how to compile them.

    --Dan

    1. Re:It's about time by Spy+der+Mann · · Score: 1

      I only wish PHP4 had reserved some FORWARD-compatibility, like allowing words like "public", "private" and "protected" even if they wouldn't mean anything at the time. Same goes with constructors and destructors.

  15. Re:If only... by suv4x4 · · Score: 1

    Are you saying Microsoft is a braindead company for tying up with Zend to enhance PHP on Windows servers?

    You don't know Microsoft very well, do ya. They don't partner with PHP since they like the language. Everyone knows PHP is garbage, and PHP developers worth their salt doubly so (*shameless plug* well I'm a PHP developer and I think I'm worth my salt */shameless plug*).

    PHP's value is that it's everywhere. EVERYWHERE. Sometihng like 99% of the shared hosts out there run on PHP. So when you develop for PHP you gain compatibility with the rest of the world that hosts on cheap shared hosting. Same reason why people develop for Windows.

    Microsoft has a plan in multiple steps and if you hang around their forums and knowledge bases you'll figure it. Ponder this, the y offer few PHP related things:

    1. Making PHP run better on Windows (partnership with Zend). Many of the PHP devs already program on Windows, the goal is to get them to deploy on Windows servers as well (there are some benefits in the integration-with-dot-net-stuff department, other than that.. well nah).

    2. Actively advertising PHP compilers for .NET (magnitude of better performance).

    3. They actually have created a PHP to .NET migration guide.. AND they have created a tool that will take your PHP code and output C# code! Of course it doesn't always work 100% but helps a lot getting you there.

    Now you see how much Microsoft loves PHP.

  16. more like PERL End of Life announcement! by Anonymous Coward · · Score: 0

    I know I'll get mod'd down for this (it's not off-topic, just read more carefully:), but the fact remains: With PHP 4 no longer supported, it has become clear that the typical excuses for Perl ("but it's installed on so many of my hosts that haven't seen an upgrade since 1998!") is no longer relevant. Legacy is dead! Long live PHP 5!

    1. Re:more like PERL End of Life announcement! by Anonymous Coward · · Score: 0

      Hurray! Everybody loves a Perl basher!

  17. Re:If only... by gunny01 · · Score: 1

    What exactly is so bad about PHP?

    --
    kill all the fucking niggers
  18. Re:If only... by the_womble · · Score: 1, Interesting

    Ok, lots of people hate PHP, and I can see it is ugly and encourages insecure practices. But why is so much of the most popular software for the web written in it? Consider:

    CMSs: Joomla, Drupal, e107, XOOPS, various thngs with "Nuke" in their name, Geeklog...
    Blog engines: Wordpress, Textpattern, Nucleus, b2evo, Serendipity..
    Wiki: MediaWiki, Dokuwiki, PmWiki,...
    Forums: PHPBB, Simple Machines Forums, punBB,....

    Those lists could be a lot longer, I have not even listed everything I use or might use (I am trying CMS Made Simple at the moment, for example).

    If PHP was so bad, surely there would be better software written in other languages would walk all over it. When I look around for software to run a site on, most of the top few choices are written in PHP. Why?

    It is not hosting: there is plenty of cheap hosting for Perl, Python and, increasingly, Ruby. Even Windows and ".Net" hosting is not too expensive these days.

    It is not buzz and mindshare either: Ruby has that.

    It is not the existing base of software: Perl has that.

    OK there is plenty of good software in other languages, but ugly, boring PHP seems to be doing very well.

  19. Re:If only... by kestasjk · · Score: 1

    If language was everything then Python and Ruby would be good, but unfortunately support and libraries are also important, so PHP and Perl are the better choice if you want something as useful as possible.

    --
    // MD_Update(&m,buf,j);
  20. Hosting companies by Anonymous Coward · · Score: 0

    Don't worry about hosting companies. In my experience picking up multiple accounts on various Web hosts, shared hosting sites tend to avoid breaking tons of Web applications on their boxes with over 500 different sites by simply not patching them. Worse, certain hosts don't even keep a good patch management scheme or support scheme; I've seen for example Fedora Core 2 and Fedora Core 4 boxes while FC5 was nearing its EOL (FC4 being dead for months already), and any patches were hand-compiled. RHEL boxes cost money, some hosts don't want to pay for a support contract; CentOS is fairly popular in the business world because of this.

    Shared or managed hosting doesn't equal security. Don't trust it.

    1. Re:Hosting companies by chris_mahan · · Score: 1

      Did managed hosting for a year. Found the situation exactly as you describe. We bought our own servers eventually and haven't looked back.

      --

      "Piter, too, is dead."

    2. Re:Hosting companies by Antique+Geekmeister · · Score: 1

      I've seen good reports of fully virtualized servers for this, up to 10 entirely distinct operating systems on the same hardware server, to support exactly this sort of need. VMware and Xen seem to work well for this.

    3. Re:Hosting companies by chris_mahan · · Score: 1

      Thanks. At the time we felt it would be easier with our own hardware. In the future we'll definitely look at virtualized servers.

      --

      "Piter, too, is dead."

  21. finally! by Spliffster · · Score: 4, Informative

    This is a great move I think. php 5 has been out for years, superior and pretty backward compatible to php 4. Many problems in the past with 4.3/4.4 and 5.0/5.1 releases have happend due to the backward compatibility of php 5. I hope this will ease development and result in a robuster solution.

    Becasue php5 is already in the wild for years and there is still more than a year of security updates available, I think there should be time enough for migration to php5. I is also not too hard to migrate, I have done this in the last 1-2 years on many sites. There are some really annoying changes in php 5 but the php guys have documented it well [1].

    Using the "Migrating from PHP 4 to PHP 5"[2] Documentation was very helpfull and it turned out to be pretty easy (except for scripts/applications which were already ported from php 3 and still were using php 4 backward compatibility "features").

    1) http://www.php.net/manual/en/migration5.incompatib le.php
    2) http://www.php.net/manual/en/migration5.php#migrat ion5.changes

  22. Coordinated switch-to-5 campaign by yelvington · · Score: 5, Informative

    Coinciding with this announcement is the launch of a campaign to switch major PHP-based Web applications to PHP5-only support. The GoPHP5.org website has details.

    Projects supporting this move have pledged that by Feb. 5, 2008, they will no longer accept PHP4-specific changes in their codebase and that all future upgrades will assume PHP5 availability.

    This doesn't mean they are rewriting all their code to OOP-style, or that they will end legacy version support for security patches, et cetera. What it means is that the developers are liberated from having to code around PHP4's limitations and can take advantage of PHP5 features for all future enhancements.

    Often something that might require hundreds of lines of code in PHP4 can be done with just a few in PHP5. The SimpleXML parser is probably the best example.

    Application teams already on board for this switch include Drupal, phpMyAdmin, Typo3, Symphony, Gallery, DeskPRO, and many others. Several major projects not yet committed are known to be preparing to do so.

    This is most important to hosting companies as a signal that robust PHP5 support is a requirement going forward.

    1. Re:Coordinated switch-to-5 campaign by Tablizer · · Score: 1

      Often something that might require hundreds of lines of code in PHP4 can be done with just a few in PHP5. The SimpleXML parser is probably the best example.

      What keeps somebody from porting it over to 4?

    2. Re:Coordinated switch-to-5 campaign by mcalwell · · Score: 1

      Often something that might require hundreds of lines of code in PHP4 can be done with just a few in PHP5. The SimpleXML parser is probably the best example. Can you think of anything else?
    3. Re:Coordinated switch-to-5 campaign by uss_valiant · · Score: 1

      Often something that might require hundreds of lines of code in PHP4 can be done with just a few in PHP5. The SimpleXML parser is probably the best example. Can you think of anything else?
      • Exceptions. Any larger, serious PHP application needs error codes and/or exceptions. In Gallery 2 we emulate exceptions by means that are compatible with PHP 4 and PHP 5 and we'll be able to save tons of code by moving to real exceptions.
      • Or PHP 6 compatibility. We won't be able to move forward, making the application compatible with PHP 6, unless we break compatibility with PHP 4. With the first release of PHP 6 seeing the light around the end of 2007, the move to PHP 5 comes at the right time.
      • Enabling a user-defined PHP error handler without a major performance hit. Due to PHP 4 compatibility, we have tons of E_STRICT level PHP warnings, mostly about the missing "static" keyword because we have a lot of static class functions. The user-defined PHP error function gets called for all errors/warnings/notices, even if they're suppressed. It's the job of the function to ignore all such calls. But the sheer number of those calls slow our application down under PHP 5 by ~5%. Which is why we enable our PHP error handler only under PHP 4 by default. Yes, one can design an application mostly without any static class functions and work around other E_STRICT warnings, but it doesn't make your life as application developer any easier.
      • And there are many more smaller things.

      These are just some examples from our project. I'm sure every larger project has their specific issues with PHP 4.

  23. Re:If only... by rho · · Score: 1

    PHP has an easy learning curve. You can go from nothing but HTML with a simple dynamic counter, to an entire DB-backed dynamic site. The documentation for PHP is excellent. And if you're competent in any other language you can add PHP to your repertoire easily. This makes for a compelling arrangement for a large, multi-person project. Everybody from experts to duffers can contribute.

    --
    Potato chips are a by-yourself food.
  24. Re:If only... by petermgreen · · Score: 1

    When I look around for software to run a site on, most of the top few choices are written in PHP. Why?
    If someone already has a hosting account that offers php and nothing else and they want to add another service to thier site are they going to migrate all thier services to a new host (risky)? are they going to have two seperate hosting accounts (expensive)? or are they just going to choose a php app to provide the service?

    I see php on the web as similar to VB on the desktop. It provides an easy way for those who can barely program to put together stuff that sort of works and can be deployed almost anywhere. Those who can really programm then get sucked in to writing the stuff through a variety of routes (deplyoyment condierations, maintinance monkey availibility, possibility for users who can barely program to hack in thier own changes, integration with existing code and so on)

    --
    note: i'm known as plugwash most places but i screwd up registering that here somehow in the past and now can't register
  25. Re:If only... by the_womble · · Score: 1

    If someone already has a hosting account that offers php and nothing else
    Not common enough. Every hosting service I have looked at offers at least Perl as well, most several other languages.

    are they going to have two seperate hosting accounts (expensive)?
    Most of the cheap hosts charge per site, expensive ones really should not be offering just PHP.

    possibility for users who can barely program to hack in thier own changes,
    Now, that is the killer, IMHO. It is very easy to learn PHP and alter or extend apps. PHP CMS tend to also have very flexible and easy to use templating systems. The good documentation helps a lot.

    That is my point, PHP does have genuine advantages. That i

  26. Re:If only... by PhrostyMcByte · · Score: 1

    The reason is simple: PHP makes it exceedingly easy to get away with things. Things that programming and web development newbies love because it lets them hack together a quick app. Things that experienced programmers will cringe at because they know full well that it will likely cause a headache later.

    They've done some good work in stomping out these bad practices in recent times, but they still have a while to go.

  27. Re:If only... by kailoran · · Score: 1

    I'd say it's not even support or libraries, it's being actuallyinstalled at cheap webhosts. PHP is everywhere, python and ruby - not so much.

  28. Still installing CentOs 4 by slashkitty · · Score: 1

    I know lots of places still installing CentOS 4.

    yum updates for Centos 4 will not upgrade your php.

    Is php that full of holes that they can't continue to support it?

    --
    -- these are only opinions and they might not be mine.
  29. slower, sometimes a lot slower by Anonymous Coward · · Score: 0

    Every benchmark I have ever come across shows php 5.2.x vs 4.4.x is 20-30% slower.
    That's another reason why people delay updating, especially on shared servers.

    1. Re:slower, sometimes a lot slower by Anonymous Coward · · Score: 0

      I can second this from my own experience. I had a contract job re-writing a lot of php code into a C-based module inside PHP. When PHP5 was released, we stopped that effort briefly and did some benchmarks, some test cases that were designed to replicate what our code usually did, and PHP5 was significantly slower.

      Of course several versions of PHP 5 have come out since then.

      Rewriting code from php into c or c++ can make for speedups as much as 3 orders of magnitude, especially if you do lots of object related stuff.

  30. While we're on the subject by weaponx86 · · Score: 1

    I have a few sites hosted through HostGator running php 4.4.4 as an Apache module. Recently they "upgraded" to phpsuexec 4.4.4 which runs as cgi. They are touting it as more secure and reliable bla bla bla.

    Well it broke http authentication on a few pages which ruined my day.

    Changelist here http://forums.hostgator.com/showthread.php?s=1f606 f88e85e97402645b68bd0dc1be8&t=8822

    Maybe it would have been better to upgrade to PHP5.

  31. Lower down your giant nose,.. by imkow · · Score: 1

    "Things that experienced programmers will cringe at because they know full well that it will likely cause a headache later."

    Instead of complaining about php, "experienced programmers" can do anything with any tool. either it is PHP, Perl, Ruby, Python, ASM, C/CPP. or alienian symbols. They adopt any language well enough to do anything they want. Any one who still complaining about PHP is definitely not "experienced" neither in PHP nor programming at all. because PHP is in most cases powerful enough!

    --
    China, in fact, is very fragile.
    1. Re:Lower down your giant nose,.. by Anonymous Coward · · Score: 0

      Any one who still complaining about PHP is definitely not "experienced" neither in PHP nor programming at all. because PHP is in most cases powerful enough!
      Of course PHP is "powerful enough" to do anything. It's Turing-complete. But it's not a question of "power", but of more subjective issues - expressiveness, aesthetics.

      In other words, just because we complain about PHP doesn't mean we can't do stuff with it. It just means we don't enjoy doing stuff with it, because it's a horrible, horrible language that turns the most trivial of tasks into a tedious exercise in working round limited constructs and braindead semantics, and fights against the programmer at every step of the way to try to prevent the use of any sound methodology or sane design.
    2. Re:Lower down your giant nose,.. by PhrostyMcByte · · Score: 1

      What the hell? People should just ignore things they don't like instead of discussing the problems? Is that how things get fixed where you live?

      You seem to have missed my point- the lang is usable just all programmers. That's why it is so popular.

      The problem is the noobs don't know any pitfalls to look out for yet and PHP has provided a lot to hang yourself on that other languages don't have. If you feel I insulted your pet language, how about discussing it now instead of ranting on what you think programmers should (not) do.

    3. Re:Lower down your giant nose,.. by smellotron · · Score: 1

      Any one who still complaining about PHP is definitely not "experienced" neither in PHP nor programming at all. because PHP is in most cases powerful enough!
      It's not always an issue of being "powerful enough". All general-purpose languages are essentially Turing-complete, which means they're all identical power-wise. I think PHP is a great tool for web applications, but it has a lot of weaknesses in comparison to other languages. Sticking your head in the mud doesn't mean that the weaknesses don't exist.
  32. Re:If only... by rgravina · · Score: 1

    No no, Twisted is great, just has some initial learning curve (but once you get over that, it makes network programming easy). Either way, if a PHP progammer moves to Ruby or to Python, the world is a better place.

  33. Re:If only... by misleb · · Score: 1

    OK there is plenty of good software in other languages, but ugly, boring PHP seems to be doing very well.


    Be that as it may, it is still a boring, ugly language that I wouldn't be sad to see it go "End of Life." That's all.

    --
    "THERE IS NO JUSTICE, THERE IS ONLY ME." -Death
  34. Re:If only... by daeg · · Score: 1

    There's a plus side to that: Everyone and their mother can run a CPanel-based "host" that runs PHP. Not everyone can run a good Python or Ruby host, so most Python or Ruby hosts you find are not only knowledgeable, but passionate about Py/Rb support.

  35. Re:If only... by misleb · · Score: 1

    I'm not going to bother with a language flamewar, but suffice to say that I think PHP is a boring, ugly language.

    --
    "THERE IS NO JUSTICE, THERE IS ONLY ME." -Death
  36. Re:If only... by Anonymous Coward · · Score: 0

    There's a lot of things fundamentally wrong with PHP. Example: references. In pretty much every language, a reference is a pointer. In PHP, a reference is a reference to an entry in the symbol table. That means you can't return an array by reference, you need to assign it to a temp variable and return the reference to the temp variable. Likewise, you can't pass in an array by reference, you need to assign it to a temp variable.

  37. Re:If only... by misleb · · Score: 1

    I dunno, I hear Dreamhost, the big Ruby on Rails host, really blows. If you want good support, at least for Ruby/Rails, you're much better off getting a Private Virtual Server. That way everything is just the way you want it (OS and all) and you get root access.

    --
    "THERE IS NO JUSTICE, THERE IS ONLY ME." -Death
  38. Re:If only... by Christianfreak · · Score: 1

    For the same reason that Windows is the most popular OS. It was easy to use and available and now we're stuck with it.

    Large hosting companies like it because its an easy way to give a scripting language to their customers. Everyone now uses it so the hosting companies arent' going to switch.

    The big CMS folks that you mentioned were smart to use PHP since that's what all the hosting companies have. Not to mention that those projects started out as open source projects probably by people who didn't have a lot of programming experience and PHP is easy to learn and forgiving in terms of mistakes (far too forgiving IMHO)

    Personally I can't stand any of the packages you've mentioned. Sure they're great for putting up your blog but you wouldn't believe how many customers I get who want wizz-bang sites built on top of one of those, when a custom solutions would be so much easier.

  39. Re:If only... by poopdeville · · Score: 1

    Dreamhost lets you install pretty much anything you want in your ~/. If you don't like Dreamhost's RoR chain, install your own. No need for root either.

    (I had to do this to get Catalyst installed, since Dreamhost's perl didn't include it)

    --
    After all, I am strangely colored.
  40. Re:If only... by misleb · · Score: 1

    But you don't have any control over the web server software, AFAIK. That can be very important to getting a Rails app running just the way you need/want.

    I think one of the reasons PHP is so universal is that it is dead simple to setup. Just install mod_php and you're pretty much done. Other languages and frameworks are a lot more complicated.

    -matthew

    --
    "THERE IS NO JUSTICE, THERE IS ONLY ME." -Death
  41. Pro-OOP hype detected by Tablizer · · Score: 1

    But as web pages became more complex, soft typing, lack of proper scope, and lack of OOP patterns made developing complex PHP applications a world of horror.

    I have yet to see a good example of an OOP framework noticably improving code maintenence over a procedural equivalent for the type of apps where PHP is usually used.

    That being said, a lot of the incompatibility between 4 and 5 is a revising and cleaning up of the PHP OOP model to better reflect Java's approach to OO, and tuning for heavier OO use. Since Java was an OO-centric language from the start, it didnt' have this issue.

    It would be like trying to incrimentally bolt on Functional Programming (like Higher Order Functions) constructs onto Java. If after a point your realize the hacked-on FP model stunk, you would have to create versioning problems to revamp it to do it right. Perhaps if Java decides to clean up its meta-model, it would have similer problems. This is because Java's meta-model was not given much thought early on, remaining a weak-point of Java.

  42. Likewise Mac OS X by mfnickster · · Score: 1

    Tiger shipped with PHP4 installed, and there is basically one guy, Mark Linyage, who is packaging a PHP5 installer for Tiger.

    Unfortunately, he refuses to support older versions of Mac OS, and for various reasons I'm still working with Panther on my laptop and some of our servers, so I have been struggling mightily to get PHP5 to compile and install.

    I wish Apple would provide some support for these 'freebies' they include with the OS, but their attitude seems to be "if we didn't invent it, it's not our problem." :-/

      - Nick

    --
    "Slow down, Cowboy! It has been 3 years, 7 months and 26 days since you last successfully posted a comment."
  43. Re:If only... by raju1kabir · · Score: 2, Funny

    What exactly is so bad about PHP?

    It's too street to have any snob value.

    The linguistically nouveau riche, who have recently tried to score a little upward social mobility by learning some Python or Ruby, resent nothing more than the teeming masses of hungry PHP developers underbidding them.

    --
    "Patriotism is your conviction that this country is superior to all other countries because you were born in it." -- GBS
  44. Re:If only... by Anonymous Coward · · Score: 0

    PHP makes it exceedingly easy to get away with things. Things that programming and web development newbies love because it lets them hack together a quick app. Things that experienced programmers will cringe at because they know full well that it will likely cause a headache later.
    Which things? Spell it out, please... I admit I'm a n00b. I want to know what to avoid to become a better programmer!
  45. Re:If only... by Goaway · · Score: 1

    I'm not going to refute that, but I will say that it is possible to be both a hipster and correct.

  46. Re:If only... by Anonymous Coward · · Score: 0

    Sure, everything you mentioned works "ok".. But have you actually checked their codebases? World of horror. They don't even comment their horror properly.

  47. Comment removed by account_deleted · · Score: 1

    Comment removed based on user account deletion

  48. Comment removed by account_deleted · · Score: 2, Funny

    Comment removed based on user account deletion

  49. Re:If only... by Anonymous Coward · · Score: 0

    If PHP was so bad, surely there would be better software written in other languages would walk all over it. When I look around for software to run a site on, most of the top few choices are written in PHP. Why?
    PHP is as easy as ASP, and as nasty as ASP, but it (on top of Linux OS) is FREE. It costs more for ISPs to slap Windows server license on a server with ASP engine. Or was this a rhetorical question?
  50. Re:If only... by smellotron · · Score: 1
    Here's a few things that frustrate me (as an ex-professional PHP developer):
    1. lack of decent module namespacing. Everything lives in the same global scope, which means any public module needs to "hack" this in with naming conventions, such as pg_{connect|query|execute} instead of language-supported alternatives such as pg.connect or pg::connect
    2. interpreter weaknesses. Only recently has it been possible to chain method calls such as $a->getFoo()->doBar(), and it's still not possible to do something like $a->results()[0]. The result is (IMO) unnecessary temporary variables, which end up being the bane of literate programming. Plus, now that I've been spoiled by Python and Lua's abilities to pass in named parameters to functions, it's frustrating to not have that anymore (e.g. x = Window(x=100, y=100, width=200, height=200), which is much easier to understand sans reference than $x = Window(100, 100, 200, 200))
    3. frustratingly bad precedence rules for short-circuit operators. Consider this:

      $a = true;
      $b = false;
      $x = $a and $b; // parses as ($x = $a) and $b, so $x = true
      $y = $a && $b; // parses as $x = ($a && $b), so $y = false
      This is an AWFUL gotcha. I can't think of any benefit to justify the behavior. Backwards compatibility should be deliberately broken to fix this.
    4. the typical arguments about poor function standardization. I won't elaborate on them.
    5. Poor coordination between PHP core and PEAR/PECL repositories. I've seen a lot of buck-passing between the two camps. PEAR is treated both as a core part of successful project libraries and as a completely independent repository, depending on whichever is more convenient at the time.
    6. Poor version-numbering schemes. Major behavior changes occur during minor revisions, and changelogs don't always do a good job of explaining the impact of certain revisions.
    7. Poor default error-handling. I can override the default error handler myself, but there are certain failures that can't be overridden (a command-line switch to say "treat all errors as exceptions" would be nice).
    8. Community encouragement of subpar programming practices. PHP/*SQL tutorials are still being written that show gaping injection vulnerabilities. Everyone writing a web framework seems obsessed with the Front Controller design pattern, without realizing that Apache/Lighttpd is the Front Controller [note: Rasmus Lerdorf is awesome in this regard]. Some people even try to relive other languages within PHP, emulating Java's XML-everything-configuration whilst completely forgetting how that works in Java, when the configuration is loaded once for the lifetime of the server, instead of every page load.
    Whooh. That's a lot of reasons to dislike PHP. I still love it, though, because the language provides the best way I've seen thus far to evolve a project from a static web page to a full-blown application in baby steps. Most other languages rely on fairly heavy web frameworks, which gain a lot of power at the expense of a huge jump in complexity. With a PHP project, I can choose my own level of complexity. IMO, that's the greatest strength of PHP. The ability to use it however I want.
  51. Re:If only... by smellotron · · Score: 1

    OK there is plenty of good software in other languages, but ugly, boring PHP seems to be doing very well.

    The same could be said of C (vs. Lisp). The subject has been talked about plenty before, under the label Worse is Better. The general idea is similar to time-to-market. A product (in this case, a language / compiler) doesn't have to be perfect, it just has to be good enough. The perfect solution will always fail to be the popular solution, because of the effort required to produce it.

    Now, that doesn't mean that the popular solution really is better. Paul Graham made a killing with Lisp specifically because he went against the popular solution at the time. It's no wonder that Lisp and Smalltalk are more popular in the academic community than in the professional (where Java is the order of the day... blechhh).

  52. Re:If only... by pasamio · · Score: 1

    The reason that Windows is the most popular operating system is because at the time it was the most friendly and well known alternative available at a cheap price. The alternatives, OS/2 and Mac OS X, were both priced more than Windows. There are accounts of people buying Windows without having a computer to run it, and very many where they had a computer that wasn't capable of running it. Advertising made Windows popular and ensured its dominance once everyone learnt Windows. These days I have asked some about spending a month in Windows and then a month in Linux. They compare the two that Linux was easier to learn and work out. I'm not sure if its just that they've done Windows and getting the concepts is easier or if its that Windows has more inconsistencies (doubtful) but to state that the reason PHP is popular is because Windows is popular is a massive over simplification of the situation.

    --
    I always wondered where this setting was...
  53. Re:If only... by Anonymous Coward · · Score: 0

    Congratulations... you've not only managed to miss the point, you've also completely missed the reason Windows is popular in the first place!

    The parent is not saying that PHP is popular because Windows is popular, he was making an analogy. PHP, like Windows, is A) clumsy but easy enough to use and B) comes pre-installed.

    The reason Windows is popular is similar - OS/2 had to be installed after the fact, on a machine whose purchase price already included a Windows license. Mac OS X was far from being released when Windows gained its foothold (around 1995... Windows 95 anyone?) and it was not significantly cheaper than the then-current Mac OS. Windows 95 and Mac OS 7.5 both sold for about $95 at the time. The key issue being that you couldn't run Mac OS on a PC.

    Windows became popular because Microsoft had the leverage to impose exclusive deals on the PC manufacturers, and most businesses needed PC software, not Mac. Windows 95 had pretty much caught up to Mac in ease of use, but that didn't really matter. It would have been a hit anyway, because it was the only reasonably-priced OS for PCs that ran all the software businesses most needed.

  54. Re:If only... by pasamio · · Score: 1

    And congratulations AC you've missed my point in that PHP without any major marketing campaign came to this point overtaking other rival technologies such as Perl (no major price differential, still installed on a lot of systems even today) has become a dominant technology without even using all of those dirty underhanded methods that Microsoft used to secure its place. The Mac OS software remains comparable (and now with Leopard cheaper for the feature set than Windows) but it was in fact the cost of the hardware that you had to buy from Apple that made is significantly more expensive than a cheap IBM compatible PC. It is similar with since OS/2 was in fact available before Windows, so I fail to see where a Windows license comes in, however IBM would happily sell you OS/2 on their workstations without having to pay for a Windows license, but again this was more expensive than the Windows alternative. But congratulations your last paragraph exemplifies why comparing it to Windows is in a sense flawed. Why do businesses like PC's? Because they were cheaper than the alternatives. But hey in a small way it seems like we're arguing over the semantics of the same point.

    --
    I always wondered where this setting was...
  55. world is not perfect. by imkow · · Score: 1

    I understand you people keep commplaining about some legacy defects of PHP. Legendary monsters like "Magic Quotes", lack of native UTF8 support, "interpreted", "weak typed", and a lair of countless functions are worst enemies of you noble architects of codes.

          But in my real world, text-based web applications need very few of those acadamical design. The PHP official website hosts , for example, not a full-featured MVC frameworks, but a template engine called Smarty, which is roughly an equivent to the View part of the classical MVC pattern. Why so? Because in PHP applications, Models are mostly nothing but SQL queries and largely can be mixed with the Controllers. So, we all can see in PHP world, people concerns more about HTML output than the church-like academical, mysterious code behind webpages in languages like Java. This output-centred way of programing could be the reason why PHP has more beautiful, creative websites than any other programming language. Lets just count those Forum, Wiki, CMS, On-line Shop products. All-mighty Java on the other hand always has industrial beauty in its code, but has very few web application/website that is received as beautiful, or reusable on the context level..

      In its design, PHP script needs to be excuted in a very short time(better in millisecond). the longer the worse performance is. PHP's not a right language for tasks like encoding or decoding some video clips, nor is any other scirpting language. So the complex logics which need multi-layer abstraction with classes and objects from mechanical level calls to device to business logic simply do not fit for PHP. PHP's job is doing mainly top-level business logics with texts(T from HTML). And for business logics, even the real braindead language like VBS can handle them very well, not to mention it is PHP which does support OOP. Wise asses should pick the right tool for the right job.

      To those who favors Python, Perl, or Ruby, i just say those languages don't have an unified, universal solution as PHP gives us.

    --
    China, in fact, is very fragile.
  56. a good PHPer should write by imkow · · Score: 2, Insightful

    A good PHPer should write codes that works in both PHP4 and PHP5.
    It's not hard. Normally code which runs good in STRICT error reporting mode of PHP4 can run under PHP5 without changes.
    I have been doing this for three years. My local development evironment is the lastest PHP5.2x+ Mysql6.x beta + apache 2.2
    but my deploy evironment is still in PHP4.x. My code works fine all the time;

    --
    China, in fact, is very fragile.
    1. Re:a good PHPer should write by shish · · Score: 1

      A good PHPer should write codes that works in both PHP4 and PHP5. What if a good PHPer wants to take advantage of all the new and useful feautures of PHP5?
      --
      I mod down anyone who says "I will be modded down for this", regardless of the rest of their comment
    2. Re:a good PHPer should write by Loki_1929 · · Score: 1

      That's great; so in 1998, you were writing code that worked on versions of PHP that were two generations beyond what was publicly available?

      It's easy to write code that works under PHP5 now. Write code that you will guarantee will work under PHP7 in 2010 without significant modification.

      --
      -- "Government is the great fiction through which everybody endeavors to live at the expense of everybody else."
  57. Re:If only... by Anonymous Coward · · Score: 0

    And congratulations AC you've missed my point in that PHP without any major marketing campaign came to this point overtaking other rival technologies such as Perl ... without even using all of those dirty underhanded methods that Microsoft used to secure its place.

    Sorry I missed it. Are you sure you made that point?? I can't seem to find it in your post.

    The Mac OS software remains comparable (and now with Leopard cheaper for the feature set than Windows) but it was in fact the cost of the hardware that you had to buy from Apple that made is significantly more expensive than a cheap IBM compatible PC.

    Ah, but you didn't say "Macs were priced more than Windows PCs," you said "The alternatives, OS/2 and Mac OS X, were both priced more than Windows." Which is wrong on two counts, so try to be more specific, please.

    It is similar with since OS/2 was in fact available before Windows

    Nope. OS/2 shipped in December 1987, at which time Windows 2.0 was already on the shelves. OS/2 didn't even get a GUI until a year later, so it wasn't really a comparable alternative.

    so I fail to see where a Windows license comes in, however IBM would happily sell you OS/2 on their workstations without having to pay for a Windows license

    If you're trying to establish Windows' success as a cheap alternative, you can't really include IBM machines because users on a budget would buy a cheaper PC clone rather than an IBM. Microsoft was in a position to tell these manufacturers (who needed Windows) "if you want Windows, you won't ship machines pre-loaded with anything else." That accounted for a hell of a lot more sales than the advertising.

    Why do businesses like PC's? Because they were cheaper than the alternatives.

    That, and they ran the apps that businesses needed, like Lotus 1-2-3. I think the original poster's comparison is correct in this regard; a lot of PHP's success comes from the free availability of web apps already written in it, and hosts with PHP already installed, but you didn't really address that point. And frankly, if you don't get your facts straight, it's hard to put much faith in your analysis.

    - Neal

  58. Re:If only... by Christianfreak · · Score: 1

    I don't think I said that PHP is popular because Windows is popular. I said its popular for the same reasons. Also Microsoft didn't really use dirty underhanded tactics until after they became a monopoly. Windows spread yes because of price and secondly because of ease of use and easy to develop for (no pesky security concerns to worry about).

    Yes PHP and Perl are both free, but look at cost of development. (ignoring the fact that a good PHP developer that will do your program right the first time is going to be as much as the Perl guy :) ). Perl isn't forgiving of errors. PHP is. CGI scripts in Perl can cause a lot of overhead on a system, so especially when hardware was more expensive the shared hosting companies wanted something else. Unfortunately mod_perl is tied directly into Apache, making it insecure for shared hosting (the memory is shared) so PHP was the natural choice.

    Basically just like Windows, PHP was in the right place at the right time. Easier learning curve, easier deployment on a shared hosting environment and cheaper developers. It dominates because of that, not because its a superior product.

  59. Re:If only... by Anonymous Coward · · Score: 0

    Also Microsoft didn't really use dirty underhanded tactics until after they became a monopoly.

    Read James Wallace and Jim Erickson's book Hard Drive: Bill Gates and the Making of the Microsoft Empire, and you'll see how Microsoft played dirty from the very beginning, screwing basically any company that got in their way and many that tried to cooperate with them. The only thing that changed is their grasp eventually expanded to meet their reach.

    - Neal

  60. Re:If only... by shish · · Score: 1

    It's a buggy implementation of a poor design; even if you get your head round the braindeadedness of how things are supposed to work, you still find that there are parts of the language which don't even manage to work at that level...

    (For reference, I work with PHP for a living ;_;)

    --
    I mod down anyone who says "I will be modded down for this", regardless of the rest of their comment
  61. Re:If only... by tehshen · · Score: 1

    Most other languages rely on fairly heavy web frameworks, which gain a lot of power at the expense of a huge jump in complexity. With a PHP project, I can choose my own level of complexity.


    Have you tried using Ruby, Perl or Python without one of their great big frameworks? You can still write simple PHP-like code in a language that doesn't suck.
    --
    Guy asked me for a quarter for a cup of coffee. So I bit him.
  62. Lol by Loki_1929 · · Score: 1

    I have a client with several hundred websites, many of which were done in the late 90s and early 00's on PHP3. Many of them break in PHP4 in some way or another unless you enable all the insecure compatibility stuff. Moving to PHP5 breaks most of them in very bad ways. The cost of updating several hundred websites, each written by different developer(s), sometimes changed by different people over a period of years, developed mostly by overseas contractors working for nothing, and most originally developed for PHP3 is absolutely insane.

    Thus the client remains on (now unsupported) PHP4 with some insecure settings in place to support the broken PHP3 stuff, and has essentially no path for a feasible upgrade. All this makes me less likely to do future projects in PHP and more likely to do them in .NET, which seems (for now at least) to maintain a reasonable level of security and compatibility across multiple versions over several years. Granted PHP has gone from a broken hobbiest toy to a more professional, more secure platform since PHP3, but how much of what is written in PHP5 will be broken entirely in PHP7 a couple of years down the line? How many times do I have to go back and re-write the same thing because the methods that were so great at the time were found to be horribly insecure?

    I'm not claiming any one thing is the be-all, end-all, perfect solutions; merely pointing out that PHP's track record thus far is not making me particularly comfortable with continuing to use it in any significant way. Anything I can do in PHP I can now do faster and easier in .NET unless it's something ridiculously small. Frankly, unless PHP can establish a long-term (where 'long-term' means longer than 3-4 years) framework of usable and secure methods, it's going to burn itself. In other words, unless PHP5's methods are usable and securable in 2009, it cannot remain a major force in anything other than hobbiest sites and the sites of those who just plain don't know any better. ColdFusion's death came far more swiftly than it should have due to the fact that once you moved up a couple of versions, major parts of your applications began to break. That's unheard of in HTML, C/C++, or most other things in the software world.

    The idea of "get it today and it's obsolete tomorrow" is fine for hardware; not for software.

    --
    -- "Government is the great fiction through which everybody endeavors to live at the expense of everybody else."