SitePoint Sponsor

User Tag List

Results 1 to 15 of 15
  1. #1
    Put your best practices away. The New Guy's Avatar
    Join Date
    Sep 2002
    Location
    Canada
    Posts
    2,087
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)

    PHP 5.1 Released.

    http://www.php.net/

    I am interested particularly in the performance bump.

    Thoughts?
    "A nerd who gets contacts
    and a trendy hair cut is still a nerd"

    - Stephen Colbert on Apple Users

  2. #2
    SitePoint Zealot
    Join Date
    Oct 2004
    Location
    naperville
    Posts
    189
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    11b. Changes in MySQL support

    In PHP 4, MySQL 3 support was built-in. With the release of PHP 5.0 there were two MySQL extensions, named 'mysql' and 'mysqli', which were designed to support MySQL < 4.1 and MySQL 4.1 and up, respectively. With the introduction of PDO, which provides a very fast interface to all the database APIs supported by PHP, the PDO_MYSQL driver can support any of the current versions (MySQL 3, 4 or 5) in PHP code written for PDO, depending on the MySQL library version used during compilation. The older MySQL extensions remain in place for reasons of back compatibility, but are not enabled by default.
    Does this mean the mysql/mysqli interfaces are deprecated and we should use PDO?

  3. #3
    SitePoint Enthusiast
    Join Date
    Nov 2004
    Location
    Canberra, Australia
    Posts
    66
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Super Phil
    Does this mean the mysql/mysqli interfaces are deprecated and we should use PDO?
    Sounds like it to me. I haven't even tried PDO yet, is it any good? Is it like JDBC?

  4. #4
    SitePoint Wizard dreamscape's Avatar
    Join Date
    Aug 2005
    Posts
    1,080
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Use PDO if you want to help test and develop it. otherwise, stick to the db specific extensions for now. PDO is still missing several DB specific features.

    At the point of the PHP 5.1 release, PDO is more than ready for widespread testing and could be adopted in most situations. However, it is important to understand that PDO and its drivers are comparatively young and may be missing certain database-specific features; evaluate PDO carefully before you use it in new projects.
    "More than ready for widespread testing" which I translate as, "won't be production worthy [critical applications] for 6 months to a year"

  5. #5
    SitePoint Wizard Ren's Avatar
    Join Date
    Aug 2003
    Location
    UK
    Posts
    1,060
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PDO is pretty good. Been using it for a year now, admittedly nothing I'd consider critical [ie. involving hard currency] But the prepared statements are very nice, lot less pfaffing about with *_escape_string().

  6. #6
    SitePoint Addict
    Join Date
    May 2005
    Posts
    255
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Ren
    PDO is pretty good. Been using it for a year now, admittedly nothing I'd consider critical [ie. involving hard currency] But the prepared statements are very nice, lot less pfaffing about with *_escape_string().
    Last I checked, all of the major db backends supported by PHP already had prepared statement support (since at least 5.0:

    - postgres
    - mysql
    - mssql
    - oracle

    Perhaps some more fringe dbs didn't have it, but it doesn't seem likely that there are many.

    Personally, I'll be modifying my DB access class to inherit from PDO rather than mysqli and postgres, which solves part of the problem (although I'm reserving judgement; I was never happy with ADODB or PEAR:B abstraction layers), but I'm still writing custom code to handle the REAL differences between the databases, since none of them actually correctly support SQL syntax (some are worse than others in this respect, but that's not an excuse for the others to be lacking as well).

  7. #7
    SitePoint Zealot musher's Avatar
    Join Date
    Nov 2005
    Location
    Hull, England
    Posts
    161
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Am I losing the plot or do they normally release a zip file with compiled PECL extensions for windows with new releases of PHP? I can't find the download anywhere.

  8. #8
    SitePoint Zealot musher's Avatar
    Join Date
    Nov 2005
    Location
    Hull, England
    Posts
    161
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just to bumo this back up, PHP 5.1.1 just got a release, seems there was some major problems.

    I never got to try because I needed the PECL packages, they're there with this release

  9. #9
    Put your best practices away. The New Guy's Avatar
    Join Date
    Sep 2002
    Location
    Canada
    Posts
    2,087
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    I am keeping an eye on hosts. Some that I know of (ASO for one) will be offering PHP5 once PHP5.1 is stable.
    "A nerd who gets contacts
    and a trendy hair cut is still a nerd"

    - Stephen Colbert on Apple Users

  10. #10
    SitePoint Enthusiast
    Join Date
    Sep 2003
    Location
    ohio
    Posts
    50
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thumbs up

    This could be a great release.

  11. #11
    SitePoint Wizard dreamscape's Avatar
    Join Date
    Aug 2005
    Posts
    1,080
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    RE 5.1.1 release
    Native date class is withdrawn to prevent namespace conflict with PEAR's date package.
    Mother f*****. I just fixed my own Date class to prevent it from conflicting with the new core Date class. (ok so it only took a couple minutes to do a grep replace, most of which I just sat here watching the computer work)

    So they're not going to rename it, but decided to just not have it at all? ummm... not sure I see why they would not just rename it to something that won't cause a conflict.

    Not sure how they didn't see the conflict coming from 100 miles away either. PEAR aside, tons of devs have their own classes named stuff like Date, String, Array, etc, since PHP has never had stuff like that.

    Why can't they just name it something like DateUtil? or something else.. anything would be better than deciding to just cut it out because its name conflicts.

  12. #12
    SitePoint Addict timvw's Avatar
    Join Date
    Jan 2005
    Location
    Belgium
    Posts
    354
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Afaik, there is a major discussion going about this on php.internals ml.

    I think PHP6 will have a Date class... But, with a bit of luck, there will be namespaces too.. So you don't have to suffer from that naming collision...

  13. #13
    SitePoint Addict kirikintha's Avatar
    Join Date
    Nov 2004
    Location
    Boulder, CO
    Posts
    290
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP 5 has a lot of installation problems with server 2003 and IIS 6 - we had to go back to our older version in order to get it to work properly with older code -
    myspace.com/tarsus
    Technical Coordinator
    BCMT
    "Not impossible, just hard to do!"

  14. #14
    throw me a bone ... now bonefry's Avatar
    Join Date
    Nov 2004
    Location
    Romania
    Posts
    848
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by kirikintha
    PHP 5 has a lot of installation problems with server 2003 and IIS 6 - we had to go back to our older version in order to get it to work properly with older code -
    I recommend to everyone to run PHP 5 on top of IIS as much as I recommend hosting ASP pages in Linux.
    Yeah, it's pretty wise to run PHP on top of IIS 6

    Seriously man, I know IIS is a decent web-server, but the recommended stack is Linux+Apache+MySql+PHP.

  15. #15
    SitePoint Addict kirikintha's Avatar
    Join Date
    Nov 2004
    Location
    Boulder, CO
    Posts
    290
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I know - I hate being unable to use Apache - oh well stuff happens - IIS is still just a microsoft product
    myspace.com/tarsus
    Technical Coordinator
    BCMT
    "Not impossible, just hard to do!"


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •