Slashdot Mirror


PHP Vulnerabilities Announced

Simone Klassen writes "The Hardened-PHP Project has announced several serious and according to them, easy-to-exploit vulnerabilities within PHP. A flaw within the function unserialize() is rated as very critical for millions of PHP servers, because it is exposed to remote attackers through lots of very popular webapplications. The list includes forum software like phpBB2, WBB2, Invision Board and vBulletin. It is time to upgrade now."

387 comments

  1. Arrrrgh by daveschroeder · · Score: 1, Informative

    And of course, Mac OS X and Mac OS X Server 10.3.7 contain php 4.3.2...

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

      ever heard of that little procedure we like to call 'upgrading'?

    2. Re:Arrrrgh by Nomikos · · Score: 2, Informative
      And of course, Mac OS X and Mac OS X Server 10.3.7 contain php 4.3.2...

      Here: http://www.entropy.ch/software/macosx/php/ , are usually uptodate and easy installers for PHP on OS X; he's at 4.3.9 still but I trust the newer one will be up soon.
      They're really fire&forget installers, great for people like me :-)

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

      He should have elaborated.

      "Upgrading" is fine.

      Except when upgrading OS components is likely to break things when official OS and/or security updates come out.

      Mac OS X Server's claim to fame as a server OS is that someone who's not some huge Linux/BSD/UNIX geek can run a nice UNIX-based server. And Apple has done a very good job of keeping up with security updates for OSS components. But unfortunately, you still have to wait on Apple. No, you don't *have* to, but if you don't want to risk breaking shit every time there is an "official" Apple Security Update or OS update, you can't just go around replacing the standard OS components (like apache, samba, php, etc.)

    4. Re:Arrrrgh by Walrus99 · · Score: 1

      PHP is available on OS X, but only if you activate it and then use it for web stuff. Perl is more fun and arrays are too wishy washy in PHP anyway.

    5. Re:Arrrrgh by sirReal.83. · · Score: 1

      You mean your vendor doesn't provide security updates? Yes, that's a real question.

    6. Re:Arrrrgh by daveschroeder · · Score: 1

      No, they do, and plenty:

      http://docs.info.apple.com/article.html?artnum=617 98

      But the problem is, while Apple is very responsive to security issues, you kind of have to wait on them for any updates to components that are part of the stock/standard OS. If you go around installing and updating things yourself OVER the OS-installed components, it could break the real updates when they arrive from Apple. The only alternative is to install the updated version in an alternate location, and then revert to Apple's version when it's updated.

      This, of course, defeats the whole purpose of using something like Mac OS X Server as a server, since it's supposed to release you from doing all of that crap. Of course, Apple will likely provide an update soon, but it's still irritating to have a known open, unpatched vulnerability on a production system, even if it's only theoretical, and even only for a couple of days.

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

      What do you mean by wishy washy? I use PHP regularly and I have no idea what you're on about.

    8. Re:Arrrrgh by Anonymous Coward · · Score: 0

      Well, not that I'm defending Apple, but this isn't far different than updates for RedHat. If a flaw is found in Apache, and you manually update Apache with a tarball downloaded from apache.org, RedHat's 'yum update' wouldn't be able to cope with it either.

    9. Re:Arrrrgh by lullabud · · Score: 1

      In PHP all arrays have the same designator, even for associative arrays (hashes) and numerical arrays, and even more so they're the same as variables. That is 'wishy washy'. In perl you know what your $scalars, @arrays and %hashes are just by glancing at them. Even so, the flexibility of PHP's method is great, especially with functions like wantarray(), but you do have to code accordingly.

      Additionally, you can't just say "I want to use perl" when you're not the one even coding it, but just installing the software.

    10. Re:Arrrrgh by Walrus99 · · Score: 1

      Yes, what lulabud said. I sort of like being able to keep track of what is a variable and what is an array.

    11. Re:Arrrrgh by Anonymous Coward · · Score: 0

      If it's really that difficult for you, you could always put _ary at the end of your array variable names.

    12. Re:Arrrrgh by uhlume · · Score: 1

      So name your variables accordingly, using mnemonic prefixes to denote type. Admittedly, this is of limited usefulness in unambiguously communicating variable type designations to a third party reading your code, but if you're consistent in your practice, it should be fairly obvious what you're about.

      --
      SIERRA TANGO FOXTROT UNIFORM
    13. Re:Arrrrgh by snorklewacker · · Score: 1

      Are you seriously suggesting hungarian notation?

      Still, I don't get the concern ... I thought arrays were values like any other, and put in variables like any other. Functions should expect a single type, be it scalars, objects, or arrays, so there shouldn't be any confusion. Am I misunderstanding something about PHP here?

      --
      I am no longer wasting my time with slashdot
    14. Re:Arrrrgh by Mr.+Cancelled · · Score: 1

      Perl is more fun

      You're a sick puppy, do you know that? 8)

    15. Re:Arrrrgh by Kethinov · · Score: 1

      Upgrading PHP on mac systems is a little difficult. It isn't as easy as apt-get upgrade or emerge sync.

      Fortunately, I have nothing to worry about as my forum software albeit still alpha experimental work, does not have this vulnerability.

      --
      You're right, I wouldn't steal a car. But if it were possible, I sure as hell would download one!
    16. Re:Arrrrgh by sirReal.83. · · Score: 1

      But Red Hat provides updates quite quickly for security issues.

  2. No comment? by jardin · · Score: 3, Funny

    They must be all busy upgrading :)

    1. Re:No comment? by stevesliva · · Score: 5, Funny

      No, all the sysadmins are on holiday vacation. Come on folks, announcing security vulnerabilities on a Friday in December? That's just plain mean.

      --
      Who do you get to be an expert to tell you something's not obvious? The least insightful person you can find? -J Roberts
    2. Re:No comment? by Anonymous Coward · · Score: 0
      Using PHP and then expecting to go on vacation during the holidays? That's just plain dumb.

      -Don

    3. Re:No comment? by Anonymous Coward · · Score: 0

      Hardly, you're just experiencing the /. lag. I knew about this on Wednesday.

    4. Re:No comment? by destiney · · Score: 2, Interesting


      They were announced before today, just read the dates.

      You're probably not subscribed to any security mailing lists.

    5. Re:No comment? by Spy+der+Mann · · Score: 1

      Come on folks, announcing security vulnerabilities on a Friday in December? That's just plain mean.

      Yeah, while the sysadmins are on vacation, lamers who have nothing to do WILL enjoy this christmas present!

      i just hope the idiot who defaced our shared host won't strike again with this new vulnerability. I just hope he was a script kiddie looking for vulnerable servers using an automated tool.

    6. Re:No comment? by Shadestalker · · Score: 1

      Sysadmins should expect vulnerabilities to be exploited over the holidays, and so should users. This is the period when script kiddies and crackers think the machines are least-watched.

    7. Re:No comment? by smokeslikeapoet · · Score: 1
      <!-- This is a comment -->
    8. Re:No comment? by seann · · Score: 1

      what are some you suggest, mr. 11118071

      --
      I'm a big retard who forgot to log out of Slashdot on Mike's computer! LOOK AT ME.
    9. Re:No comment? by destiney · · Score: 1


      http://securityfocus.com/archive

      You can't depend on Slashdot to keep you informed about security. For example, phpbbconfigdumper.c was published only hours after the actual PHP exploits were made public.

  3. Kewl by mordors9 · · Score: 3, Funny

    I can't wait for someone to release a script that I can use to show what a leet haxor I am.

    1. Re:Kewl by Anonymous Coward · · Score: 0, Funny

      They already have, you've just got to figure out how to exploit it using the announcement.

    2. Re:Kewl by jo42 · · Score: 1

      10 Format C:
      20 GOTO 10

    3. Re:Kewl by Kehvarl · · Score: 0

      shouldn't that be

      10 SYSTEM "Format C: \Y"
      20 PRINT "INITIALIZING HACK"
      30 GOTO 10

      ?

    4. Re:Kewl by Anonymous Coward · · Score: 0

      shouldn't that be

      10 PRINT "INITIALIZING HACK"
      20 SYSTEM "Format C: \Y"
      30 GOTO 10

      ?

    5. Re:Kewl by Kehvarl · · Score: 0

      well sure, if you want them to see the message before you erase the drive.

  4. I've said it before, and I'll say it again by Neil+Blender · · Score: 2, Funny

    PHP: 10 million newbies can't be wrong.

    1. Re:I've said it before, and I'll say it again by RangerRick98 · · Score: 1

      I assume you dislike PHP. What would you recommend instead?

      --
      "You're older than you've ever been, and now you're even older."
    2. Re:I've said it before, and I'll say it again by snoyberg · · Score: 3, Funny

      You're absolutely correct! I'll go convert all my scripts to ASP and avoid all of PHP's security holes by running on Microsoft software.

      --
      Thank God for evolution.
    3. Re:I've said it before, and I'll say it again by mios · · Score: 2, Insightful

      Perhaps you've been asleep when every other software package releases updates/bug-fixes/security patched.

      Apache: 85% of the internet can't be wrong.

      Please sir, dismount yourself from that high horse you are riding on.

    4. Re:I've said it before, and I'll say it again by cosinezero · · Score: 2, Funny

      But scripting languages are what applications are made of! Right?

    5. Re:I've said it before, and I'll say it again by Anonymous Coward · · Score: 5, Funny

      I assume you dislike PHP. What would you recommend instead?

      A language that is a little more practical for extracting and reporting.

      NB

    6. Re:I've said it before, and I'll say it again by mrm677 · · Score: 2, Insightful

      What would you recommend instead?

      Java/J2EE/JSP

      You can mess up security policies and implementations with Java, but it is much harder to shoot yourself in the foot. The JVM may have bugs, but because it is used for all Java applications, it is likely well-debugged and secure

      Language features eliminate security problems. For example, the Java JVM does something incredibly advanced: bounds checking!

    7. Re:I've said it before, and I'll say it again by Anonymous Coward · · Score: 0
    8. Re:I've said it before, and I'll say it again by mios · · Score: 1

      oops, what the hell, the link didn't come through ... http://www.apache.org/dist/httpd/Announcement2.htm l that's the apache link.

    9. Re:I've said it before, and I'll say it again by flatface · · Score: 2, Funny
    10. Re:I've said it before, and I'll say it again by kz45 · · Score: 1

      Perhaps you've been asleep when every other software package releases updates/bug-fixes/security patched.

      Apache: 85% of the internet can't be wrong.

      Please sir, dismount yourself from that high horse you are riding on.


      this doesn' mean anything. Otherwise, this would also be true:

      Internet Explorer: 95% of the internet can't be wrong.

    11. Re:I've said it before, and I'll say it again by Anonymous+Luddite · · Score: 2, Insightful


      But scripting languages are what applications are made of! Right?

      I don't think it matters what you use. (compiled or script) There will be an exploit/flaw.

      You can shuck all of your PHP and write mts components in VB or even compile your server side stuff as ANSI C, but nothing is going to be perfect.

      IMHO what matters s how fast vulnerbility information is published after found and how quickly it is fixed.

    12. Re:I've said it before, and I'll say it again by rjrjr · · Score: 1

      And the tools, oh the tools. Mmmm...Eclipse yummy.

    13. Re:I've said it before, and I'll say it again by Anonymous Coward · · Score: 0
    14. Re:I've said it before, and I'll say it again by Dehumanizer · · Score: 1

      Less than 90% now... :)

      --
      The Tlog - a technology blog
    15. Re:I've said it before, and I'll say it again by Gaima · · Score: 1

      but it is much harder to shoot yourself in the foot.

      Yup, because it is a *LOT* harder to install, and administer. It's all scary black magic, and down right confusing.

      Give me apache and PHP any day, with the hardened patches, and mod_suphp.

      p.s. I know squat about what it's like to program in, I'm just a poor admin who's had the misfortune to have to administer tomcat.

    16. Re:I've said it before, and I'll say it again by dfj225 · · Score: 2, Interesting

      Yes, servers that work on J2EE specifications are a pain to eliminate, but I live on the other side of the wall compared to you. I don't administer the J2EE server but write apps for it. I think Java is a very secure, professional replacement for PHP. I have written web apps in both and I think Java is the better solution for large projects or an web server used by an office or company. I would still probably use PHP if I need to code something for a personal website, just because it would probably be quick and dirty and I don't need all of the framework that J2EE provides. One of my favorite things of Java is the error handling. Exceptions, IMHO, make web development much easier. Also, Java seems very secure to me. I don't have to worry about my variables being overwritten by http requests or anything like that. The creators of Java also say that the JVM has been proven, mathematically, to be secure. You can take that for what it is worth. PHP is good but I wouldn't want to write anything large in it. But then again, I have not read up on the latest developments with the language, so I am probably a little outdated.

      --
      SIGFAULT
    17. Re:I've said it before, and I'll say it again by rambot · · Score: 0

      Now lets discuss all the cons of Java, and you find that many of them are strengths of PHP.

    18. Re:I've said it before, and I'll say it again by bmalia · · Score: 1

      Yup, because it is a *LOT* harder to install, and administer. It's all scary black magic, and down right confusing.

      Installing Tomcat isn't difficult at all. I'm all for the J2EE solution over LAMP anyday! Development is quick, applications are scaleable and secure, easier to maintain, and allows better design (business logic seperated from interface). But that's just my opinion.

      --
      There's no place like ~/
    19. Re:I've said it before, and I'll say it again by Anonymous Coward · · Score: 0

      > Apache: 85% of the internet can't be wrong.

      Windows: 90% of desktop users can't be wrong.

    20. Re:I've said it before, and I'll say it again by Anonymous Coward · · Score: 1, Funny

      Umm...by using Microsoft software you would avoid all of PHP's security holes.

    21. Re:I've said it before, and I'll say it again by pjt33 · · Score: 1

      Installing it may not be hard, but configuring it... I just spent a few hours trying to find a document which explains precisely how web.xml s work, with no success.

    22. Re:I've said it before, and I'll say it again by brlewis · · Score: 1
      Perhaps you've been asleep when every other software package releases updates/bug-fixes/security patched.
      Bzzst. BRL's define-input syntax bypassed the whole register_globals mess. A similar syntax could have been used in PHP to give some of the register_globals simplicity without the security holes. The PHP community can talk about high horses when it overcomes its own NIH syndrome and starts copying good ideas from elsewhere.
    23. Re:I've said it before, and I'll say it again by Decaff · · Score: 2, Insightful

      Yup, because it is a *LOT* harder to install, and administer. It's all scary black magic, and down right confusing.

      Er. Download tomcat. gunzip and untar. place JAVA_HOME into catalina.sh. Set a manager account in the config file. Start it up. It's one of the easiest installs I have ever done.

      Installing, starting, and stopping individual web apps is all done with a simple web interface. It's one of the easiest systems to administrate I have used.

      Compare to PHP, where on some Linux distros the only way to get it working is to compile it yourself, along with specific versions of apache.

      Tomcat also has the advantage that its trivially simple to run everything as non-root, for security: You just untar it into a user account and start it there!

    24. Re:I've said it before, and I'll say it again by esper · · Score: 1

      If you read LAMP as LAM(Perl) rather than LAM(PHP), logic and interface can most certainly be separated. I've been told that this is possible with PHP also, but I've never used PHP, so I can't verify the truth of that claim.

      Not all LAMP code is embedded in HTML pages or printing the HTML directly from code... We have template systems, XML/XSL, and the like, too.

      The others seem to be more developer features than language features. I've banged out quick prototypes in C and written scalable, maintainable systems in Perl. Just because most people take the time to do C right (even when it's not needed) or write Perl that looks like line noise doesn't mean that those languages have to be slow to develop or unmaintainable.

    25. Re:I've said it before, and I'll say it again by Anonymous Coward · · Score: 0

      While I do like Eclipse for most things, I must admit I was a little disappointed working on a mid-sized J2EE/JSP/Struts project with it. I found that as the project got bigger/more complex, the IDE started to get *really* slow...

    26. Re:I've said it before, and I'll say it again by markv242 · · Score: 3, Insightful
      Your comment was sort of correct.

      "p.s. I know squat"

      We have a winner!

      Installing a JVM and an application server is about 99% less time consuming, and easier, than a comparable PHP installation.

      Check Resin Quickstart

    27. Re:I've said it before, and I'll say it again by Spy+der+Mann · · Score: 1

      but it is much harder to shoot yourself in the foot

      As it is much harder to shoot ANYTHING without the 1-year + lotsamoney J2EE training.

    28. Re:I've said it before, and I'll say it again by Anonymous Coward · · Score: 0

      That's unbelievable. PHP is about the easiest thing I've ever installed. Whenever I tinker with Java and its associated app servers, I actually lose hair.

    29. Re:I've said it before, and I'll say it again by kz45 · · Score: 1

      this is true. I personally use firefox due to all the security issues with IE.

    30. Re:I've said it before, and I'll say it again by Anonymous Coward · · Score: 0

      ASP.NET probably one of the best things MS has ever put out. And with Mono you can even run it on your linux box.

    31. Re:I've said it before, and I'll say it again by Anonymous Coward · · Score: 1, Funny
      A language that is a little more practical for extracting and reporting.


      Ahh.. python.. a great choice!
    32. Re:I've said it before, and I'll say it again by Anonymous Coward · · Score: 0


      > Apache: 85% of the internet can't be wrong.

      Windows: 90% of desktop users can't be wrong.


      I think that must be the exception that proves the rule.

    33. Re:I've said it before, and I'll say it again by mattsucks · · Score: 1

      The "popularity = validity" argument doesn't hold. I can refute it in two words: Britney Spears :-)

      ..or two more on-topic words: Internet Explorer

      Apache may very well be the most stable/secure/etc/etc in its marketspace, but the fact that 85% of the internet uses it does not PROVE that it is best. It only proves that it is most popular.

    34. Re:I've said it before, and I'll say it again by spike2131 · · Score: 2, Insightful

      Yeah, then spend 6 hours wrestling with mod_jk so it will play nice behind Apache. Its either that or use Tomcat to serve your static files, which is silly, if you have any traffic.

      --
      SpyDock: Scientific Python in a Docker container
    35. Re:I've said it before, and I'll say it again by prockcore · · Score: 1

      Installing a JVM and an application server is about 99% less time consuming, and easier, than a comparable PHP installation.

      On which distro? "yum install php" was all I needed to do to get php installed and running.

    36. Re:I've said it before, and I'll say it again by TheSync · · Score: 1

      I assume you dislike PHP. What would you recommend instead?

      Zope

    37. Re:I've said it before, and I'll say it again by Anonymous Coward · · Score: 0

      man, in case you didnt know, PERL completely sucks ass at webpage design compared to PHP.

      SUCKS ASS.

      sorry to be the one to inform you.

    38. Re:I've said it before, and I'll say it again by Bromrrrrr · · Score: 1

      If you read LAMP as LAM(Perl) rather than LAM(PHP), logic and interface can most certainly be separated. I've been told that this is possible with PHP also, but I've never used PHP, so I can't verify the truth of that claim.

      PHP can do the same as perl in this, but neither can truly separate logic from interface. Both can go a long way but fall short in the end (as any language would)
      In most cases you need to format your output according to the interface and you need to put it in an exact spot and many other things that your code cannot do without using HTML. So you either end up with HTML in your code (bad) or code in your HTML (also bad but unavoidable)

      Not all LAMP code is embedded in HTML pages or printing the HTML directly from code... We have template systems, XML/XSL, and the like, too.

      Template systems are a crutch where HTML is the dissability. I can see the use for them but you're still substituting logic for nicer sounding logic.

      --

      What a rotten party, have we run out of beer or something?
    39. Re:I've said it before, and I'll say it again by sydneyfong · · Score: 3, Interesting

      I've done programming in PHP and in Java.

      PHP is straightforward and easy, and most distributions have their own packages for it. Whereas with Java, the initial set up is overwhelming for beginners.

      I learnt PHP years ago by myself, and it wasn't really that hard. Yet a few months ago when I was finally required to learn Java, the complexity of the Java frameworks (Hibernate, Spring, etc) tortured me for days before I actually knew what was going on. And it doesn't help when all the frameworks gives such a "bulky" feeling.

      The learning curve of Java is definitely much higher than PHP.

      Of course, I do agree that Java is much better suited for large scale web programming than PHP. It's much easier to do things cleanly in Java, and although PHP's loose typing is great for a simple 1 page script, I'd rather have the strict typing of Java when it comes to large scale projects.

      --
      Don't quote me on this.
    40. Re:I've said it before, and I'll say it again by peawee03 · · Score: 1
      Windows: 90% of desktop users can't be wrong.

      I use Apache by choice and choice alone. I'm running Windows on the desktop simply for Autodesk and Adobe products (No luck for me getting Architectural Desktop running under WineX or whatever they call it now). People run Apache because they want to, and people run Windows because they have to. Show me a market block for desktops, with users similar to Apache users (informed of alternatives, able to deploy what they wish based upon reasons of merit rather than software lock-in) and I'm sure the Windows desktop usage shrinks.

      --
      I wish I could write clever and witty sigs.
    41. Re:I've said it before, and I'll say it again by Trifthen · · Score: 1

      Tomcat could be the best software on the face of the Earth, with the easiest install ever devised. Unfortunately we quit using Tomcat over two years ago after we saw it running 100 threads and using 1GB of memory (with a Java imposed memory limit in place). Not even Oracle uses that much memory, and this is just a webserver we're talking about. Nobody could come up with a single argument not to give it the axe, so away it went.

      Of course software can improve in two years, but Tomcat would have had to make substantial progress for us to consider using it again. There are a lot of arguments against PHP, but PHP + Apache doesn't beat our server into the ground with a lead pipe, so that's what we use.

      --
      Read: Rabbit Rue - Free serial nove
    42. Re:I've said it before, and I'll say it again by Lordrashmi · · Score: 1

      Unless you enable some config options (that are by default turned off and have heavy warnings against) you don't need to worry about HTTP requests overwriting variables. And any *good* programmer will use constants instead of variables for key information that should never be changed (include paths, etc).

      Don't get me wrong though, I liked when I worked with Java, I just find myself more productive when working with PHP. And I don't write quick and dirty code, my PHP is actually clean, easy to understand and

    43. Re:I've said it before, and I'll say it again by Decaff · · Score: 1

      Tomcat could be the best software on the face of the Earth, with the easiest install ever devised. Unfortunately we quit using Tomcat over two years ago after we saw it running 100 threads and using 1GB of memory (with a Java imposed memory limit in place). Not even Oracle uses that much memory, and this is just a webserver we're talking about. Nobody could come up with a single argument not to give it the axe, so away it went.

      There are two reasons why this can happen: Naively written java code (JSPs or Servlets) can bring data in and store it in session-scope rather than request-scope. As sessions can last for a long time (say, 30 minutes), you soon end up with lots of memory use (been there, done that!). The other reason is inappropriate configuration of the Java VM and tomcat. The maximum number of threads is a single setting in the server.xml file - easy to change. If you are only doing minor work in each request, turn down the memory allocation: this can be set using JAVA_OPTS.

      Having a large number of threads should not be an issue - the Java VM is designed to handle this easily.

      The argument for not giving it the axe is plain (in my opinion): Code carefully, and tomcat/J2EE will give you very scalable applications - not just in terms of the number of users, but to allow for significant expansion of the code size.

      However, if you are really only adding minor code to web pages, PHP will do fine.

    44. Re:I've said it before, and I'll say it again by John+Bokma · · Score: 1

      Amen! PHP is the worst language I have ever worked with. Even ZX Spectrum BASIC is more superior ;-)

    45. Re:I've said it before, and I'll say it again by Decaff · · Score: 1

      Yeah, then spend 6 hours wrestling with mod_jk so it will play nice behind Apache.

      Or just use simple redirects (a few lines in httpd.conf).

      Its either that or use Tomcat to serve your static files, which is silly, if you have any traffic.

      Why? Tomcat + Java is fast. Not as fast as Apache alone, true. But anyway, the answer is simple: put static content in a directory which is not subject to a redirect to Tomcat.

      You don't need to use Apache at all - doing so is only a matter of convenience or preference. My point was about what you have to do to get PHP working (at least on some distros). There is a big difference.

    46. Re:I've said it before, and I'll say it again by Decaff · · Score: 1

      PHP is straightforward and easy, and most distributions have their own packages for it. Whereas with Java, the initial set up is overwhelming for beginners.

      Interesting. I have found the exact opposite: it can be a real struggle to uninstall the default (minimal) installations of apache and PHP from many distros, in order to recompile and re-install these packages to allow anything but the simplest PHP applications to run.

      On the other hand, Java is a simple RPM, and tomcat is just a gzip/untar...

    47. Re:I've said it before, and I'll say it again by mentin · · Score: 1
      The creators of Java also say that the JVM has been proven, mathematically, to be secure.

      What? Mathematically?! What greedy SUN saleman said you this outrageous stupid thing?

      Then in what about all these bugs (15 security advisories in SUN JVM in 2 years):
      http://secunia.com/product/784/

      --
      MSDOS: 20+ years without remote hole in the default install
    48. Re:I've said it before, and I'll say it again by John+Bokma · · Score: 1

      ZX Spectrum BASIC :-) Java, Perl, even C

    49. Re:I've said it before, and I'll say it again by Trifthen · · Score: 1
      The argument for not giving it the axe is plain (in my opinion): Code carefully, and tomcat/J2EE will give you very scalable applications - not just in terms of the number of users, but to allow for significant expansion of the code size.


      We didn't really have that option, unfortunately. Customers wrote the Tomcat based software, and it was eating our software alive. Maybe we were wrong to attribute the terrible performance to Tomcat, but it's hard to argue with loads of 100 and memory usage of 1GB for the sake of one customer out of a thousand.

      However, if you are really only adding minor code to web pages, PHP will do fine.


      We host over 3000 database-interactive newspaper websites on a cached custom PHP-based engine, and we have well over 20 other applications that are pure PHP using class-based architecture. We regularly pull 100Mb sustained bandwidth in our cluster in Chicago, all served from a handfull of dual-PIII 1U servers. We shrug off slashdottings on a regular basis (we host newspapers, so we get a pretty good share of them).

      While your experiences with PHP may have limited it to small environments, ours proves PHP can scale quite easily. I think one thing we can agree on is that it's all based on the code behind the scenes, no matter what the environment.
      --
      Read: Rabbit Rue - Free serial nove
    50. Re:I've said it before, and I'll say it again by Anonymous Coward · · Score: 0
    51. Re:I've said it before, and I'll say it again by just-a-stone · · Score: 1

      as i started to love java, i was forced to learn PHP - and i did not like it, as any other script language, i considered it to be just another programmer newbee easy-to-learn and automate-anything-for-me language.

      i argued against the decision of implementing a huge-scale web site in php, but i lost.
      so i had to deal with it and read the php & zend engine sources (just a habit when dealing with an interpreter) and found out what it obviously is: easy to use glue code, where you have to know more about type casting, cost of algorithms and external functions than in java, if you want your huge project to perform. even the question where to hold what kind of resource (persistancy considerations), where to implement the abstractions gets a hard nut each time.
      but after all, you get a very fast, perfectly scalable (just another box) application, no more dealing with fail-over stragegies - and if you don't have time to implement some special, hardly ever used feature, you get cheap external resources.

      of all arguments i had against php, the strongest i still have is, that there are lots of developers that call themselves to know php and all you may expect them to code is an autoglobal using guestbook.

      java is still great - and for some middle-scale applications, i still consider using it (besides all the other project dependent reasons for the language of choice) - but if it get's really big, i wouldn't use it any more since i experienced this kind of php usage.
      (also proven by some j2ee to php migrations we did over the last 2 years)

    52. Re:I've said it before, and I'll say it again by daliman · · Score: 0, Offtopic

      No, his joke went over your head :)

    53. Re:I've said it before, and I'll say it again by Ash-Fox · · Score: 1

      I found it interesting to find out that deviantart changed most of the PHP stuff they had a couple of years ago to PERL. I also find it interesting that websites... like.. oh.. Slashdot! Register.com, Stanford, Berkley etc.. etc.. use perl too.

      --
      Change is certain; progress is not obligatory.
    54. Re:I've said it before, and I'll say it again by Ash-Fox · · Score: 1

      Sun isn't the only company to make JAVA, IBM makes their own, and I've heard of others like kaffe etc.. etc..

      --
      Change is certain; progress is not obligatory.
    55. Re:I've said it before, and I'll say it again by sydneyfong · · Score: 1

      Just curious, but how is PHP better in code gluing?

      I thought Java's inherit OOP design would make it easier to integrate code, whereas PHP only recently supported "real" OOP in PHP5.

      And about type-casting, I find the exact opposite. After coding Java for a few months, I got uneasy at the loose types in PHP. Perhaps it's my fault of not scrutinizing the interpretter ;-p Or worse, perhaps I'm the one coding a guestbook using autoglobals ;-p

      --
      Don't quote me on this.
    56. Re:I've said it before, and I'll say it again by Anonymous Coward · · Score: 0

      Slashdot was written when PHP was very, very new and not used by many. They won't even support CSS, so what makes you think they'd actual consider rewriting things in PHP? The fact is, they used perl because that's what was around, and they use it today for no other reason than they don't like making big changes.

    57. Re:I've said it before, and I'll say it again by Joe+Enduser · · Score: 1

      I take play nice to mean work, here. Don't let the parent scare you. There is documentation to help you out.

    58. Re:I've said it before, and I'll say it again by Decaff · · Score: 1

      While your experiences with PHP may have limited it to small environments, ours proves PHP can scale quite easily.

      I didn't mean that it would not scale in terms of bandwidth (although my feeling is that with servlet/JSP, where you end up with hotspot-optimised native code, is always going to be faster than interpreted PHP), but I would suggest that PHP does not always scale well in terms of application size. It sounds like that is not relevant to you.

      I think one thing we can agree on is that it's all based on the code behind the scenes, no matter what the environment.

      Absolutely.

    59. Re:I've said it before, and I'll say it again by Decaff · · Score: 1

      Just curious, but how is PHP better in code gluing?

      I thought Java's inherit OOP design would make it easier to integrate code, whereas PHP only recently supported "real" OOP in PHP5.


      I have recently discovered the Spring system for Java (www.springframework.org) It is a huge system, but you need only use the parts you need. I use the it as a way of managing settings for my applications (to avoid having to load in lots of properties files) and to glue parts of the my code together. It's very easy to use for this.

    60. Re:I've said it before, and I'll say it again by Anonymous Coward · · Score: 0

      ok, so you covered the 0.00000000000000001% of websites which don't use PHP.

    61. Re:I've said it before, and I'll say it again by Ash-Fox · · Score: 1

      I also covered websites that consume more than your average high bandwith websites.

      --
      Change is certain; progress is not obligatory.
    62. Re:I've said it before, and I'll say it again by edjash · · Score: 1

      Ok your jazzing this up so much I think I will go and remake my site in Perl because it is obvious the hallmark of eliteness. I've already got FireFox, FreeBSD, Slashdot and google, 100% CSS coding, Now for some P3RL!

    63. Re:I've said it before, and I'll say it again by WoodstockJeff · · Score: 1
      Why? Tomcat + Java is fast.

      Compared to what, the migration of the continents?

      I ask, because we're working very hard to remove Tomcat from our client's systems because it's been a huge bottleneck to expanding their capacity. Tomcat's job is a simple one - it runs one script, which (essentially) concats two XML files into a HTTP POST request, makes an HTTPS connection to a remote server with that request, and writes a file that contains the resulting XML to a file. The code to do this was provided by the vendor only in Java, the client was in a hurry to have things operational, so we set up a Tomcat server to get the job done. Unfortunately, it takes THREE SECONDS per transaction to do this on a 600MHz machine.

      To be honest, our speed problem is related more to the overhead in starting the script and loading its required modules at each invocation than to the speed of Tomcat itself. Tomcat is using 6 times more memory resources than Apache, which doesn't help. If the vendor had provided us with code that didn't require file-based transfer of data, we could put Tomcat on its own server, and optimize its caching and increasing the memory allocated to it; but they didn't. By the time we'd reworked the Java code to not require the files (all data passed as HTTP requests), it only took another of hours to recode it directly into PHP.

      In PHP, the same transaction takes a fraction of a second on the same hardware. Is even faster when the PHP code is incorporated directly into the scripts that currently call Tomcat (30 lines replacing 10), because it removes the overhead of writing files to move the XML data around.

      The "working hard" part is political - because a couple of years have passed, and the Tomcat-calling code is incorporated into dozens of heavily-used scripts that the client considers "mission critical", i.e., "you can't break them". So they're reluctant to remove Tomcat, even though we've shown that they can increase their transaction capacity by at least an order of magnitude. Currently, the Java code on the client's end is the limiting factor; with the PHP replacement, bandwidth to the remote server became a problem. The need to remove single-point failures from their system (which Tomcat has become) has opened the door to change, though.

      My point was about what you have to do to get PHP working (at least on some distros).

      If you chose your distribution based upon "easy" vs. "hard", you already know what you're in for. Use Mandrake, RH/Fedora, SuSE, etc., you run the update script. If you are using a distribution that requires you to compile everything, well, you've made that choice and know what you're in for.

      PHP's basic problem on the compile-from-source front is how many different things it can do, and how much it depends upon to do that. Compiling it yourself does involve tracking down all the different development header files, which most distributions don't install by default. You run into the same problem with Postfix, Apache, or any of hundreds of large packages.

    64. Re:I've said it before, and I'll say it again by mentin · · Score: 1
      You mean this greedy salesman could be from IBM or some other company - I then agree.

      But to claim that any of them can be mathematically proven to be secure is total bullshit.

      --
      MSDOS: 20+ years without remote hole in the default install
  5. Third-party modules? by flatface · · Score: 5, Interesting

    I read about this yesterday and couldn't find out if mod_security and suPHP are vulnerable to these attacks. With mod_security blocking buffer overflows, "bad" characters, etc. and mod_suphp forcing PHP to run as the user, I don't think that it gives people who run these modules (that) much to worry about.

    1. Re:Third-party modules? by Anonymous Coward · · Score: 0
      ...these modules (that) much to worry about.

      Using parentheses to show emphasis, now (that's) interesting. ;)

    2. Re:Third-party modules? by flatface · · Score: 1

      It's not to show emphasis. It makes the word optional, because I don't know for sure if these modules prevent such attacks.

    3. Re:Third-party modules? by Anonymous Coward · · Score: 0

      They dont

    4. Re:Third-party modules? by new-black-hand · · Score: 2, Insightful

      mod_suphp might prevent you from attaining root, but more often than not root is not required. If you manage to upload files, insert some SQL, read files as the user PHP is running as (eg. nobody) then you have access to the whole web application (user accounts, credit card databases, everything). Getting root is very often not required. That is why these web apps must be as tight (security and access wise) as operating systems themselves. Developers (esp. PHP and ASP developers) are often very slack in this regard.

    5. Re:Third-party modules? by teh*fink · · Score: 1

      what's the difference between:

      "...I don't think that it gives people who run these modules that much to worry about."
      and
      "I don't think that it gives people who run these modules much to worry about."

      (serious question?)

      --
      "I DARE you to make less sense!"
    6. Re:Third-party modules? by Tassach · · Score: 2, Insightful
      If you manage to upload files, insert some SQL, read files as the user PHP is running as (eg. nobody) then you have access to the whole web application (user accounts, credit card databases, everything)
      This is exactly why it's foolish to use a so-called "database" (*cough* mysql *cough*) which does not support stored procedures. Stored procedures are a vital means of defense against SQL injection attacks, and any RDBMS which is used as a back-end to a publicly-accessable application must use them to be safe.

      Stored procedures work kind of like SUID scripts for a database -- they let the database user execute code with the procedure owner's permissions. For example in an E-Commerce application, a user might legitimately need to get his own credit card number out of the database, but he has no business getting anyone else's database.

      Let's assume we have the CC table keyed by UserID, and the webapp provides the UserID when it wants to get that user's CC number. We'll assume the user has already logged in and the application knows the user's userid. The naieve approach taken by most programmers is to construct the SQL statement on the client-side using the (previously validated) UserID, and then submit this to the SQL Server using a webuser account:

      select CardHolderName, CCNumber, ExpDate from CCTable where UserID = '$UserID';
      User xj9-4t-7070, using the system as intended, would result in the intended SQL statement being submitted to the SQL Server:
      select CardHolderName, CCNumber, ExpDate from CCTable where UserID = 'xj9-4t-7070';
      However This kind of construct is flawed because it's vulnerable to SQL injection. If a hacker is able to put an arbitrary value into $UserId, he can run ANY sql statement the webuser has permission to execute. Let's say he manages to set $UserID to xj9-4t-7070';\nselect * from CCTable where UserID != ', now the SQL being submitted is
      select CardHolderName, CCNumber, ExpDate from CCTable where UserID = 'xj9-4t-7070';
      select * from CCTable where UserID != '';
      Because the webuser account must have select permission on CCTable to work for a legitimate user, it can run ANY arbitrary query on that table. Using stored procedures, the legitmate user would submit a query like:
      exec GetUserCCInfo 'xj9-4t-7070';
      And the attacker would submit
      exec GetUserCCInfo 'xj9-4t-7070';
      select * from CCInfo where UserID != '';
      Using the stored procedure, the webuser only needs to be granted execute permission on the GetUserCCInfo stored procedure, and would not have any permissions to access CCInfo table directly. Therefore, all the attacker would get is a "permission denied" message instead of a dump of all entire CCInfo table.

      We're still vulnerable to the attacker brute-forcing the CC numbers out one at a time, which is why we need to use a reasonably large random value for the UserID instead of something trivially guessed (like a monotonically increasing sequence of integers).

      --
      Why is it that the proponents of "one nation under God" are so eager to get rid of "liberty and justice for all"?
    7. Re:Third-party modules? by FuzzyBad-Mofo · · Score: 2, Insightful

      What you described is definitely a good idea to prevent SQL injection, but it doesn't have to be done using stored procedures. You can do the same thing on the web server with a custom function or by using prepared statements (using the PEAR library, etc).

    8. Re:Third-party modules? by howlinmonkey · · Score: 1

      I think this is why you don't store user information in a cookie, url param, or hidden field. You use a session ID, and get the user id from the session db based on session ID. The session ID is your "reasonably large random value".

      Using good coding practices is one way to keep yourself safe from these types of attacks. Even with a "database" like MySQL.

    9. Re:Third-party modules? by Tassach · · Score: 1

      I was trying to illustrate a point, not write an application.

      --
      Why is it that the proponents of "one nation under God" are so eager to get rid of "liberty and justice for all"?
    10. Re:Third-party modules? by urbaneassault · · Score: 1

      While I think it's quite harsh to dub mySQL a "so-called 'database'", sprocs are an integral part to a 3-tiered webapp.
      MySQL is an extrememly robust platform, and while the version 4 feature-set isn't up to par with other offerings, the 5.0 release is coming along very well and is making due on some very nice promises, namely sprocs and updatable views.
      MySQL is about the fastest dbms out, which isn't always a good thing if it trades atomity for speed, which hasn't been an issue since 4.0 was released.
      5.0 roadmap

    11. Re:Third-party modules? by websensei · · Score: 1
      ...it's foolish to use a so-called "database" (*cough* mysql *cough*) which does not support stored procedures


      agreed.
      at least they're getting there w mysql 5.0:
      http://dev.mysql.com/doc/mysql/en/Stored_Pro cedure s.html
      --

      La via sola al paradiso incommincia nel inferno
    12. Re:Third-party modules? by Kent+Recal · · Score: 1

      Anyone storing sensitive info like CC numbers would better have implemented a tiny bit more layers of security. CC numbers should just not live in the same RDBMS that does your other crap. At the very least they should be stored in a separate one, on a separate host. Also the operation to get one shouldn't be a plain lookup but they'd hopefully be stored in encrypted form (key would be userid+password).

      I know this is far from reality in 9 out of 10 PHP webshops...

    13. Re:Third-party modules? by sglane81 · · Score: 1

      howlinmonkey's reply is still quite valid.

      --
      This is the Internet. You can say "fuck" here. - AC
    14. Re:Third-party modules? by WhiteDragon · · Score: 1

      I didn't realize that stored procedures ran as a different user than the user executing the query. What RDBMS is that? Postgresql? Oracle?

      --
      Did you mount a military-grade, variable-focus MASER on an unlicensed artificial intelligence?
    15. Re:Third-party modules? by prockcore · · Score: 1

      Let's say he manages to set $UserID to xj9-4t-7070';\nselect * from CCTable where UserID != ',

      And how would he do that? All user submitted data is automatically escaped, so the best he could do is set $UserID to xj9-4t-7070\';

      notice the quote mark is escaped.

    16. Re:Third-party modules? by nettdata · · Score: 1

      Well, I know that for Oracle this CAN be the case, but not necessarily.

      By using a series of grants, you can put your data objects and stored procedures in one schema (user), and grant execute/etc to another schema. You can also disallow the "connect" priv to the data schema, and force remote apps to connect using "proxy" users that have execute on only the procedures that they require. This also means that the connecting users don't have the procs in their schema, so they can't mod them. You can also dissallow the connecting schemas from having any tables/procs, so that it can only use the "remote" procedures from the other schema(s).

      This is part of how I restrict access to various parts of the system to various apps filling different roles. For instance, our DMZ/Web front end accesses a very restrictive set of procs, while our more internal systems access others, etc.

      Also, we're alerted whenever anyone directly connects to the data schema, etc.

      --



      $0.02 (CDN)
    17. Re:Third-party modules? by archen · · Score: 2, Interesting

      or you could spend a whopping 5 seconds writing a regular expression to verify the id. I've seen my share of stuff that's vulerable to SQL injection, and it's pretty sad really. What in the hell ever happened to error checking? I really don't like PHP, but at times I think that the majority of the problems I have with it are the masses of sloppy lazy coders who preach how wonderfully easy it is. That may be so, but you still need to freaking THINK your solutions through. -_-

    18. Re:Third-party modules? by badpit · · Score: 1

      sure, MySQL is fast! MyISAM is fast because it has no transactions! I believe that we all agree that without transactions an DBMS is just a file system you can have queries on. InnoDB has transactions and it's not that fast. If you want a real open source alternative then go to Postgresql, it's more mature and has features only commercial DBMS offer. If you have money then Oracle is by far the best choice. MySQL is popular because it's simple and any rookie can start with MySQL. Maybe it will grow, but right now MySQL is a bad joke.

    19. Re:Third-party modules? by helmutjd · · Score: 1

      The only issue is that any competent programmer knows that you absolutely must escape all user input prior to using it in an SQL query.

      Most common SQL libraries also provide support for variable binding, which handles escaping automatically. And since this post is about PHP... PHP has magic_quotes_gpc enabled by default, which automatically escapes user input to begin with. (Not that I necessarily think that's the best approach, but it certainly helps when dealing with newbie coders.)

      Of course, I'm not arguing against stored procedures - that's obviously a good solution, too. But really, if your scripts fall victim to the type of SQL injection vulnerability you described, then (IMO) you pretty much deserve what you get.

    20. Re:Third-party modules? by Tassach · · Score: 1
      And how would he do that?
      By, for example, exploiting a bug in PHP.
      --
      Why is it that the proponents of "one nation under God" are so eager to get rid of "liberty and justice for all"?
    21. Re:Third-party modules? by Trifthen · · Score: 1

      While all of your arguments are true, SQL injection attacks are easily thwarted by the use of things like mysql_escape_string. Or if you use PEAR, you can use the prepare/execute method and placeholders (select * from bla where column=?).

      It's all based on the level of care a developer puts into protecting their data. Sloppy DBAs can be just as bad at protecting data as lazy PHP coders. Though I'd like to think any company using a full RDBMS would abstract verification and security to the database to increase application modularization, you and I both know there are all types of developers out there.

      Besides, we use Verisign to do all of our credit-card processing, so we don't have any sensitive information anyone could steal. See, there's lots of solutions out there. ^_^

      --
      Read: Rabbit Rue - Free serial nove
    22. Re:Third-party modules? by Desert+Raven · · Score: 1

      This is exactly why it's foolish to use a so-called "database" (*cough* mysql *cough*) which does not support stored procedures. Stored procedures are a vital means of defense against SQL injection attacks, and any RDBMS which is used as a back-end to a publicly-accessable application must use them to be safe.
      ... More rambling about stored procedures...

      OK, yes, SPs are very valuable. And, yes, they can be a big help to security. However, it's not the *only* way.

      See, there's this magical thing called "bind variables/parameters". Oracle's had them a long time and ancient versions of PHP support it. MySQL has them in v4.1, and PHP 5 supports them. When using bind variables, you prepare your SQL statement *before* the data is passed, with placeholders for the actual data. Then, you "bind" your data to those placeholders. Since the DB already has the execution path mapped, and the placeholders are treated as pure data, it's *not possible* to have an sql injection attack. No escaping needed, go ahead and pass that nasty bit of sql code into the variable, it won't matter.

      The major advantage? The syntax is nearly identical to what you've been doing all along. No need to write SPs for every two-line query.

      Another neat side effect is a huge performance improvement when repeating the same query, since the preparation/execution path mapping only have to be done once. Just change the data in your bound variables, and execute the query again.

      I've been using bind variables with Oracle at $DAYJOB for over four years now. I never have to think about sql injections there.

    23. Re:Third-party modules? by ttfkam · · Score: 1
      MySQL is about the fastest dbms out, which isn't always a good thing if it trades atomity for speed...

      SQLite is faster and supports atomicity. It slows down with multiple concurrent connections, but then so does MySQL. In the case of many simultaneous and concurrent connections, you want to look at PostgreSQL if a free database is on the menu.
      --

      - I don't need to go outside, my CRT tan'll do me just fine.
    24. Re:Third-party modules? by ttfkam · · Score: 1

      Getting there with v5. Been there for years in most other RDBMSs. Why wait for tomorrow when you could have had it yesterday?

      --

      - I don't need to go outside, my CRT tan'll do me just fine.
    25. Re:Third-party modules? by Bitsy+Boffin · · Score: 1

      Or you could just make sure that the string you are passing into your SQL query is of the correct data type and in the case of strings (including dates in mysql's case), escaped properly which takes roughly 2 seconds of keyboard work, instead of somewjhat more time in creating a stored procedure, and then dealing with the problems of version control of the stored procedure which is now stored seperatly (in the database) from the rest of your code base.

      --
      NZ Electronics Enthusiasts: Check out my Trade Me Listings
    26. Re:Third-party modules? by Erik+Hollensbe · · Score: 1

      actually, mysql doesn't have a binding API and doesn't support prepared statements - that is, a statement that has it's validity checked before execution is possible.

      Compare to Oracle, which will fail when you prepare the statement, not execute it.

    27. Re:Third-party modules? by Erik+Hollensbe · · Score: 1

      To clarify, the prepared statement in DBD::mysql and the PEAR equivalent are emulated portions of the API, where they are (at least in DBI), actually used in the case of DBD::Oracle and (I think) Pg.

      It is better than doing it yourself - the code will sanitize your binds and is less mistake-prone, but the client is doing it, not the server - that's the major problem there. Also, a binding API allows type checking at each execution, which is not possible without it.

    28. Re:Third-party modules? by Erik+Hollensbe · · Score: 1

      Binding is *not* escaping. magic_quotes_gpc is a hack through and through.

      Binding is separating the input data from the calling convention not unlike how you do with a function call. Please do not confuse the two.

      See my earlier post regarding mysql's lack of a binding API for why you might be confused.

      The problem is that PHP's database support is just a slight transliteration of the underlying database API, and has no centralized API for dealing with things - if they'd just write their own or adopt the mature PEAR solution that's already out there (so that it is installed with all PHP installations), I think many PHP applications would not be having nearly as many problems.

    29. Re:Third-party modules? by Anonymous Coward · · Score: 0

      Before posting code, you should actually try it before making a fool out of yourself. MySQL has never supported having more than one query in their library function mysql_query() or mysql_real_query(). Therefore, the SQL injection attacks that you see that other SQL servers are vulnerable to, are not a problem on MySQL. Try it, and you'll see that MySQL will return an error if you try to pass it two queries at the same time. It's simply not a problem with MySQL.

    30. Re:Third-party modules? by julesh · · Score: 1

      actually, mysql doesn't have a binding API and doesn't support prepared statements

      http://dev.mysql.com/doc/mysql/en/C_API_Prepared _s tatements.html

      "As of MySQL 4.1, the client/server protocol provides for the use of prepared statements. This capability uses the MYSQL_STMT statement handler data structure returned by the mysql_stmt_init() initialization function. Prepared execution is an efficient way to execute a statement more than once. The statement is first parsed to prepare it for execution. Then it is executed one or more times at a later time, using the statement handle returned by the initialization function."

    31. Re:Third-party modules? by Anonymous Coward · · Score: 0

      Hey, the PHP engine itself has at least one remote exploit per 6 months ... so your security advice is a bit misplaced. Anyone the least bit cared about their security simply isn't running their stuff off PHP in the first place. Perl, Python, Ruby ...

    32. Re:Third-party modules? by Erik+Hollensbe · · Score: 1

      4.1 is also fairly new and last I checked, the mysql team is only recently recommending it for production use. If the PHP native API takes advantage of it now, people need to convert the bales of old broken code to use it.

      I apologize that my statement is out of date.

      Then again, I have a mysql shirt that's proud of having transactions. I got this last june at OSCON, from the mysql team... it's a great piece of humor.

      It's good to see they're finally doing what other database servers have been doing for almost (over?) 10 years now.

      Still eagerly awaiting sequences that aren't attached to a table. Maybe then I can consider it more than a toy.

    33. Re:Third-party modules? by helmutjd · · Score: 1

      I never claimed that binding *was* escaping, just that many DB abstraction APIs handled escaping automatically during variable binding (think ADODB). And yes, I am well aware that PHP's MySQL API is little more than a direct interface to the C API provided by libmysqlclient. I also agree that magic_quotes_gpc is a nasty hack (I personally have it disabled). But it protects the vast majority of the unwashed masses from typical SQL injection vulns when enabled. Personally, I don't see how folks fall victim to SQL injection attacks when PHP's defaults (and most decent database abstraction API's) make it so difficult to do so. As I said, if you get hit by something like this, you're almost certainly doing something stupid.

    34. Re:Third-party modules? by julesh · · Score: 1

      Still eagerly awaiting sequences that aren't attached to a table.

      Maybe I'm just being daft, but I don't see what use that actually is? I know you can do it with Informix, which I've been doing some work with lately, so I'm sure there must be _some_ purpose, but I can't figure it out.

    35. Re:Third-party modules? by Erik+Hollensbe · · Score: 1

      You must not think foreign keys are useful, either. Right?

      The 'R' is RDBMS means 'relational'. Without the ability to establish real, atomically produced relations between tables, you're just using a toy.

  6. Upgrade. by Anonymous Coward · · Score: 4, Insightful

    I think it's about time someone came up with an easier way to upgrade php.
    It's so god damned time-consuming to rebuild the entire thing over and over again, especially because you keep having to rebuild all the additional modules (mysql support, gd support, mcrypt support, pdf, the list goes on).

    1. Re:Upgrade. by DrSkwid · · Score: 1

      yeah, nightmare

      % cat /www/bin/php_install

      #!/usr/local/bin/rc

      # run this after cvsup

      echo 'got root ?'

      cd /usr/ports/lang/php4
      make

      cd /usr/ports/lang/php4/work/php-* || exec echo php dir not found ./configure \
      --with-apxs \
      --disable-cgi \
      --enable-mbstring \
      --with-openssl \
      --with-pcre-regex \
      --with-pgsql

      make && make install

      --
      There are places where the networks are not touching,and there are places where they are-Boeing's Lori Gunter
    2. Re:Upgrade. by SCHecklerX · · Score: 1

      If it causes such a hassle, and has so many security problems, why still use it? Mod_perl with embedded perl seems like a good option.

    3. Re:Upgrade. by DigitalRaptor · · Score: 1

      No thanks. I'd rather have a headache once per quarter when I have to upgrade then daily as I use it.

      I started out doing web applications in perl and switched to PHP then PHP / Smarty now and love it.

      --
      Lose Weight and Feel Great with Isagenix
    4. Re:Upgrade. by Anonymous Coward · · Score: 0

      What's hard about "apt-get install libapache2-mod-php4"?

    5. Re:Upgrade. by imbaczek · · Score: 1

      Thanks to apt-get update && apt-get upgrade I don't remember when was the last time I compiled php on my own. Sounds like plain masochism :>

    6. Re:Upgrade. by Skater · · Score: 1

      I'm not familiar with Debian's tools, but I have a nonstandard configuration: I need to have both MySQL and PostgreSQL support in PHP (I'm moving from MySQL to PostgreSQL, but I don't have time to rewrite everything right away). You're just downloading precompiled modules, right? I think in my case I pretty much have to recompile...

      --RJ

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

      No, Debian compiles with pretty much everything enabled. In the case of php, you just install the modules you want: apt-get install php-mysql php-php-pgsql. apt-get update && apt-get upgrade will then keep all modules up to date. The packages tend to be more finely divided (hence 16,000+ of them) than other distributions, and rely on apt to sort out dependencies, so you don't need to install everything, just the pieces you're using.

      Compiling from source is very rare in the Debian world, except for developers.

    8. Re:Upgrade. by karmatic · · Score: 0

      I use gentoo, which is nice in that it compiles from source.

      It also has what are called "use flags". If I want X support compiled in, I add the X flag. If I want to make sure nothing X related is in, I add "-X" to the use flags.

      In gentoo, if you want apache2 with php, mysql, and postgresql, you add "postgres php mysql apache2" to your use flags, and run "emerge php".

      As the configure command is generated on the fly, you don't have to worry about remembering the command you used (although phpinfo() shows it nicely). It will also install the needed dependencies, and configure apache to run it. Upgrades are a snap too.

      There are a lot of other use flags used by php, including ncurses, berkdb, crypt, curl, gd, hardened-php, imap, ipv6, jpeg, kerberos, gmp, mssql, ldap, pam, png, readline, ssl, tiff, spell, truetype, and xml2 - all of which can be enabled or disabled by simply setting the use flag in make.conf. Gentoo will handle the dependencies these use flags create as well.

      What can I say? I like it.

    9. Re:Upgrade. by Dalroth · · Score: 1

      What are you doing that prevents you from apt-get or yumming it? Most distributions come with pre-packaged versions of Apache and PHP. What is it about those pre-packaged versions that you find unnacceptable?

      Bryan

    10. Re:Upgrade. by dema · · Score: 1

      You should check out http://www.dotdeb.org if you use Debian. The maintainer does an excellent job of keeping up-to-date php(4&5) and mysql packages. You can install the base package (apt-get install php5) and then any additional modules you need (apt-get install php5-gd php5-mcrypt etc). It's a great way to keep things updated smoothly.

    11. Re:Upgrade. by Anonymous Coward · · Score: 0

      More like: ./configure --enable-shared \
      --disable-static \
      --disable-rpath \
      --with-config-file-path=/var/www/conf/php.ini \
      --enable-inline-optimization \
      --with-pic \
      --with-openssl \
      --with-zlib \
      --with-apxs=/usr/sbin/apxs \
      --enable-wddx \
      --enable-cli \
      --with-iconv=/usr/local/ \
      --with-gettext=/usr/local/ \
      --enable-dio \
      --enable-bcmath \
      --enable-session \
      --enable-trans-sid \
      --enable-calendar \
      --enable-ctype \
      --enable-ftp \
      --with-pcre-regex \
      --with-posix \
      --enable-sockets \
      --enable-sysvsem \
      --enable-sysvshm \
      --enable-yp \
      --enable-exif \
      --with-recode=/usr/local/ \
      --with-apxs=/usr/sbin/apxs \
      --with-iconv-dir=/usr/local/ \
      --with-iconv=/usr/local/ \
      --with-bz2=shared,/usr/local/ \
      --with-gd=shared \
      --with-ttf=shared,/usr/local/ \
      --without-freetype-dir \
      --with-t1lib=/usr/local/ \
      --with-mcrypt=shared,/usr/local/ \
      --with-mhash=shared,/usr/local/ \
      --with-mysql=shared,/usr/local/ \
      --with-jpeg-dir=/usr/local/ \
      --with-png-dir=/usr/local/ \
      --with-tiff-dir=/usr/local/ \
      --with-zlib-dir=/usr

    12. Re:Upgrade. by Lord+Crc · · Score: 1

      I think it's about time someone came up with an easier way to upgrade php.

      I found it very easy and quick. Stop apache. "emerge mod_php". Wait oh, 5-10 mins. Start apache.

      Perhaps I missed something?

    13. Re:Upgrade. by Anonymous Coward · · Score: 0

      a) You have to wait for them to get it, compile it, test it to their satisfaction, and release it to you.
      b) You don't get to compile in certain options or leave certain other ones out.

    14. Re:Upgrade. by Socrate76 · · Score: 1

      I work with PHP in a production environment: RHEL 3.3. The problem? PHP version delivered by Red Hat has a know problem with get_browser() function (returns incorrect results). Therefore, we have to use the old compile-it-yourself method. Therefore, the upgrade process is not that painless as it would be with a simle `up2date -u'. I can cope with this, of course, only that sometimes is not that simple and manual update is the only option. With all the hurdle it involves. Regards

    15. Re:Upgrade. by rochlin · · Score: 1
      I'm running PHP on Windows (with Apache2 and MySQL). I would like to upgrade to 4.3.10, but there is really no documentation I can find for a good procedure for doing that. The "installer" is really not even suitable for fresh installs. The zip files are useable for new installs but don't really seem to acknowledge the idea that one might have an existing installation.

      Are there changes I need to make to my .ini files for the update? Which files do I need to keep and which should I overwrite from my previous version. What do I need to do so everything continues to work smoothly with Apache2 and MySQL? Not obvious to me. I bet the answers are simple. Maybe someone ought to put them in the docs?

      For that matter, if the solutions suggested in this thread for Linux upgrading are so clear, why are they not on the UPGRADE page. That would make sense.

    16. Re:Upgrade. by Anonymous Coward · · Score: 0

      put in a file and edit to your liking. I like to put all this stuff in /usr/src/ and then make a "php" symbolic link to "php-5.0.3"

      ----------------
      #!/bin/sh

      cd php
      OPTIM='-O2 -mcpu=i686' CFLAGS='-O2 -mcpu=i686' ./configure \
      --with-apxs2=/usr/local/apache2/bin/apxs \
      --without-mysql \
      --with-pgsql=/usr/local/pgsql \
      --enable-memory-limit \
      --disable-debug \
      --with-zlib \
      --enable-sockets \
      --enable-track-vars
      make

      make install
      cd ..

    17. Re:Upgrade. by Anonymous Coward · · Score: 0

      PHP is the only thing I don't upgrade via apt.

      Debian's policy of excluding support for some db file facilities means I don't use the "proper" package and have to build my own.

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

      What makes you think that I am running a "distribution" of a defunct operating system?

    19. Re:Upgrade. by mattyrobinson69 · · Score: 1

      emerge mod_php
      apt-get mod_php

      you choose.

    20. Re:Upgrade. by rochlin · · Score: 1

      Thanks, but the links you provide are documents for fresh installs. I have an install. I could parse the fresh install guide and try to deduce for myself which files should be overwritten and which I need to keep (e.g. php.ini). But that's exactly what I would like in an UPDATE guide.

    21. Re:Upgrade. by molnarcs · · Score: 1
      Took me a few seconds to type in portupgrade -a - way befor the secbug appeared on ./ (FreeBSD 5.3-RELEASE).

      su-2.05b# pkg_info | grep php
      php5-5.0.3_1 PHP Scripting Language (Apache Module and CLI)
      php5-bz2-5.0.3_1 The bz2 shared extension for php
      php5-extensions-1.0 A "meta-port" to install PHP extensions
      -----
      su-2.05b# ls -lh /usr/ports/distfiles/ | grep php
      -rw-r--r-- 1 root wheel 4.4M Dec 15 11:35 php-5.0.3.tar.bz2
    22. Re:Upgrade. by fafaforza · · Score: 1

      So where do you update your port? And why do you compile twice. 'make extract' no?

    23. Re:Upgrade. by Skater · · Score: 1

      I can't believe you lost karma for this reply.

      --RJ

    24. Re:Upgrade. by DrSkwid · · Score: 1

      make extract - passed me by, thanks. That was why I compiled it twice. The first make used whatever process the port decided upon whereas the second was in the actual PHP directory.

      I have cvsup on a cron

      like the grandparent, was fed up with getting it to compile with my settings each time I installed a new server / got an upgrade

      just wanted something that was fire and forget while doing all the other stuff

      --
      There are places where the networks are not touching,and there are places where they are-Boeing's Lori Gunter
    25. Re:Upgrade. by Anonymous Coward · · Score: 0

      apt-get install php4 php4-pgsql php4-mysql

      You don't have to recompile anything, they're all just binary modules and all can be installed or uninstalled seperately.

      I've read an immense amount of nonsense in this thread by the macho 'real programmers' who insist you can only write 'proper' applications in Java, Perl, Lisp or whatever, and while I initially thought this phenomena was elitism, I now realise it's just plain ignorance.

    26. Re:Upgrade. by Anonymous Coward · · Score: 0

      Sucker. On NetBSD, pkg_delete -r php, then do a make install clean in php-extensions, which installs the extensions I have selected last time (modules) and php itself. Once that is done, all by itself, I restart apache.

  7. double standards by Anonymous Coward · · Score: 4, Insightful

    I love how you guys take this all seriously when there is an error in OSS software but when there is 1 little error in ASP.net you call it inherently insecure and a piece of garbage.

    1. Re:double standards by _the_bascule · · Score: 1

      You must be new here.

      --
      Our diversity is our strength
    2. Re:double standards by Anonymous Coward · · Score: 0

      Good point: ASP.NET is an insecure piece of garbage

    3. Re:double standards by Anonymous Coward · · Score: 0

      No, PHP is a piece of garbage too.

    4. Re:double standards by Anonymous Coward · · Score: 0

      Quantity.

      When was the last time there was a severe bug in PHP? Okay. ASP or ASP.net? Aha -- a wiener is you.

      Furthermore, since PHP is portable, we can run it on operating systems like this one which have built-in overflow protection. Windows doesn't have, and never will have, the same thing (NX is not the same).

    5. Re:double standards by ocularDeathRay · · Score: 0

      thats because this is something we can DO SOMETHING ABOUT. we can't fix that other software.

      --
      Obama is a twitter sock puppet
    6. Re:double standards by Anonymous Coward · · Score: 0

      Well, why didn't you do something about before, since you had all those eyeballs on the code? You know, checking and re-checking for security problems...

    7. Re:double standards by Qzukk · · Score: 4, Insightful

      Wow gee, how did you think these got found? By the Hardened PHP project bashing their head against the table until ideas popped out? Try "it was found because their eyes were on the code". Something the PHP developers missed that someone else found. Gotta wonder how much stuff Microsoft missed in their code.

      --
      If I have been able to see further than others, it is because I bought a pair of binoculars.
    8. Re:double standards by Anonymous Coward · · Score: 0

      Your point being....?

    9. Re:double standards by ricotest · · Score: 5, Insightful

      You do realise it's a SUBSET of the slashdot population complaining about ASP being garbage, and a perhaps different SUBSET taking OSS software bugs without complaint. There are NO double standards if you stop looking at Slashdot as one person with one brain and a million voices.

    10. Re:double standards by sobachatina · · Score: 1

      People are going to be more attached to- and take more seriously- software that they use.

      Additionally I don't recall the last time I read an article about Microsoft announcing a problem - I usually read about them fixing problems after someone else announced or exploited them.

      There are a lot of people and software developers in particular that are frustrated with Microsoft's illegal monopoly and their attitudes towards the consumer that stem from it. Extra animosity towards them is not only natural but justified.

    11. Re:double standards by Anonymous Coward · · Score: 0

      but when there is 1 little error in ASP.net you call it inherently insecure and a piece of garbage

      OSS code can be fixed by the original developer or by a server admin. Patches are released within a day. ASP.Net has to be fixed by Microsoft, and only Microsoft. Anything else is a workaround.

      I honestly think Microsoft feels that workarounds are equivalent to bug fixes.

    12. Re:double standards by ratamacue · · Score: 1

      How in the world did such a generic blanket statement get modded up?

      you guys...
      you call it...

      Who exactly is "you"? Don't stereotype a group of unique individuals as if they are some kind of collective borg.

    13. Re:double standards by stratjakt · · Score: 1

      When was the last time there was a severe bug in PHP?

      Uh, right now.

      This is the first time anyone's looked in PHP for flaws.

      --
      I don't need no instructions to know how to rock!!!!
    14. Re:double standards by stratjakt · · Score: 1, Flamebait

      But, Microsoft has the luxury of being able to pay people to look for flaws.

      PHP and every other OSS project just sort of sits around waiting for someone to come along and volunteer to do so.

      If HPHP hadn't come along, noone would be looking, and the vulnerabilities would go unpatched.

      Do you ever sit there going over thousands to millions of lines of code that someone else wrote, looking for obscure flaws? It's the kind of boring thankless job that noone would do unless they were paid to. HPHP found them as a side effect to doing something else.

      The very fact that there's a need for a seperate "Hardened PHP" project or "SE Linux" project should say something about the stability and security of those projects' bases. If linux was so secure and unhackable, why did the NSA spend so much money rewriting it? If PHP is so enterprise-ready, why would people try to create a "hardened" version of it?

      --
      I don't need no instructions to know how to rock!!!!
    15. Re:double standards by smagruder · · Score: 1

      Eventually, this becomes "chicken vs. egg."

      PHP is already being used in the enterprise, so it's already "ready." But it's flawed like *every other* programming language/platform. And the HPHP project, through its work, will make PHP even more enterprise-ready. It just simply proves the strength and devotion of the PHP development community. This ongoing commitment is what has driven and will drive enterprise-readiness.

      --
      Steve Magruder, Metro Foodist
    16. Re:double standards by Anonymous Coward · · Score: 1, Insightful

      By "you" I think he means the editors and the prevailing editorial bias. I think it's fair to say they do share one brain.

    17. Re:double standards by squallbsr · · Score: 1

      Yeah, but if you find the exploit - YOU can fix it if you choose to. You find a bug in an OSS piece of software, YOU have the option to fix it. Even if the app maintainer doesn't want to work on it anymore, YOU can fix it. Even though they have gone on to bigger and better things. You don't get that with closed source. With OSS YOU have the power.

      Case in point: We have Outlook 2000 at work and there is a nice little bug that exports a calendar to HTML, but for the year 2005 all the days are off by one. Both Dec 31, 2004 and Jan 1, 2005 are listed as a Friday. Of course Microsoft doesn't support Office 2000 anymore, they aren't going to release a patch. Now if it were OSS, somebody would have already made a patch because they have the source code right in front of them. If it hasn't been fixed by now I would be sitting in front of the code right now fixing the problem. OSS is better because you are free to make changes to the software that you see fit. I for some reason think that the dates in 2005 should fall on the correct days of the week. Am I just in the minority??

      OSS is better for more than one reason. And I WILL crawl all up over closed source projects that refuse to fix their problems in a timely fashion.

      --
      Sleep: A completely inadequate substitution for Caffeine.
    18. Re:double standards by Anonymous Coward · · Score: 0

      Yeah, ain't that a bitch?

    19. Re:double standards by Anonymous Coward · · Score: 0

      By "you" I think he means the editors and the prevailing editorial bias. I think it's fair to say they do share one brain.

      You typed "brain" but forgot the word "cell" after it.

    20. Re:double standards by alan_dershowitz · · Score: 1

      I _realize_ I'm kind of being an asshole for saying this, but I'm a J2EE developer, and I don't have to worry about bugs in ASP _or_ PHP. Comparatively, J2EE's just nice like that.

    21. Re:double standards by Anonymous Coward · · Score: 0

      Well I don't get why you OSS guys take the MS guys so seriously. They are MS clones. Everyone that is anybody, with any real world experence with both MS and OSS knows what OS and applications are best and why. The only question is will the MS guys (mostly unexperensed - under 5 years in real world IT, too lazy to learn a real OS like AIX or LInux) be around to see MS die a slow and painfull death or will they be flipping burgers by then. I am betting they go away with Windows, flip burgers, and dream of the days when Bill ruled .............. you are getting very sleepy. Hey MS guys go back to sleep, us OSS guys got work to do..... LAUGH

    22. Re:double standards by Anonymous Coward · · Score: 0

      While your post is true, it is also unflattering to Open Source. Let me be the first here on Slashdot to formally tell you to shut and stick your head in the sand. You ain't better than the rest of us, troll.

    23. Re:double standards by Anonymous Coward · · Score: 0

      okay everyone, repeat after me: "we're all individuals"

    24. Re:double standards by martinX · · Score: 1

      i'm not.

      --
      When they came for the communists, I said "He's next door. Take him away. Goddam commies."
    25. Re:double standards by bonch · · Score: 0

      Actually, it was mostly due to aggressive testing, the same way people find Microsoft holes.

      I don't think the "many eyes" situation occurs as often as we're told on Slashdot. People aren't just sitting there at their laptop reading line after line of code like a book. If it was true, Firefox wouldn't have all the vulnerabilities it has, which are always found through exploits, not people sitting there reading nothing but the C++ code in their spare time.

    26. Re:double standards by bonch · · Score: 0

      The thing about that "SUBSET" is that it seems to be a lot more visible and a lot more highly moderated. In fact, go and read an ASP article. The threads are endless in their criticism, and a lot of them are "+5 Funny" Microsoft jokes from 1998. Then you go and compare to articles on OSS vulnerabilities like this one, where the discussion is practical and serious with only a few scattered jokes.

      I mean, if you're actually arguing that Slashdot has a balanced readership when it comes to Microsoft technologies, then clearly you read this website less often than the editors do! :)

    27. Re:double standards by Anonymous Coward · · Score: 0

      But you have to worry about speed! :-)

    28. Re:double standards by mrsbrisby · · Score: 1

      the problem is that when there's 1 little error in ASP.net the entire server is rooted.

    29. Re:double standards by Ann+Elk · · Score: 1
      ...stop looking at Slashdot as one person with one brain and a million voices.

      You're right. Slashdot usually acts like a million people with one brain and a million voices...

    30. Re:double standards by Anonymous Coward · · Score: 0

      You're a prime example of the parent poster's complaint. When an ASP bug is found, you say "gee, I wonder how many more of these are around. This means ASP is inherently insecure, with all the unfound bugs and all", when a PHP bug is found you say "because so many eyes are on the code, we found it! This means it is secure now, that's OSS!".

      It's a miracle people like you don't explode from cognitive dissonance.

      PS. I hate ASP. But I hate your stupid comments even more.

    31. Re:double standards by BuishMeister · · Score: 1

      As somebody who works very closely with SE linux I can say that you should first check your sources before making such statements. The main goal of the SE linux is to replace the DAC (discretionary access control ) security model of Linux with the MAC (mandatory access control) It has nothing to do with the fixing the security related bugs. Every bug that will get you root access on normal linux will get you a root access on SE Linux as well. But you will be better off with SE Linux since root doesn't have much power there.

  8. OMG by FiReaNGeL · · Score: 1

    Almost every forum / message board out there utilize these scripts... I think a lot of backup-reloading (for those who have them) will take place if a script kiddie toolbox exploiting these vulnerabilites hit the scene...

    Forum defacing excepted, is there anything else someone could do using these vulnerabilities?

    1. Re:OMG by flatface · · Score: 1

      And that's why they decided not to release any POCs. I know it's just a matter of time, though. Guess it's a good thing for them (forum owners, etc), but a bad thing for me because I don't know if my machine is vulnerable yet.

    2. Re:OMG by vluther · · Score: 3, Informative

      Forum defacing is for the script kiddies, I've seen variations of the unserialized exploit used, to upload files into paths writeable by the apache user, and reading files accessible by the apache user, you can do mysqldumps, upload zombie scripts etc, one of my clients was made part of a zombie network as the user nobody, and redirect scripts were added to many posts, as the posts are stored in the db, and the kid found the mysql user/pass to access the forum.

      Hurrah for Nightly MySQL dumps.

    3. Re:OMG by tiptone · · Score: 1

      don't know if you were fishing for some input or not but here's my take on the vulns. i pay the bills writing PHP and not doing security work so...

      http://www.hardened-php.net/advisories/012004.txt

      #1 - pack() - make sure any user input to this function is thoroughly validated (duh, like all user input)

      #2 - unpack() - same for pack() check for unvalidated input being passed to this function

      #3 - safe_mode_exed_dir bypass - this one can only be exploited by a local user

      #4 - safe_mode_bypass - file path gets truncated so that it could point to a file not allowed by safe_mode

      #5 - path trunc in realpath() - similar to #4

      #6 - serialize() - unvalidated input could cause bad things (duh, back to user input validation)

      #7 - unserialize() - same root cause as #6, though potentially more harmful (i think, again, check user input)

      so with enough user input validation, all of these are No Big Deal. without user validation the apps were vulnerable before these were discovered.

      --
      Please don't read my sig.
    4. Re:OMG by flatface · · Score: 1
      I run a system with over 1600 users on it. I can not expect everyone to use Good Code. Most of them download scripts from other places and don't bother upgrading for things like this. It's still a PHP vulnerability. The reason why I didn't know if I was vulnerable is because I'm running things like mod_security.

      The average user is an idiot. It's the admins who clean up after them in the end.

    5. Re:OMG by WoodstockJeff · · Score: 1
      I looked at the vulnerable code segments in PHPBB2, and I find them doing something remarkably similar to a massive hole I found in a content manager we were using - blindly trusting something that should never have been in the hands of the client side of the transaction.

      In the case of PHPBB2, they save client configuration information in the cookies they send, and decode it when they get a request. When we're doing this sort of thing for our customers, that information is kept on the server, and the cookie only provides a handle to reach it later. This is basic session management, people, and provided for within PHP4! If it is information that needs to be persistent between sessions, it's stored in the client profile on the server, not in a cookie under the client's control! PHPBB2 seems to jump around between the stored-on-server and stored-on-client model, though...

      The content manager was an accident waiting the happen, and it did... The author stupidly allowed the client to specify a file name to include in the script, using the super-secret HTML variable name "link", without even basic validity checking. What kind of mental giant does it take to realize that "if ($link !='') include $link;" is a bad idea?

  9. Anyone have a patch/update for Ensim Pro 3.5 by cybrthng · · Score: 1

    I have a few legacy servers just around for my use and i don't want to pay for the upgrade and downtime..

    anyone know of any ensim pro updates or packages someone has continued to build for this setup?

    (or possibly redhat 7.3 updates..??)

    thanks!

    1. Re:Anyone have a patch/update for Ensim Pro 3.5 by flatface · · Score: 1
      Ensim? Dear God. I worked with that piece of shit for about 2 days before I gave up and converted it to a Gentoo system (remotely, was no easy task).

      Want to upgrade? Try downloading php, compile it as an apache module, and instead of "make install", replace the files individually. Ensim does a lot of weird stuff.

    2. Re:Anyone have a patch/update for Ensim Pro 3.5 by vluther · · Score: 1

      Try looking at http://www.fedoralegacy.org

      They will more than likely have patches for PHP/Apache.

    3. Re:Anyone have a patch/update for Ensim Pro 3.5 by chud67 · · Score: 1
      I have a few legacy servers just around for my use and i don't want to pay for the upgrade and downtime..
      anyone know of any ensim pro updates or packages someone has continued to build for this setup?
      (or possibly redhat 7.3 updates..??)
      thanks!

      You need to get off of Ensim3.5/RH7.3 and get on Ensim4/Fedora immediately. First make sure your Ensim 3.5 is updated to 3.5.21 and then do a backup using Ensim's backup utility, then reload your server with Fedora/Ensim4 and restore from the 3.5.21 backups (Ensim4 was designed to be compatible with 3.5.21 backup archives).

    4. Re:Anyone have a patch/update for Ensim Pro 3.5 by xiox · · Score: 1

      I made some RPMS of 4.3.10 for RedHat 7.3 (this is an upgrade, not a specfic patch for the vulnerabilities). These are based on the RedHat RPMS, but I had to remove curl support to get it to compile. Oh, and you may need to remove the php-devel rpm to get them to install (don't ask me why). Also, you use these at your own risk. You may want to wait until the fedoralegacy RPMS are made. PHP RPMs

      Alternatively, wait until RedHat releases RHES2.1 updates, and do a "rpmbuild --rebuild php.src.rpm" on it.

  10. It's always a mixed bag. by the+talented+rmg · · Score: 0

    PHP is a great language for web applications as many here can attest. While it's true there's some vulnerabilities, there's always going to be a few. The good thing about the open approach is that we know about it and there will be patches in short order.

    For my part, I am very interested in the hardened PHP product. As a purveyor of pornographic materials, such hardened security is a must. Given the way hackers constantly try to hack my authentication servers and post passwords on their "warez" sites, security is critical.

    The fact is, some information doesn't want to be free. My information wants to be paid for. I hope the hardened PHP project keeps hackers out of my servers for years to come.

    --


    A Proud Member of the Reality Oriented Community.

    1. Re:It's always a mixed bag. by Anonymous Coward · · Score: 0

      This account smells like a new troller, keep an eye out.

    2. Re:It's always a mixed bag. by realdpk · · Score: 1, Interesting

      If PHP wants to get serious about security, it needs to stop writing its own libraries for things already available elsewhere, such as GD or MySQL or any number of other programs. It's always going to be difficult to keep the internal and external libraries in sync, better to just use external.

      Basically, if the developers spent less time reinventing every wheel in existence (look at the documentation page some time, the index of the "libraries" is astounding) they might have more time to close holes like this.

    3. Re:It's always a mixed bag. by cosinezero · · Score: 0

      It's not a great language for a serious web application. It's a great language for a barely-working bulletin board app. Just think... Enterprise PHP? Scary.

    4. Re:It's always a mixed bag. by rambot · · Score: 0

      Please define a "serious web application". Have you ever written one? Have you ever written one in PHP and J2EE. Do you have a frame of reference for you statements??

    5. Re:It's always a mixed bag. by Anonymous Coward · · Score: 0

      You don't know what you're talking about. Seriously.

      I've seen many many well-designed hardened PHP-based applications.

      E.g., phpBB, Mantis, phpMyAdmin and the list goes on.

    6. Re:It's always a mixed bag. by dbacher · · Score: 1

      Just so you realize,

      This is a lot of Microsoft's problem. For example, they used libJPEG's code in their JPEG display code. libJPEG had a vulnerability, but many programs used the common code.

      And so the problem looked absolutely horrible.

      On Open Source, it can be worse. If you look in lib, you'll often see several different versions of the same library (libwhatever-0.0.0, libwhatever-1.0.0), etc. and it is difficult to tell what programs might be linked to what version with what vulnerabilities.

      I'm not disagreeing with the setiment, but you have to have good package management and be very careful with what you build by source, or else you can run into problems there too.

      --
      If your code is acting bloated, and is running rather slow, it's likely and predicted that some loops you will unroll.
    7. Re:It's always a mixed bag. by Greger47 · · Score: 2, Informative
      Err?

      Like 90% or so of the modules included with the basic PHP distribution are just wrappers around standard libraries, no code is duplicated nor functionality reinvented. The wrapper is there to make the libraries easy to use.

      The 2 libraries you mention happen to be bundled with the distribution for convenience, but you are free to use external versions supplied by your OS installation or perhaps yourself.

      /greger

    8. Re:It's always a mixed bag. by mr.dreadful · · Score: 3, Informative

      from "The Top 20 IT mistakes to avoid" published by Infoworld

      http://www.infoworld.com/article/04/11/19/47FEto p2 0_5.html

      18. Underestimating PHP

      IT managers who look only as far as J2EE and .Net when developing scalable Web apps are making a mistake by not taking a second look at scripting languages -- particularly PHP. This scripting language has been around for a decade now, and millions of Yahoo pages are served by PHP each day.

      Discussion of PHP scalability reached a high-water mark in June, when the popular social-networking site Friendster finally beat nagging performance woes by migrating from J2EE to PHP. In a comment attached to a Weblog post about Friendster's switch to PHP, Rasmus Lerdorf, inventor of PHP, explained the architectural secret of PHP's capability of scaling: "Scalability is gained by using a shared-nothing architecture where you can scale horizontally infinitely."

      The stateless "shared-nothing" architecture of PHP means that each request is handled independently of all others, and simple horizontal scaling means adding more boxes. Any bottlenecks are limited to scaling a back-end database. Languages such as PHP might not be the right solution for everyone, but pre-emptively pushing scripting languages aside when there are proven scalability successes is a mistake.

    9. Re:It's always a mixed bag. by FryGuy1013 · · Score: 1
      Have you ever looked at the c code for the gd "library" as you call it? It's something like:
      #include <gd.h>

      int PHPCreateImage(int argc, PHPVar argv[])
      {
      if (argc != 8)
      {
      PHPError("Wrong argument Count");
      return 1;
      }
      int imagenumber = MakePHPVarIntoInt(argv[0]);
      .. etc ..

      CreateImage(imagenumber, ..etc..);
      }
      Not much code rewritten.
      --
      bananas like monkeys.
    10. Re:It's always a mixed bag. by realdpk · · Score: 1

      OK, sounds good. Why did they bother then? All things equal, the more code they include, the more potential there is for vulnerability. What's the point if the code doesn't do anything?

    11. Re:It's always a mixed bag. by ubernostrum · · Score: 1

      What's the point if the code doesn't do anything?

      The code does do something. It's a wrapper around the actual library, making it accessible within PHP. Or would you prefer that every single user of PHP had to write his/her own wrappers to do this? That'd be an awful lot of wheels reinvented.

    12. Re:It's always a mixed bag. by realdpk · · Score: 1

      Perhaps you haven't built PHP before, but basically, you can build it so it'll either use the internal or external libraries. If the internal library is just a wrapper, how would the external libraries work at all, unless they too had a wrapper? Then, what would the difference be between the two wrappers? That's what I'm trying to get at here.

    13. Re:It's always a mixed bag. by FryGuy1013 · · Score: 1

      I assume that when you actually do the make, it links the right libraries according to the --with-gd=/usr/lib/gd or whatever. I believe this is the -L directive for gcc. The underlying c code doesn't need to change for this to happen however.

      --
      bananas like monkeys.
    14. Re:It's always a mixed bag. by just-a-stone · · Score: 1

      you just talk about one of the big advantages of PHP - because it _does_ use this amount of external libraries. (and a pain in the ass for thee ones that have to update their special-purpose compilation right now)

      the wrappers are just needed for the zend engine to know how to map php-function parameters to the exports of any external lib (plus some extra things like constants or not too big abstractions for convenience and error handling).

      your examples GD and MySQL happen to address two exceptions for good reasons. the history of GD deveolpment, bug-fixing and reachability of the maintainer just proposed this kind of bundle (e.g. the current gdlib has some build problems on solaris again)
      take a look in the config.m4 in /ext/gd of your php sources to see the crossing of bundled vs. external lib.
      for the bundled MySQL, there are some other reasons, leading from a tight cooperation of MySQL AB, Zend and some core developers.

      but "php does not link enough external libs" is absolutely wrong.

    15. Re:It's always a mixed bag. by Anonymous Coward · · Score: 0

      You don't know what you're talking about. Seriously.

      Wow.. How many phpBB exploits do I have to post for you to tell you that you are a dumb idiot?

    16. Re:It's always a mixed bag. by Anonymous Coward · · Score: 0

      That's a rather awful architecture, and while it may appear to provide predictable scalability characteristics they're not very good ones and will suffer from diminishing returns.

  11. Of course... by Nos. · · Score: 5, Insightful

    Most of these vulnerabilites come down to checking user input. If you are properly checking user input against a set of known good values and rejecting any input that is not a match, your chances of being vulnerable decrease dramatically.
    Yes, I'm a big fan of php, but like any language out there, there are vulnerabilites. PHP had a bigger problem with register_globals being defaulted to on. Not to make light of these vulnerabilities, but if you are checking user input (assuming you're not using a downloaded package) you should be pretty safe.

    1. Re:Of course... by gnu-generation-one · · Score: 1

      "Most of these vulnerabilites come down to checking user input."

      While many programming languages have "tainting" mode, are there any IDEs which use syntax-highlighting to display tainted variables in red, up until the line where they're sanitized (for various configurable definitions of sane)?

      (p.s. don't bother patenting it, this comment is prior art)

    2. Re:Of course... by snorklewacker · · Score: 1
      While many programming languages have "tainting" mode, are there any IDEs which use syntax-highlighting to display tainted variables in red, up until the line where they're sanitized (for various configurable definitions of sane)?

      Taint checking is a runtime thing. The same variable can be tainted or untainted depending on the code path it took to get there. The static analysis necessary to do this for a dynamic language is a very hard problem, and undecideable in the face of first-class functions. If you need bulletproof tainting, I suggest using static typing instead:
      template<typename T> class Tainted {
      T untaint() ... left as an exercise
      }
      You could extend this to a "Dangerous" class that any data has to be wrapped in, with dangerous commands only taking Dangerous instances. But this is all a cheap tainting mechanism -- follow proper type discipline and you get this sort of protection for free. No, it's not terribly fun, but discipline rarely is.
      --
      I am no longer wasting my time with slashdot
    3. Re:Of course... by Anonymous Coward · · Score: 0

      It's insane, this guy's taint!

    4. Re:Of course... by Anonymous Coward · · Score: 0

      I was in the audience for that episode of Mr. Show. (that segment was taped though) a_c

    5. Re:Of course... by Erik+Hollensbe · · Score: 1

      Eh, the only issue with the language is that there isn't really any enforcement going on to ensure that user input is being checked. I don't think that's a problem with the language, although I do think the efforts that the PHP team have put toward it are not in the right direction.

      Taint checking is nice but as a person who's worked with in perl before, no less secure - I've seen lots of code that goes out of it's way to get rid of the taint check as soon as possible whether the data in the variables have been validated or not - and since this could be done by a "friendly" CPAN module, kind of defeats the point.

      What many web programmers don't realize is two major things:

      1) HTTP is stateless, and no matter how hard you try, state checking can be defeated

      2) The user can send you anything they want.

      #2 is pretty much par for the course with software - #1 makes controlling #2 a lot more important.

      The average authentication mechanism used in a HTTP query is a joke - cookies with a "secure" hash seeded with an IP address or whatever that is validated against the client - which means half of your damn hash is already known and easily manipulated. This is the same reason that you tightly control how NIS or SMB is transmitted over the network.

      A secure, transmittable hash needs 3 (although preferably 4) parts - an identifier that helps defeat the most basic replays, a "shared secret", and a "secret" - you might see that X.509 certs share a similar spec in the hostname validation of the cert, the 'shared secret' being the key signature, and the 'secret' being the private key, if you leave the CA out of the picture (which really isn't an option for web sites). A nice touch is to have a constant key to muddy the hash, or to mix up the order regularily - the 'secret' should be variable (it does't have to be long with a strong hash like SHA1) per client or user. It could be something like a date + non-transmitted user ID, ie., data you already have - and it HAS to be validated the same way it was created. People often screw up that important step.

      I'm /pretty sure/ that PHP's session tracking does this, but I haven't looked into it enough. The goal is that even with all the trickery the most you can compromise is 1 account for a limited amount of time.

      Sanitizing text is something that most people don't pay much attention and at best can be used to make your site look unprofessional. In every case where it's possible, use a strict heuristic for defining data and use a library - not a inline method, for checking data. If you're going to display the content AT ANY TIME in the future to ANYONE over the web, normalize it - it should be the rule, not the exception, to strip anything that looks like a HTML tag.

      At a place I used to work, one guy found that HTML was allowed in the name entry of the customer - so in their brilliance they started having fun with it and injecting pictures - what's to keep an attacker from injecting something malicious to compromise the users of the web administration interface (that won't be as clued in) to capture input regarding other accounts or credit card numbers? You know, like posting that information to a dummy account's "reviews" or something silly like that - it doesn't have to be directed at a place he controls - after all, he more or less owns the web application at that point.

      Or worse - the CMS editing suite. Like your CC number on the front page of your website? I bet the business would like it less than you would.

      If all database input was filtered from HTML by default, this would never be an issue.

  12. Secunia advisory by FuzzyBad-Mofo · · Score: 3, Informative
  13. Forums by bugg_tb · · Score: 1

    PHPBB will affect a lot of websites it appear forums.gentoo.org has gone offline, upgrading early perhaps??

    1. Re:Forums by ZonaldRumzfeld · · Score: 1

      uhh, forums.gentoo.org is working fine for me.

    2. Re:Forums by Anonymous Coward · · Score: 0

      No surprise there. Years of waiting for source to compile have conditioned gentoo users to start building as early as possible.

  14. Re:PHP 4 by e-voc · · Score: 0, Troll

    you _can_ still use php as always, otherwise use java instead

    regards
    e-voc

  15. Question/Comment by realdpk · · Score: 3, Informative

    Question:

    "Note: Due to a problem with earlier versions of Zend Optimizer, its users are urged to upgrade to the latest version."

    I can't seem to find any information on what this problem may be. No release notes or anything. Any clues?

    Comment:

    PHP.net's download scheme is worse than Sourceforge's if you can believe that. Therefore, here are some unPHP.net-ized URLs:

    US2
    Belgium
    Finland2

    You'll find you can actually right-click and save these and they won't prompt you for a filename "mirror" or something useless like the rest of PHP's download links.

    1. Re:Question/Comment by DerelictMan · · Score: 1
      "Note: Due to a problem with earlier versions of Zend Optimizer, its users are urged to upgrade to the latest version."

      I can't seem to find any information on what this problem may be. No release notes or anything. Any clues?

      If you don't upgrade Zend Optimizer you may run into some strange foreach() behavior. See: http://bugs.php.net/bug.php?id=31134

  16. Can't compile 5.0.3 by DarkHelmet · · Score: 1
    I've currently tried installing a version of PHP 5.0.3 over the current version of 5.0.2, but it ends failing on make:

    http://bugs.php.net/bug.php?id=31104

    Has anyone else run into this problem? If so, please vote on this so that it's fixed for 5.0.4 ;)

    --
    /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i
    1. Re:Can't compile 5.0.3 by Anonymous Coward · · Score: 1, Insightful
      You're missing some development headers. What linux distribution are you on? You can do something similar to this (I'm on mandrake 10.1 OE):

      urpmi libgcrypt11 libgcrypt11-devel libcryptopp5-devel libcryptopp5-static-devel

    2. Re:Can't compile 5.0.3 by DarkHelmet · · Score: 1
      See the bug report... Fedora Core 2 ;)

      But in any case, this was something that didn't affect either PHP 4.3.10 or PHP 5.0.2.

      --
      /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i
  17. Why isn't hardened-PHP merged with PHP? by DarkHelmet · · Score: 5, Interesting
    I know this is just a thought, but why aren't the changes within Hardened-PHP within the actual version of PHP that's on the site.

    Their implementation of memory checking seems to be sane and valid for all installs. So why are most of us running vanilla like this?

    Just a thought.

    --
    /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i
    1. Re:Why isn't hardened-PHP merged with PHP? by Anonymous Coward · · Score: 0

      If something doesn't work like it's supposed to you probably can't go complaining to the PHP maintainers.

    2. Re:Why isn't hardened-PHP merged with PHP? by pete-classic · · Score: 1

      Probably the same reason we don't all use OpenBSD.

      I don't know what it is, but I'm sure it's the same.

      -Peter

    3. Re:Why isn't hardened-PHP merged with PHP? by Anonymous Coward · · Score: 0

      Because it breaks badly coded webapps - no more remote includes: http://www.hardened-php.net/documentation.php
      Also, looks like it's tested only on Linux.

    4. Re:Why isn't hardened-PHP merged with PHP? by DarkHelmet · · Score: 1

      safe_mode and open_basedir restrictions take those out too, though.

      --
      /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i
  18. Re:Open source vulnerabilities by Anonymous Coward · · Score: 0

    Because it would be even worse if nobody patches their systems and hundreds of PHP-based open source sites are defaced.

    This is proof the system works. Hardened PHP is an open source project and accomplished their goal of making PHP more secure.

  19. Re:Open source vulnerabilities by sirReal.83. · · Score: 1

    Vendors usually hear about them with enough time to prepare an update for any relevant products. For example, if you're running RHEL and are a self-respecting sysadmin, you applied this fix last week.

    You might be right though: a sec-advisory section might be a good idea.

  20. what??? by Anonymous Coward · · Score: 0

    You think your intellectual property should remain under your control?? That's heresy on Slashdot. Turn in your badge, please.

  21. FreeBSD port already updated by Anonymous Coward · · Score: 1, Informative

    # $FreeBSD: ports/lang/php4/Makefile,v 1.81 2004/12/16 11:37:23 ale Exp $
    #

    PORTNAME= php4
    PORTVERSION= 4.3.10

    1. re: freeBSD port already updated by ed.han · · Score: 1

      o, come now: as a host of ACs are always happy to claim, *BSD is dying, so obviously, that doesn't do anybody any good... [/sarcasm]

      ed

  22. Upgraded to 4.3.10... by Bravid98 · · Score: 2, Informative

    And it seems to have compatibility issues. It ended up breaking custom code of mine, as well as Invision Power Board. This was compiled from scratch. Hopefully they'll quickly release a .11.

    1. Re:Upgraded to 4.3.10... by prockcore · · Score: 1

      And it seems to have compatibility issues. It ended up breaking custom code of mine, as well as Invision Power Board. This was compiled from scratch. Hopefully they'll quickly release a .11.

      How crazy is that custom code? We have hundreds of scripts from 4.1 that only required register_globals to be turned on to work perfectly. These are scripts that predate $_GET/$_POST/$_COOKIE vars, and they continue to work.

  23. I bow to you... by Anonymous Coward · · Score: 0
    ...oh sir elitist.

    Gimme a break :-/

  24. Solution... by sleighb0y · · Score: 1, Interesting

    Write your own code.

    PHP is great, but as with anything you install, you have to place a certain level of trust in it. And since web apps are always on to the public you really better trust them. Esp. if you are a n00b, and are installing these apps without knowledge of programming.

    I don't like using a pre-packaged PHP app in a public or semi-public location. Then the code is there for all to study and prepare for an exploit.

    I prefer to write all my own apps. I might use code examples and classes as a base, but input is filtered and checked. And nobody else knows the code.

    1. Re:Solution... by B3ryllium · · Score: 1

      The term for this is "Security through Obscurity". It's like moving SSH (or worse, telnet) to port 23456, only somewhat more indepth (like writing your own telnetd).

      Sure, it works, but only until it becomes popular and, thus, no longer obscure.

    2. Re:Solution... by Anonymous Coward · · Score: 0

      there above comment deserves the "DUMBASS" award.

      go back to highschool.. thats obvious where you cam e from.

    3. Re:Solution... by capt.mellow · · Score: 1

      Well, that's certainly academically correct, but he isn't releasing his code, which precludes its becoming popular. Sure, it's 'security through obscurity', but it's certainly more secure than using a packaged solution which may have a bright red bullseye painted on it (like php-nuke), inviting script kiddies to enter your site's url into their cookie-cutter exploit hacking form.

    4. Re:Solution... by B3ryllium · · Score: 1

      You don't have to release code to become popular. He was talking about creating public-internet sites, and odds are decent that one might take off. And as we all know, closed source does NOT preclude the discovery of bugs and the creation of exploits. *cough*.

    5. Re:Solution... by capt.mellow · · Score: 1

      thanks . . . now please turn your head the other way and cough again. :)

      And yes, I agree with you, but I do have strong feelings about the widely-studied source code of php-nuke (my favorite straw man) being FAR less secure than some hand-coded solution. Of course, if one's hand-coded site took off, it would appear in ppl's 'radar', and they could begin probing it, and they would no doubt find weaknesses.

      But do I think my little hand-coded site will 'take off'? No way, it's a little local organization who nobody else cares about. Yet it got defaced several times by the Brazilian hordes, for the simple reason that it was running their favorite target, nuke. Had I not been running nuke to begin with, there is no doubt this wouldn't have happened.

      There are many ppl in my situation who have sought refuge in the more secure cpg-nuke, but I opted to drop completely out of their sights by not running any flavor of nuke. I think cpg-nuke will make for a tempting challenge for those kiddies, and I don't want to be in the crossfire.

    6. Re:Solution... by B3ryllium · · Score: 1

      Well, I'm one to talk. I rolled my own CMS too. It's kinda fun, but I don't think I would enjoy doing it repeatedly. My specific goal was to design one that was less bloated than PHPNuke. I had tried PostNuke, and it was fine but still a tad too bloated for my tastes (and needs).

    7. Re:Solution... by bobtheowl2 · · Score: 1

      I agree that custom code can be very useful, as I've used my share on my own sites.
      But, this sounds an awful lot like security by obscurity.

  25. Why are these things always announced on Friday? by kd3bj · · Score: 2, Funny

    Why can't it be Monday? I mean, do the people that make these announcements think we _like_ working weekends?

  26. fix it fix it! by Anonymous Coward · · Score: 0

    fix it fix it fix it!

  27. How is this flamebait? by chipster · · Score: 1

    The poster of this parent comment is simply frustrated that Mac OS X is affected by this vuln (which I didn't know was affected until I read his comment).

    1. Re:How is this flamebait? by chipster · · Score: 1

      Thanks for modding the parent up (informative).

    2. Re:How is this flamebait? by 99BottlesOfBeerInMyF · · Score: 1

      he poster of this parent comment is simply frustrated that Mac OS X is affected by this vuln (which I didn't know was affected until I read his comment).

      I'm not sure if you mean that you did not know Mac OS X was affected, or you did not know that the parent was frustrated by this.

      If you read this article, and didn't know Mac OS X is affected, well you probably haven't enabled PHP on Mac OS X.

  28. Hypocrisy of slashot by ad0gg · · Score: 1, Insightful

    If this was an asp.net exploit people would be saying XP, or Server2003 was insecure. Even though IIS isn't installed by default.

    --

    Have you ever been to a turkish prison?

    1. Re:Hypocrisy of slashot by Anonymous Coward · · Score: 0
      If this was an asp.net exploit people would be saying XP, or Server2003 was insecure. Even though IIS isn't installed by default.


      Actually, I hadn't seen that in a post so far.. but since you mention it, yes, Microsoft Sucks Ass.
      (just on general principal)
    2. Re:Hypocrisy of slashot by hostyle · · Score: 1

      Are you trying to say that Windows 2003 Server Web Edition doesn't come with IIS installed by default? Heres a clue for you: OSS bashing doesn't really work on pro-OSS forums.

      --
      Caesar si viveret, ad remum dareris.
    3. Re:Hypocrisy of slashot by GrindKore · · Score: 2, Informative

      Actually Windows 2003 Server does not have IIS, FTP, POP3, DNS and other services installed by default. After you setup IIS all ASP, ASP.NET, Front Page services are still disabled and administrator has to turn them on individual basis. So please next time you hand off a 'clue' leave one for yourself.

    4. Re:Hypocrisy of slashot by ad0gg · · Score: 1

      Yawn.. IIS isn't installed by default on Web Edition as with all the version of server 2003. That page you gave me even says "You can install IIS6". Bet you didn't even read it.

      --

      Have you ever been to a turkish prison?

    5. Re:Hypocrisy of slashot by hostyle · · Score: 1

      Fair cop, if this is true. But why is it called the "Web Edition" if no web server is installed? What makes it different from other Windows 2003 Server editions? From the link I posted I presumed having IIS installed was the difference. Is this just misleading information from Microsoft? I don't run Windows - so I wouldn't know. But I'd like to.

      --
      Caesar si viveret, ad remum dareris.
    6. Re:Hypocrisy of slashot by GrindKore · · Score: 2, Informative

      Windows 2003 Server Web Edition is low cost version of standard edition. It's marketed for web hosting and does not have active directory and media streaming capabilities, it's limited to maximum of 2-way SMP and 2Gb of ram. Follow the link below for comparison table. http://www.microsoft.com/windowsserver2003/evaluat ion/features/compareeditions.mspx

    7. Re:Hypocrisy of slashot by Anonymous Coward · · Score: 0

      If this was an ASP.Net exploit, Microsoft would post a kb article describing how to fix the problem by modifying all of your asp.net scripts manually instead of releasing a patch. It would also by followed by an IIS exploit announced a couple months later to fix exploits known by MS and underground hackers for nearly a year.

    8. Re:Hypocrisy of slashot by Anonymous Coward · · Score: 0

      It is installed, just not turned on by default.

    9. Re:Hypocrisy of slashot by Anonymous Coward · · Score: 0

      Hahaha, but wasn't it funny how Microsoft beat Firefox to fixing the latest internet browser exploit? Strange how it wasn't mentioned on here, even though so many OSS zealots said how they'd "like to see who fixes this exploit first" in the original 'M$ suxx lol' debate.

  29. Meh by paranode · · Score: 1

    While this is true for some, on the whole the major difference is the time between the bug was discovered and when it was patched. MS does tend to take their sweet time.

  30. Check your inputs!!!! But not an impressive record by dwheeler · · Score: 4, Insightful
    Thankfully, most of these problems are easily countered by what you always have to do anyway: you MUST check and severely limit what you allow as input. Letting users provide arbitrary-length data that's then used in realpath is a bug in the first place!

    The unserialize() bug issue is rather serious, though.

    It's true that all systems have vulnerabilities, but that does not mean that all systems are equally secure. What you want is a track record that shows good things. Frankly, I'm not all that impressed with PHP's track record so far. The good news is that the PHP developers have been willing to change critical pieces (like turning off globals) to deal with security issues, and it looks like at least some of them are taking security more seriously. But I'd really like to see evidence of serious steps to not just provide a niftier OO model, but provide a programming language where programs are more likely to actually withstand attack. PHP has a lot going for it, but an implementation that can't handle harsh attacks is simply not appropriate for today's network.

    I'd like to see Hardened-PHP, or something like it, merged into the mainline PHP. Why is it that only some users will get a PHP that tries to defend against attacks? Does this mean that other PHP users never get attacked? Does this mean that PHP programmers have stopped making common mistakes? Nonsense. There's no reason that there has to be a separate project to modify PHP to be secure against attack; that should be part and parcel of PHP itself. The performance impact is tiny, and much less important than keeping control over your own machine. Why should anyone be impressed at the speed of a system that's about to be controlled by an attacker?

    One of the best ways to get a secure setup is to find out what product has the better security track record with evidence of a secure design (modular parts, etc.), and switch to one of them. That's true whether it's OSS or proprietary; OSS is no guarantee of security, it simply makes some kinds of worldwide review possible. Using Internet Explorer or Outlook? Switch to Firefox and Thunderbird. Using Sendmail? Switch to Postfix. That doesn't guarantee perfection, but you're generally better off in the long run. I think you could make a very good case for switching from PHP to Perl or Python or Java. If the PHP folks want to keep their large user base, they need to get on the stick.

    --
    - David A. Wheeler (see my Secure Programming HOWTO)
  31. Re:This proves once an for all by datadriven · · Score: 0

    Does perl come with spell checking?

  32. If by Alioth · · Score: 2, Funny

    If PGP stands for Pretty Good Privacy, does PHP stand for Pretty Hopeless Privacy?

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

      Painfully Hilarious Programming Language?

  33. Re:So sad ... by chipster · · Score: 1
    You should be proud that F/OSS is amazing in the fact that is gives folks choice and alternatives to otherwise proprietary and/or costly solutions.

    You hate the "fanboys" - I abhor the bigots whom fail to recognize and acknowledge the freedom of choice in the F/OSS "world". Try to embrace that freedom - it's good for the soul.

  34. Re:This proves once an for all by fitten · · Score: 2, Funny

    # in a perfect world this would increse my karma
    $karma++;


    No... that would be "in a Perlfect world..."

  35. it never ends ;) by Anonymous Coward · · Score: 0

    Man you know you skip one day of reading security focus emails, return after a nice long lunch, and see everythings gone to hell.

  36. pack()/unpack() fault by brlewis · · Score: 0, Offtopic

    Java serialization and deserialization aren't vulnerable to such attacks, and neither is Scheme's read/write. BRL users needn't worry.

    1. Re:pack()/unpack() fault by smagruder · · Score: 1

      And after people upgrade to PHP 4.3.10, neither will PHP be vulnerable to such attacks.

      Problem solved. Nothing to see here folks.

      --
      Steve Magruder, Metro Foodist
    2. Re:pack()/unpack() fault by Ash-Fox · · Score: 1

      I heard something similar when people made the switch from PHP3 to PHP4

      --
      Change is certain; progress is not obligatory.
  37. Re:This proves once an for all by joeykiller · · Score: 1
    Does perl come with spell checking?
    Yes, check out the module Text::Aspell on CPAN.
  38. Re:Upgrade, Gentoo Style by Anonymous Coward · · Score: 0

    emerge -vu mod_php

  39. Re:So sad ... by anocelot · · Score: 2, Insightful
    I'm sorry, but I have to insert a few Larry Wall quotes here:
    Regarding your post:
    There ain't nothin' in this world that's worth being a snot over.
    --Larry Wall in <1992Aug19.041614.6963@netlabs.com>

    Regarding the topic at hand:
    Let us be charitable, and call it a misleading feature :-)
    --Larry Wall in <2609@jato.Jpl.Nasa.Gov>

    And if you want to be funny:
    Just don't create a file called -rf. :-)
    --Larry Wall in <11393@jpl-devvax.JPL.NASA.GOV>
    ;)
    --
    This tagline brought to you by 1500 monkeys in just under 17 years.
  40. Re:Check your inputs!!!! But not an impressive rec by dbacher · · Score: 1

    Or Mono.

    Also important here (more important) is good application design.

    A hacker cannot get your database information, attach to the database, run arbitrary queries, etc. if your application is properly designed.

    You have a front end in a language or environment that provides application level security (Java or Mono -- Python programs running under IronPython or Jython, don't think perl has app level security in any environment, but might be mistaken).

    Application level security ensures that if the front end is compromised, its access is limited to only those files, folders or facilities that it has been explicitly granted access to.

    Then you connect to a separate server (you can use VM software to run these on a single hardware box, if you need to, or something like User Mode Linux) that has a program that talks to the database.

    If you really want to cut off access, you use ssh and require the machine with the database to ssh and then redirect a port back to itself. This is more secure because that machine then accepts no inbound connections (so the web server doesn't need permission to connect out to anything).

    You access the database only with stored procedures (yes, this rules out most object relation map software), since the API usually takes an array or collection of parameters, and the API applies escapes, etc. as required automatically.

    Stored procedures also have the important trait that they can apply many more and much tighter access requirements than what you usually can apply on a table or view. You can filter records from a result set, etc.

    Yeah, it's a lot more work, but a hacker who finds an exploit has a much harder time working deeper, and alot of security is making a system look secure enough that the hacker decides to go after easier prey.

    --
    If your code is acting bloated, and is running rather slow, it's likely and predicted that some loops you will unroll.
  41. Re:So sad ... by Anonymous Coward · · Score: 0

    What an idiot

  42. Re:Check your inputs!!!! But not an impressive rec by brlewis · · Score: 1

    You make a lot of good points, but if you think that and endless parade of security problems is going to make PHP any less popular, you're mistaken.

  43. Talk displaces action by SimHacker · · Score: 0
    And you know that, how? Were you one of the people reading the code? What open source code have you actually read and reported bugs in?

    What's the ratio of the number of people who always say "open source has fewer bugs because more people read it", to the number of people who actually read open source code and report bugs in it?

    It's a much better use of your time to actually read open source code and report bugs in it, than to read slashdot and repeat tired old slogans instead.

    So what are you doing? Shut up, go read some code, and report some bugs!

    -Don

    --
    Take a look and feel free: http://www.PieMenu.com
  44. Re:Check your inputs!!!! But not an impressive rec by killjoe · · Score: 2, Insightful

    PHP needs taint.

    --
    evil is as evil does
  45. Re:PHP is to Perl as Java is to C++ by msuzio · · Score: 1, Flamebait

    Wow, all that flamebait packed into one post. Kudos!

    I mean, you're completely wrong and utterly ignorant, but nice post! :-)

    (OK, you're right about PHP. It does suck.)

  46. ARGH!!! by Spy+der+Mann · · Score: 1

    Just when I had *FINISHED* upgrading our system to 4.3.9. Seriously, couldn't they choose a more appropriate timing?

    Oh well... here goes another one. :-/

    1. Re:ARGH!!! by Grimster · · Score: 1

      I still hadn't completed upgrading ALL systems to 4.3.9 yet! There goes my weekend.

      --
      --- www.f-theocean.com
  47. Re:PHP is to Perl as Java is to C++ by Rasta+Prefect · · Score: 1
    Perl and C++ are both horribly designed languages, but neither PHP nor Java are particularly well designed languages themselves. Although Java is a lot better designed than PHP, it doesn't hold a candle to Lisp, which was designed decades before Java.

    I've done quite a bit of Lisp (and in fact taught it for a semester), and for most practical projects I'd take _any_ of the above named languages over Lisp. Lisp solves a subset of problems pretty well, but as a general purpose programming language you're going to find most people are just trading memory leaks and buffer overflows for stack overflows.

    --
    Why?
  48. PHP needs CFQUERYPARAM by Anonymous Coward · · Score: 0

    In coldfusion we have a tag when building dynamic SQL statements called CFQUERYPARAM. Basically what it does is allow you to say that this parameter is this type and what not. You can also assign a max value to the tag. So you can tell the SQL engine that this variable is a VARCHAR of 255 maxlength. The beauty about this is that if the variable doesn't meet the criteria, it throws an error. This is another step in preventing SQL injections.

    The other thing that has ALWAYS bothered me about PHP is the error handling. I can't tell you how many sites I have gone to and seen just page of php error throughout the entire page.

    With Coldfusion you simply put

    <cferror type="EXCEPTION" template="error.cfm" mailto="me@me.com">

    in you application.cfm and ColdFusion will grab any and all error that might happen. In the template (in this case error.cfm), you can add code to dump all the scopes and email them to you. It's great because visitor just see a little prefabbed error message and you get the dump sent to you so you can fix it.

    To be honest, I've tried alot of different web programming language. PHP, .Net, JSP and PERL to name a few. I've always found myself staying with ColdFusion. It's easy to learn, fast to program in, simple to understand and debug.

    1. Re:PHP needs CFQUERYPARAM by crayz · · Score: 1

      Don't you still need to do cftry/cfcatch stuff for the error handling?

    2. Re:PHP needs CFQUERYPARAM by julesh · · Score: 1

      In coldfusion we have a tag when building dynamic SQL statements called CFQUERYPARAM. Basically what it does is allow you to say that this parameter is this type and what not. You can also assign a max value to the tag. So you can tell the SQL engine that this variable is a VARCHAR of 255 maxlength. The beauty about this is that if the variable doesn't meet the criteria, it throws an error. This is another step in preventing SQL injections.

      Well, it isn't exactly hard to do input validation in PHP, either. You just put a set of rules at the top of your script somewhat like this:

      <php
      function err ($msg) { /* code to display error message and abort */ }
      if (!is_numeric($HTTP_GET_VARS['foo'])) err ('foo must be a number');
      if (strlen($HTTP_GET_VARS['bar']) > 255) err ('bar must be 255 characters or less');
      ?>

      I tend to use regular expressions to validate input, as they're quite handy for doing so, and there's just about nothing that can't be appropriately validated with them.

      The other thing that has ALWAYS bothered me about PHP is the error handling. I can't tell you how many sites I have gone to and seen just page of php error throughout the entire page.

      PHP error handling is highly configurable. This is just a case of lazy application authors leaving the default error handling in action. The same capability as your <cferror> example can be achieved with the following (untested, so may need a little debugging, but I doubt it) php code:

      <php
      function mail_error($errno, $errstr, $errfile, $errline, $errcontext) {
      mail ("address@wherever", "Error $errno in $errfile", "$errno: $errstr in $errfile at $errline $errcontext");
      }
      set_error_handler ("mail_error");
      ?>

  49. Re:PHP is to Perl as Java is to C++ by Anonymous Coward · · Score: 0

    "Badly designed" depends on your design considerations.

    If lack of inherent obfuscation, lack of apparent and/or actual ambiguity, and ease of creating code without language-encouraged subtle errors are your design considerations, then you have a point.

    If just getting the job done is your only consideration, you may not.

    Particularly with regard to Perl, its foundation is in creating little system administrative scripts (such as logfile parsing and maintenance) that allow for NON-coders to do something more flexible than shell scripting. The fact that it has been extended so that entire web servers have been written in Perl horrifies people like you and me, but that's not an indicator that the tool is bad, just the the wrong tool was used for the job. I don't consider Perl to be anything more than a really feature-saturated BASH. By that standard, I don't think it's all that flawed.

    PHP isn't really a huge improvement over Perl either IMO. It's just two flavors of the same gruel. Although it's not genetically related, I'd say the real sucky language it's replacing is VBScript.

  50. Re:Why are these things always announced on Friday by henrik · · Score: 1

    Pretty swell. Friday after 7pm to Monday 7am means 2x overtime. More announcements of Friday afternoon please. Need that extra money.

  51. Re:Check your inputs!!!! But not an impressive rec by BigCheese · · Score: 1

    ... but it taint there!

    Yea, it was supposed to be funny.

    --
    The obscure we see eventually. The completely obvious, it seems, takes longer. - Edward R. Murrow
  52. It like what my DB prof said about Oracle v. MySQL by ShatteredDream · · Score: 5, Insightful

    The prof I had for my DB class largely hates MySQL with a passion and is an Oracle partisan, but he looked one of the students in the eye and told them to basically shut up when they complained about MySQL versus Oracle. He told the whiner that they should be glad that it worked at all and that they have no right to expect any quality for something they didn't pay for. For some it was a profound statement: MySQL kinda works for you, well guess what, you haven't spent any money on it so who are you to bitch at the guys who work on it... they owe you nothing.

    Products from Zend can be expected to perform very well, but not something that is free for public use. The fact that PHP is so high quality, open and free, gives it some leeway that Microsoft's ASP.NET implementation doesn't deserve. People don't have to spend several thousand dollars to setup an environment capable of hosting PHP because it's free, and all of the tools needed to run it are free.

    None of this of course negates the fact that security holes in PHP are just as serious in practice as those in ASP.NET and need to be fixed ASAP. The difference is how we should perceive free software bugs versus commercial software bugs. When we actually buy a license for a commercial product, we should be able to expect something reasonably akin to top notch quality. Microsoft is getting better in that regard, but the level of quality they have delivered in the past is abysmal compared to what a commercial entity should be delivering.

    By all reasonable expectations, a company like Microsoft should be delivering extremely secure products. They pay very large sums of money to hire some of the brightest minds, and they charge accordingly. Therefore the public has a right to expect extremely comprehensive testing, including OpenBSD-style line-by-line code audits for things like buffer overflows. Does it not surprise anyone that a small project like OpenBSD can find the time and manpower to do that on such a large code base for the manpower present, but Microsoft, a company with probably at least ten times the manpower for just the Windows team cannot?

  53. Re:PHP is to Perl as Java is to C++ by DigitalRaptor · · Score: 4, Insightful

    I would disagree.

    I've programmed in PHP for 5 years and have successfully used it to feed my family the entire time.

    I haven't had any problem with security vulnerabilities since day 1 (I write all of my own software rather than using any particular package).

    It has scaled easily to meet my needs, including an e-commerce site that does $3,000,000+ a year in orders. Granted that is small potatoes for some, but that is irrelevant.

    What is relevant is that PHP is fast and easy to develop in, easy to debug, and easy to deploy. It does what I need it to do, and it does so successfully.

    In my mind it is well designed for it's intended purpose.

    There is no sense picking apart a screw driver and saying what a bad hammer it is. It isn't a hammer. It wasn't designed to be a hammer. It will never be a hammer.

    For my purposes PHP is well designed and is the best tool for the job I've found. I've looked into many other tools, but hands down the winner for my needs is PHP. Trust me, if there were another tool that offered the same power AND ease AND was more profitable for me to use overall, I'd be using it. If it exists, I haven't found it. This isn't a religous pursuit for me. I don't care what the "best" programming language is. I'm here to feed my family and PHP serves that purpose well.

    --
    Lose Weight and Feel Great with Isagenix
  54. Re:Check your inputs!!!! But not an impressive rec by smagruder · · Score: 1

    The same could be said of other popular platforms. PHP isn't especially unsecure. All the attacks against it in this thread's comments are really just biased opinions of developers who prefer other platforms.

    --
    Steve Magruder, Metro Foodist
  55. Re:So sad ... by Anonymous Coward · · Score: 0

    you're an idiot. you're a complete fucking idiot.
    please don't associate Perl with this idiot. it's just a language, a tool. it's not a religion.
    that's all i've got to say.

  56. ASP.Net vs PHP by ad0gg · · Score: 0
    Becauseasp.net has very few found exploits(3 in 3 years). PHP on the other hand seems like a two or 3 week thing. I don't get why this is news. Its like reporting the sun will come up today.

    PHP
    ASP.Net

    --

    Have you ever been to a turkish prison?

    1. Re:ASP.Net vs PHP by SmartSsa · · Score: 1

      That's a completely empty comparison.

      It lists applications that have bugs, not the parsing engines themselves.

  57. from the fa: by bitspotter · · Score: 1


    Advisory: Multiple vulnerabilities within PHP 4/5
    Release Date: 2004/12/15
    Last Modified: 2004/12/15
    Author: Stefan Esser [sesser@php.net]

    Application: PHP4
    Severity: Several vulnerabilities within PHP allow
    local and remote execution of arbitrary code
    Risk: Critical
    Vendor Status: Vendor has released bugfixed versions.
    References: http://www.hardened-php.net/advisories/012004.txt


    4.3.10 contains the fix.

  58. Good idea by Anonymous Coward · · Score: 0

    Reinvent the wheel and introduce your own set of bugs while playing catchup to PHP.

  59. Re:It like what my DB prof said about Oracle v. My by Anonymous Coward · · Score: 0
    The prof I had for my DB class largely hates MySQL with a passion and is an Oracle partisan, but he looked one of the students in the eye and told them to basically shut up when they complained about MySQL versus Oracle.


    So your prof is a chump, what else is new? I work at a university and while there are a number of good folks in the system, there are also a number of dickless wonders hiding behind an advanced degree.

    Introduce him to Postgres, he should really like that.
  60. You should look at the alert vs fix dates, DOH! by Spy+der+Mann · · Score: 1

    I love how you guys take this all seriously when there is an error in OSS software but when there is 1 little error in ASP.net you call it inherently insecure and a piece of garbage.

    FYI, the vulnerabilities were announced on "2004/12/15" (hardened-php). The fix was available since "15 Dec 2004".

    Conclusion: Zend took AT MOST 23:59:59 to release a fix for said vulnerabilities.

    Compare with Microsoft bugs, where it takes an AVERAGE of 6 months to get a vulnerability bug fixed.

    In comparison, Microsoft's software "unpatched and exposed" vulnerability time is about 200 times more than Zend's.

  61. Not if using ports by RinkSpringer · · Score: 1

    Using FreeBSD 5.3-STABLE, I did:

    # cvsup /etc/cvsupfile
    # portupgrade php5-cgi
    # portupgrade -f php5-extensions

    The latter -f causes all extensions to be rebuilt, which is what I wanted. Voila, upgraded in about 20 minutes on an Athlon XP 2000+.

  62. pwn3d by Anonymous Coward · · Score: 1, Funny

    PHP sux0rs
    ASP r0x0rs.

  63. Re:It like what my DB prof said about Oracle v. My by Anonymous Coward · · Score: 0

    Got keep 'em replicated.

  64. About time by Billly+Gates · · Score: 2, Insightful

    These bugs and many many others have been known for a long time.

    Not to sound trollish but the FBI and computer security groups label PHP with more holes than ASP. No joke.

    Its nice to see the php team begin to take security seriously. Especially if they want lamp to ever replace Java or ASP on many corporate webservers and intranets.

  65. Re:PHP is to Perl as Java is to C++ by SimHacker · · Score: 1
    Common Lisp is an excellent general purpose programming language.

    Since when did you actually get a stack overflow in Lisp, when there wasn't actually a bug in your program? There's nothing about Lisp that causes stack overflows more often than any other programming language. Are you saying that Lisp doesn't permit the stack to grow as much as other languages? That's silly. Are you saying that because Lisp has recursion? Other languages have recursion too, you know.

    The interactive programming envorinment and strong debugging tools make Lisp much easier to program, track down and fix bugs in your programs, than other languages.

    Powerful interactive Lisp debuggers have been around for decades longer than languages like Java or tools like Eclipse. C++ debuggers like Visual C++ can't hold a candle to Lisp debuggers.

    Ever try to symbolically debug C macros or C++ templates? The debugger falls flat on its face and gives you no help! It's because of the fundamental design flaws of C++, that the tools are so weak. Java tools are better because they left out macros and templates, but Java is a much weaker language because of it.

    Lisp macros are much more powerful than C preprocessor macros or C++ templates, and it's much easier to cleanly and symbolically single step through and debug them without any of the pitfalls of CPP macros or C++ templates.

    Java wasn't designed to be a good language, it was designed to be just a little better than an absolutely horrible language. The same goes with PHP and Perl.

    -Don

    --
    Take a look and feel free: http://www.PieMenu.com
  66. Re:This proves once an for all by Anonymous Coward · · Score: 0

    ...
    Unfourtunately PHP does prepend a "cd [currentdir] ;" to any
    executed command when a PHP is running on a multithreaded unix ... (from the linked article.)

    Apparently php doesn't!

  67. apt-get upgrade by Mustang+Matt · · Score: 1

    :)

    Works for me!

    --
    The man who trades freedom for security does not deserve nor will he ever receive either. - Benjamin Franklin
  68. the TRUTH about php arrays Re:Arrrrgh by samjam · · Score: 4, Interesting

    php arrays are not wishy washy, they are powerful.
    In PHP there is no difference between a hash and a numerical array, its the same thing.

    try this:

    $a[5]="five";
    $a[0]="zero";
    foreach($a as $k=>$v) echo "$k=$v
    \n";

    and you'll get:
    5=five
    0=zero

    I like em, a php array is like an ORDERED perl hash, and you may be interested to know that PHP style arrays are regularly requested for perl.

    Sam

    1. Re:the TRUTH about php arrays Re:Arrrrgh by Anonymous Coward · · Score: 0

      I have been on the c.l.perl.misc newsgroup for a while now and I have never seen a request to support PHP style arrays. Never.

    2. Re:the TRUTH about php arrays Re:Arrrrgh by Ash-Fox · · Score: 1

      Never even seen it requested on #perl on freenode.

      Nor have I ever seen it on activestate's perl mailinglists.

      --
      Change is certain; progress is not obligatory.
    3. Re:the TRUTH about php arrays Re:Arrrrgh by edjash · · Score: 1

      That doesn't mean they are wishy washy in PHP though. It just means as usual coders are comfortable and set in their ways.

    4. Re:the TRUTH about php arrays Re:Arrrrgh by jdowland · · Score: 1

      Yes but using the $calar delimiter for scalars and vectors is wishy-washy.

    5. Re:the TRUTH about php arrays Re:Arrrrgh by samjam · · Score: 1

      hardly.

      I note using different variable differentiators was up for big debate again with the perl 6 exegesis and apocolypses.

      Sam

    6. Re:the TRUTH about php arrays Re:Arrrrgh by jdowland · · Score: 1

      Good for the perl 6 guys: but I still find it weird how PHP grew from Perl and yet used the dollar sign for vectors. I certainly found it an odd 'transition' when I started to pick up PHP. Still, having something works better than nothing, I suppose.

  69. Re:It like what my DB prof said about Oracle v. My by ad0gg · · Score: 1

    ASP.net is free. Not only is there a mono implementation but you can also install it on windows XP, windows 2000, and server 2003. Hell there's even a free and open source web server written by microsoft if you don't want to run IIS. And in 3 years, there's only been 3 security advisories. Can you say the same about php? I see over 1000 security advisories listed on secunia.org security list. Thats some high quality stuff.

    --

    Have you ever been to a turkish prison?

  70. warning! 5.0.1 - 5.0.3 "breaks" EMPTY() function by phpsucks · · Score: 3, Informative

    Watch out when upgrading!

    <?
    $a = 'foobar';
    print empty($a->nothere) ? 'empty' : 'not empty';
    ?>

    This code prints 'empty' with 5.0.1, but 'not empty' with 5.0.3.

    You must check all your code for the use of empty() with a string!

    I wish PHP would warn everyone about this sort of thing.

    Here is the man page...nothing said about it: http://www.php.net/empty

  71. This doesn't happen by PhYrE2k2 · · Score: 1

    Actaully, PHP/MySQL and PHP/PostgreSQL will only process one statement, and while these attacks would be possible if you were passing it to the shell, is not possible from PHP. Each mysql_query() for example will process one query and return one record. Now with a subselect you might be able to do something...

    --

    when you see the word 'Linux', drink!
    1. Re:This doesn't happen by Anonymous Coward · · Score: 0

      Right, a more effective example for PHP would have been to set $UserID to:
      xj9-4t-7070' or UserID != '

      That would result in the query being processed as:
      select CardHolderName, CCNumber, ExpDate from CCTable where UserID = 'xj9-4t-7070' or UserID != '';

      But the post was only intended to describe a class of problems, and the example was sufficient for that.

  72. PHP blows, security wise by TheSync · · Score: 1

    I have gotten really burnt from PHP security-wise several times. I am a big believer in Zope, which appears to have much better security auditing.

  73. Re:It like what my DB prof said about Oracle v. My by DnsZero · · Score: 0

    That sounds nice but the basic premise is fatally flawed. The axiom those assumptions are based on is: "More Expensive == Better". This is obviously untrue. If I sell you a copy of MySQL (or Oracle), the product quality is independant of the price I charge for it.

    Come on guys, this isn't 1903, the Earth is not the center of the universe and the most expensive product is not always the best (or even better).

  74. Re:warning! 5.0.1 - 5.0.3 "breaks" EMPTY() functio by Anonymous Coward · · Score: 0

    This is why I dislike PHP. I often argue that new PHP versions break things. This is an example. While the same can hold true for all languages/software, i often find that open source projects are more likely to throw binary compatibility out the window. .NET or Java are both better solutions because they can patch things WITHOUT breaking everything.

    I think its about time we got a web scripting language that actually works CONSISTANTLY and that is planned without practically writing in C or trying to mimic java or .net.

    Has the php project heard of UNIT TESTING?!?

    As others have pointed out, you don't have to run windows to use .NET.. mono works fine in Linux and runs in Mac OS X. (i wouldn't try it on FreeBSD though) Java works on linux, solaris, FreeBSD, OSX, OS/2 Warp 4 & Ecomstation, NetBSD, (insert your os here)

  75. Downplaying FOSS security is bad strategy by Vspiritas · · Score: 0

    Do NOT downplay the importance of security in free open source software with the free argument.

    If people second that notion, I hope you are aware of that you are at the same time giving Microsoft ammunition and for once reasoning behind their FUD campaign against FOSS.

    Using your leeway argument you more or less direcly say that FOSS is less secure because people have no financial gain in making FOSS secure.

    It must still be a top priority that the fundamental elements/building blocks in FOSS are both secure and stable.

    If it is a matter of trade off between security and ease of implementation/integration to the FOSS consultant/integrator we'll take security and sanity check any day.

    The same goes if the trade off is security and look and feel. After all FOSS also need to be a business to survive and customers are not opposed paying for customized solutions.

    But if you tell them we use free open source software and your leeway argument is generally accepted, FOSS is starting to sound like a risk.

    And we know that FOSS does not deserve that reputation. But people with lesser insight will be more inclined to believe if the opposite is presented.

    I too say do not underestimate the language said to be a little more practical for extracting and reporting.

    1. Re:Downplaying FOSS security is bad strategy by Anonymous Coward · · Score: 0

      What, your first troll was at 0 so you needed a second one?

    2. Re:Downplaying FOSS security is bad strategy by Vspiritas · · Score: 0

      Sorry dude, no trolling here. That my friend, is more common as a norm for anonymous cowards bringing up poinless criticism.

      But don't worry, I'll accept your opinion none the less, although its importance is subzero.

      Just like this post, which I doubt you even check back at since you just seem to be a spreader.

  76. Re:PHP is to Perl as Java is to C++ by Mortlath · · Score: 1
    Ever try to symbolically debug C macros or C++ templates? The debugger falls flat on its face and gives you no help!

    If your debugger can't debug C++ templates, maybe you should get a better debugger.

    C macros, on the other hand, are preprocessor macros. They are just text replacements. You shouldn't put code-intensive statements in macros.

    There is reason that C and C++ have been popular for so long. They aren't very forgiving as some languages, but they are powerful. Programmers also need to be good programmers to program with them correctly.

  77. parent is not troll--mod up pls by capt.mellow · · Score: 1

    . . . I agree. As a former phpnuke user, I can attest to this. After repeated defacements of my php-nuke site by script kiddies from Brazil, I removed Nuke and wrote my own solution. Not one problem since, and the custom solution was more flexible.

    1. Re:parent is not troll--mod up pls by julesh · · Score: 1

      Note that PHPNuke is widely known to have terrible security. With most of the other packages out there, you'd have had fewer problems.

  78. PHP 5.0.3 EMPTY() and ISSET() bug by phpsucks · · Score: 1

    Please rate this bug important so that it gets fixed http://bugs.php.net/bug.php?id=31098

  79. Re:Why are these things always announced on Friday by just-a-stone · · Score: 1

    the first announcement was on wednesday by stefan esser on bugtraq and full-disclosure. additional info came up later on, PHP 4.3.10 changelist and the according changes in CVS can be seen by everyone since then.

    i do not think that any serious system administraton team gets to know this vulnerabilities via slashdot for the first time, the problem is, that compilation of all dependencies and deployment to all systems is a hard job to do from wednesday night to a reasonable end just before weekend.... in a week where lots of companies have their *drinks all inclusive* xmas events and the usual pre-vacation problems occur.

  80. Not just for script kiddies this time by Anonymous Coward · · Score: 5, Informative

    I don't have an account, so chances are no one will ever read this. However, if you are reading this, then I thank you.

    This exploit has been known about in select hacker groups since late October. The first script for the kiddies was released last weekend (December 11 - 12) and it most certainly originated in Brazil. The group responsible for the initial wave of terror call themselves "H4ck3rsBr", and most of the defacements were done by none other than the infamous "S8ldier". No doubt he wrote a proof of concept for phpBB right away, seeing as how he's always first to the scene with new phpBB exploits involving PHP.

    If you're running forum software that sits on top of PHP, upgrade PHP before it's too late. These guys took out a friend's Linux server because he caught them right in the middle of defacing his clients' websites (just index.html's). They had a rootkit installed and made sure to cause as much damage as possible before being booted off. After backing up the filesystem, re-booting the machine failed, as the partition table was toast and most of the important data sectors had been trashed as well.

    I'm glad that the PHP team decided to fix this, but I'm also hopeful that the phpBB, vBulletin, etc. teams will start validating their input a little more carefully.

  81. Serious by Anonymous Coward · · Score: 2, Interesting

    Just to let you guys know, I have had two of my phpBB forums hacked (within hours of eachother) from this exploit. This is a very serious issue.

  82. Re:PHP is to Perl as Java is to C++ by Anonymous Coward · · Score: 0

    (you suck)

  83. What you're saying by bonch · · Score: 0

    I have to strongly disagree, because basically what you're saying is that we should expect less quality and more bugs in OSS products. That seems to contradict a lot of what we hear about the benefits of OSS.

    You're actually arguing for commercial software by saying it is higher quality since it is funded by consumers. I'd rather pay for something if it's going to be higher quality than the free alternative. I'm concerned with the end result, not the ideology or means used to get there, and that means using the right tool for the job.

  84. isn't 4.3.10 4.3.9? by capt.mellow · · Score: 1

    . . . shouldn't they have numbered it 4.4 instead?

  85. Replication by ttfkam · · Score: 1

    Slony for PostgreSQL.

    --

    - I don't need to go outside, my CRT tan'll do me just fine.
  86. oops by capt.mellow · · Score: 1

    the 'less than' sign got filtered out. It was supposed to read 4.3.10 < 4.3.9

  87. Re: Upgrade by TekZen · · Score: 1

    I have posted before that I think the PHP install process should be simplified. Many of the "features" that require configuration options should be moved to PECL. I would much rather run "pear install mysql pgsql sqlite" than make sure I include them when configuring PHP. It could be that using pcntl is something we decide to do after configuring the server. Why not just "pear install pcntl"? Instead we would have to re-compile PHP. That is something the PHP group should seriously consider. There was a lot of talk about moving extensions into PECL instead of including them in the PHP releases, but then when core developers create packages like SimpleXML, SQLite, etc all of the sudden we have to deal with more bloat in the install.

    The official PHP documentation says that to install PHp on a UNIX system you should runn ./configure --help, but they don't tell you to run it through a pager because there is going to be too much to view on a screen. Much of it is important, but the extensions just add complexity.

  88. Re:Check your inputs!!!! But not an impressive rec by jschottm · · Score: 1

    Why is it that only some users will get a PHP that tries to defend against attacks?

    One of the things that PHP has going for it is that it's easy to write. The downside is that it's easy for people who don't know programming or security designs to write code, and that they've written some big, popular applications which Hardened-PHP breaks, hence why it hasn't been merged in.

  89. Re:isn't 4.3.10 4.3.9? by hcsteve · · Score: 1
    In software versioning,
    .10 > .9
    . Don't read it as one decimal number, read it as a series of decimal numbers concatenated with dots.
    --
    If you were a hot dog, and you were starving, would you eat yourself?
  90. Re:It like what my DB prof said about Oracle v. My by Anonymous Coward · · Score: 0

    You're not looking hard enough.

  91. Re:warning! 5.0.1 - 5.0.3 "breaks" EMPTY() functio by Builder · · Score: 1

    This is what REALLY fucks me off about PHP. Today I _have_ to upgrade - I have no choice as some of my hosted customers will be using vulnerable apps.

    The problem is that during point releases, they change functionality so you're stuck between the devil and the deep blue sea - fail to upgrade and your server gets owned, but if you do upgrade you break customer applications and lose business.

    PHP as a development platform might be great (although, you could argue that point too!) but as a platform to support for customers it's a steaming pile of shite!

  92. Re:It like what my DB prof said about Oracle v. My by Frank+T.+Lofaro+Jr. · · Score: 1

    Well if you ask prospective employees more about why manhole covers are round than about why it is bad to use a function such as gets() which can cause a buffer overflow what do you expect to happen?

    --
    Just because it CAN be done, doesn't mean it should!
  93. Re:PHP is to Perl as Java is to C++ by Bitsy+Boffin · · Score: 2

    PHP is a good web language, well, good enough in that it performs the job, I've been using PHP for a couple of years (before that, Coldfusion for a few years).

    But to say it's well designed is not in any way valid, PHP for the most part is a monolithic hacking togethor of things, lots of inconsistency (function names etc), little modularity (after compilation), many unexpected results (for example try working with recursive references sometime, one mistaken return by value and you end up with two identical copies of the object completely silently, very frustrating).

    Like many projects PHP started out small and gradually new things were hacked onto it. It's not well designed at all, heck, it's hardly designed period.

    But, it does work well enough to do it's job and for now that's OK. But for me it's place in the world is only secured while it's the most popular web language - I think that if mod_mono can get some traction then it might be in for a run for it's money.

    --
    NZ Electronics Enthusiasts: Check out my Trade Me Listings
  94. Re:warning! 5.0.1 - 5.0.3 "breaks" EMPTY() functio by Bitsy+Boffin · · Score: 1

    Err, that's a bug in your code ($a is not an object, -> is an object reference), if you write buggy code then don't expect PHP to give you anything close to expected results, let alone consistent ones.

    --
    NZ Electronics Enthusiasts: Check out my Trade Me Listings
  95. Re:PHP is to Perl as Java is to C++ by mcrbids · · Score: 1

    For my purposes PHP is well designed and is the best tool for the job I've found. I've looked into many other tools, but hands down the winner for my needs is PHP. Trust me, if there were another tool that offered the same power AND ease AND was more profitable for me to use overall, I'd be using it. If it exists, I haven't found it. This isn't a religous pursuit for me. I don't care what the "best" programming language is. I'm here to feed my family and PHP serves that purpose well.


    I could have written your entire post myself, and almost did. I have written projects of every size from very, very small to large projects (~70,000 lines to date) and PHP has been stable, easy, and plenty fast.

    I update all servers monthly unless (like with this one) there's a serious security issue. Big problems are rare. I'll have all 15 servers I manage done tonight; it will take about 3-4 hours. (I have build scripts to automate the nasties and make it easy, so I copy in a tar file, edit a settings file, and run the script)

    PHP just fits in lots of places. mod_php is great on apache. php/cli is a wonderful scripting tool for system administration. php-gtk (with glade) is a wonderful tool for rapid construction of client-side programs that works on Windows, Mac and Linux together.

    PHP is something like VB and ASP rolled together, only cross-platform - a powerful combo!

    --
    I have no problem with your religion until you decide it's reason to deprive others of the truth.
  96. Re:warning! 5.0.1 - 5.0.3 "breaks" EMPTY() functio by seann · · Score: 1

    good call, good call

    --
    I'm a big retard who forgot to log out of Slashdot on Mike's computer! LOOK AT ME.
  97. Re:So sad ... by Ash-Fox · · Score: 1

    I find installing something like suse linux on a few thousand machines with entirely different hardware configurations costly.

    Costly in time.

    --
    Change is certain; progress is not obligatory.
  98. Re:It like what my DB prof said about Oracle v. My by Anonymous Coward · · Score: 0

    By all reasonable expectations, a company like Microsoft should be delivering extremely secure products. They pay very large sums of money to hire some of the brightest minds, and they charge accordingly.

    You haven't learned a damned thing, have you? A company like Microsoft delivers a product that is only as secure as it's needed to sell the product, no more no less. And that is a lot less secure than "extremely". Also, Microsoft doesn't charge according to the quality of their products or their employees, they charge according to the market, and the laws of supply and demand.

    On the other hand, a large open source product is maintained by people who care only about its functionality and security. By definition, a mature open source product will be more robust than its MS counterpart. Note I said large and mature, not version 1.

  99. Re:It like what my DB prof said about Oracle v. My by Rimu · · Score: 1

    The fact that PHP is so high quality, open and free, gives it some leeway that Microsoft's ASP.NET implementation doesn't deserve technically, ASP.Net is free too. so perhaps holding asp.net to a higher standard than PHP is unjustified, IMO. the windows / linux debate is another story.

    --
    Automatically share the housework in a fair way http://www.chorebuster.net/
  100. This prouve 2 points by P2Powah! · · Score: 1

    Point 1. Open source != Security Point 2. ASP > PHP

  101. Re:It like what my DB prof said about Oracle v. My by Beryllium+Sphere(tm) · · Score: 1

    >Does it not surprise anyone that a small project like OpenBSD can find the time and manpower to do that on such a large code base for the manpower present, but Microsoft, a company with probably at least ten times the manpower for just the Windows team cannot?

    Microsoft has incomparably greater resources but incomparably different incentives.

    Mass-market decision makers aren't putting security first. Until they do, a market-driven company won't put security first either.

    What happens when a Fortune 500 CIO says "I need symmetric multiprocessing, not a 'line by line audit', whatever that is"? Microsoft will deliver what the customer will pay for. The OpenBSD team would say, in more or less polite terms, "so what?". (Yes, I know they got SMP in recently).

    Paying for something doesn't entitle you to demand security *unless you make it part of the deal*.

  102. Too bad these guys didn't notice... by DingoBueno · · Score: 1
    --
    ascii art
  103. Re:PHP is to Perl as Java is to C++ by LazloTheDog · · Score: 1
    $3M is a slow day. Done it in php, now doing it in java.

    JM

    --
    Oink, Oink!!
  104. Re:It like what my DB prof said about Oracle v. My by lachlan76 · · Score: 1

    Free as in beer - not free as in speech.

  105. Re:warning! 5.0.1 - 5.0.3 "breaks" EMPTY() functio by beguyld · · Score: 1
    Err, that's a bug in your code ($a is not an object, -> is an object reference), if you write buggy code then don't expect PHP to give you anything close to expected results, let alone consistent ones.

    So would an error be too much to expect? I expect the language to help me out a little, and not just blindly run nonsense.

  106. Red Hat's approach by AnotherScratchMonkey · · Score: 1
    This is why I dislike PHP. I often argue that new PHP versions break things. This is an example. While the same can hold true for all languages/software, i often find that open source projects are more likely to throw binary compatibility out the window. .NET or Java are both better solutions because they can patch things WITHOUT breaking everything.

    People often whine that Red Hat doesn't upgrade often enough and has too many patches in their RPM's. This is why. Taking a conservative approach, RH back-ports security changes to older releases rather than forcing users to upgrade to potentially incompatable new upstream versions.

    Those who want to live on the bleeding edge are free to selectively build and install their own RPM's for the latest versions.

    (Now if they'd just get some RPM's turned out to address this issue....)

    Meanwhile, here's a bugzilla link to track.

  107. Re:Check your inputs!!!! But not an impressive rec by Tablizer · · Score: 1

    Frankly, I'm not all that impressed with PHP's track record so far.

    What *does* have a good record? PHP is the most commonly used web language for external websites. Thus, hackers target it first. I am sure J2EE is full of fun holes, but hackers tend not to bother because if they find a problem there are less sites that they can use newfound exploits on. In other words, PHP is the IE of web languages. Hack the most common to do the most damage.

  108. Re:PHP is to Perl as Java is to C++ by Anonymous Coward · · Score: 0

    Are you defining all procedural langauges as "poorly designed," or is this just a coincidence?