Slashdot Mirror


PHP 4.3.0 Released

aftk2 writes "PHP.Net has just reported the release of PHP 4.3.0. The update sports a unified method of handling files and sockets, a bundled GD library (for working with images), and finalizes PHP's command line interface. For other information, check out the ChangeLog."

15 of 231 comments (clear)

  1. That's great by Karamchand · · Score: 5, Insightful

    Thanks go to the PHP team for all this great work!! :-)

    It's a pity though that Apache 2 support is still experimental. I hope the Apache and the PHP team get the work done fast so that Apache 2 can spread faster! :)

  2. Best New Feature by The-Perl-CD-Bookshel · · Score: 5, Interesting

    Is the friendly error messages , they point you back to the PHP Documentation. Being a regular in #PHP IRC channels, this is going to save me a lot of headaches :) Praise the lord, the newbies have fully automated RTFM messaging!!

    --
    I don't keep a lid on my coffee so when I walk around I look busy -me
    1. Re:Best New Feature by netsharc · · Score: 3, Interesting

      Hehe, you say it right, PHP is nowadays too popular that every "I know Frontpage!" idiot has begun trying it.

      Yes I'm an elitist. Leave computing to the real guys.

      --
      What time is it/will be over there? Check with my iPhone app!
  3. PGSQL support problem? by DragonMagic · · Score: 3, Informative

    I'll have to recheck this later, but I installed PHP 4.3.0 on a Cobalt RaQ3 over a PHP 4.2.3 install using the same configuration line, simply adding the GD install flags. The PostgreSQL make errored out on the install, when it was compiled in 4.2.3 without a problem. Took it out of the configure line, and it installed fine.

    I really do enjoy having Postgre and MySQL support on the same machine, but for now I guess I'll have to stick with MySQL until I figure this one out.

    But above all, CONGRATS on the changes, PHP team, and please keep up with the good work! It's a great software and a great asset to server administrators, programmers and scripters around.

    --

    Human nature is the same everywhere; the modes only are different. -- Earl of Chesterfield
  4. In a related note.... by Davorama · · Score: 5, Informative
    ...this just came in to my inbox. PEAR at version 1.0. Good job folks!
    The new PEAR package PEAR-1.0 (stable) has been released at http://pear.php.net/.

    Release notes
    -------------
    * set default cache_ttl to 1 hour
    * added "clear-cache" command

    Package Info
    -------------
    The PEAR package contains:
    * the PEAR base class
    * the PEAR_Error error handling mechanism
    * the PEAR installer, for creating, distributing
    and installing packages

    Related Links
    -------------
    Package home: http://pear.php.net/package-info.php?package=PEAR
    Changelog: http://pear.php.net/package-changelog.php?package= PEAR
    Download: http://pear.php.net/get/PEAR-1.0.tgz

    Authors
    - ------------
    Stig Bakken <ssb@fast.no> (lead)
    Thomas V.V.Cox <cox@idecnet.com> (developer)
    Martin Jansen <mj@php.net> (helper)
    --

    Davo -- Free speech, free software, AND free beer.

  5. Re:Why I prefer PHP to Perl by Anonymous Coward · · Score: 5, Funny

    While I wouldn't use its to code the new Doom (VB would be a better choice)

    *ROTFL*

    Ahh, an excellent post. I'll give you a solid B+.

    But, if I may give you some advice. The VB comment gives you away. You must make your trolls highly subtle, even more so than they are now. They must balance lightly on a fine edge between Trolldom and NonTrolldom. People in a hurry should be able to scan your message and be 100% convinced you are an idiot, and have no idea you are really in control. Then they will post, and when the troll is discovered, THEY will look like idiots, and you will be revealed as a genius because of your gentle entrapment. This is the true genius of a troll. To ensnare and to incite the unwary.

    One metric I use in my own efforts is the dynamic of up/down moderations. A "perfect troll" should look like this:

    1. First the comment should be modded up +3 or +4 insightful immediately, since your post will no doubt be long, and in the early stages, all long posts are considered insightful because nobody bothers to read them.
    2. Next, people who disagree with you will come by and mod it down to +1 flaimebait (a few humourless souls will actually mod it as a troll).
    3. Next, people who get the joke will come and raise it to +3,+4 funny. Now your Troll is gaining steam.
    4. It should waffle about between Troll and Funny for several minutes, hours if you're good. Hitting zero is a bad sign, your post might get lost. If this happens, you made your troll too inflammitory.
    5. When things settle, you should have "total=16" or better in the mod point summary.
    6. Finally, it should stablize at +4 funny. +5 means you made the joke too obvious. +4 is perfection. If you make it this far, congratulations!

    I wish you luck in your further efforts.

  6. Student suspended over suspected use of PHP by happypizzaguy · · Score: 5, Funny

    I thought this might apply here. Hypertext preprocessors are pretty dangerous. Everyone use 4.3.0 with caution.

    --
    "When all else fails, there's always delusion." -Conan O'Brien
  7. consider running an opcode cache by Kunta+Kinte · · Score: 4, Informative
    Most server side scripting engines nowadays employ opcode caching. Code is compiled the first time executed, but run from memory the rest of the time.

    This is different from HTML output caching.

    Opcode caching is said to increase performance by 30-200% depending on the cache code you use and your app.

    With about 30% of apache installs running PHP, and with more than 50% of the web running apache, I'm surprise the PHP does not include an opcode cache with the install.

    That's a lot of wasted cpu cycles :) Just compiling PHP scripts on every page hit.

    There are open source caches out there, see the link in my sig.

    --
    Based on upvotes, Ageism is the only "-ism" Slashdotters care about and think isn't SJW
    1. Re:consider running an opcode cache by MmmmAqua · · Score: 4, Interesting

      Why no official PHP Opcode cache [weblogs.com]? 30-200% performance gain

      Simply asked, simply answered: there is no "official" PHP opcode caching because PHP relies on the Zend engine and the PHP developers work very closely with the people at Zend, who sell the Zend Performance Suite (formerly Zend Accelerator), and the guys at PHP are not about to cut into Zend's livelihood by bundling a product with PHP which makes the Zend product redundant.

      --
      Arr! The laws of physics be a harsh mistress!
    2. Re:consider running an opcode cache by glwtta · · Score: 3, Interesting
      Just compiling PHP scripts on every page hit.

      Ok, lets see, in the same thread there is a post about PHP not having an XML parser of any kind (the author mentions having to use regexp, insane as that sounds), I am assuming that means there is no HTML parser (or an equivalent of HTML::TreeBuilder at that) either.

      Call this "informative-flame" bait, but I am trying to figure out why people get upset when PHP isn't refered to as the greatest thing of all time. I personally haven't used it for a couple of years, so I don't know about many of these features.

      What does PHP use in terms of a browser agent (a la LWP)? Is there really no support simple filebased db persistence? (by which I mean something along the lines of tieing a hash to BerkleyDB). How well does it hook into the other stages of the Apache request handling pipeline?

      Oh and something I'm curious about (too lazy to look it up, I guess) what sort of exception handling does PHP have (ie it's equivalent of 'try {} catch {} finally {}')?

      What sort of logging modules are available? (log4PHP?) I'd also be curious to know about how PHP's templating systems measure up, from someone who's had experience with this sort of thing...

      Anyway, this is a troll, but I am curious about the answers to those.

      --
      sic transit gloria mundi
    3. Re:consider running an opcode cache by Kunta+Kinte · · Score: 3, Interesting
      Simply asked, simply answered: there is no "official" PHP opcode caching because PHP relies on the Zend engine and the PHP developers work very closely with the people at Zend, who sell the Zend Performance Suite

      That's the main answer I'm hearing. But zend is very expensive.

      Maybe there's a compromise. How about a modest PHP opcode cache that has only some of zend's features; ie. a little bit slower and more conservative than zends.

      I appreciate the work the zend guys have done, trust me I do. But that's an important feature to leave out.

      --
      Based on upvotes, Ageism is the only "-ism" Slashdotters care about and think isn't SJW
    4. Re:consider running an opcode cache by Malcontent · · Score: 3, Informative

      "Ok, lets see, in the same thread there is a post about PHP not having an XML parser of any kind (the author mentions having to use regexp, insane as that sounds), I am assuming that means there is no HTML parser (or an equivalent of HTML::TreeBuilder at that) either.'

      PHP has both SAX and DOM based XML parsers. It also has an xmltree function to instantly build you an object hierarchy from an XML document. There is also the most excellent phpxpath object available here

      "What does PHP use in terms of a browser agent (a la LWP)?"

      It supports fetching from URLs the same way as opening and fetching from files. The new version also has streams. Also it has hooks into CURL for more sophisticated stuff. There is also the excellent snoopy object.

      "Is there really no support simple filebased db persistence? (by which I mean something along the lines of tieing a hash to BerkleyDB)"

      There are hooks into berkley db if you want to sink to that level. If you want to sink even lower then any php variable, array or object can be turned into a string and saved to files or sent to other URLs or what have you.

      "How well does it hook into the other stages of the Apache request handling pipeline?"

      You don't have that much control over the pipeline but you can hook into auth and such. I never needed anything it did not provide.

      "Oh and something I'm curious about (too lazy to look it up, I guess) what sort of exception handling does PHP have (ie it's equivalent of 'try {} catch {} finally {}')?"

      PEAR has a pretty good error handling library. Otherwise you basically just test for errors manually. You call a function with @function which surpresses error messages but sets global error indicators which you can test for. Not great but gets the job done. Version five will have try catch. All in all error handling in php is better then perl and worse then java.

      "What sort of logging modules are available? (log4PHP?)"

      PEAR has a logging class. I know that there are others out there as well. PHP also hooks into syslog if you want that.

      " I'd also be curious to know about how PHP's templating systems measure up, from someone who's had experience with this sort of thing..."

      smarty is an outstanding templating engine with caching. I don't see how you could possibly do better. There are numerous others.

      I hope this prevents you from further trolling. Now that you are armed with actual knowledge (which you could have gotten by simple searching) you no longer need to troll here.

      --

      War is necrophilia.

  8. Re:Command Line Interface? by soundofthemoon · · Score: 3, Informative

    While MS continues to innovate visual solutions to problems, the open-source community keeps returning to outdated ways of doing things... The idea that you should have to learn the command line interface to a language will end up coming back to bite PHP it the ass.

    Not sure if this is a troll or just a misfire. The optional CLI is an addition to PHP, not something that changes how you use it from web pages. The CLI is a valuable feature. It lets you use PHP as a shell scripting language, rather than being restricted to CGI processing.

    Using the CLI, you can write a wrapper that dumps a PHP-created web page to a static HTML file. Now you can use PHP as an authoring tool for statically served web pages. Nifty!

  9. Re:XML? by DragonMagic · · Score: 3, Informative

    PHP can be configured for XML support, but I've seen PHP move from HTML to XHTML support instead. One thing I'd love to see is a way for an install-level configuration for using XHTML or XML on PHP output. Also, yes, the striptags and htmlentities and such will barf on XML codings, and there should be better support for this, hopefully in 4.4.0

    --

    Human nature is the same everywhere; the modes only are different. -- Earl of Chesterfield
  10. Re:Most needed feature for newbies...... by caluml · · Score: 5, Informative

    I can't believe you're saying this.
    The PHP docs are brilliant.
    You just type in the function name, and there are enough examples to get you running until you actually start understanding the language.

    I learnt PHP purely from www.uk.php.net, and I have always found the Java and Perl docs to have too much stuff in them.

    The PHP docs are like this:
    mysql_connect ([hostname],[username],[password]) Returns true if successful.
    What more do you need to know? What goes into a function, what comes out.

    I'm genuinely not trolling here, I'm just surprised that anyone could moan about the PHP docs.