Forum Moderators: coopster

Message Too Old, No Replies

PHP 5.0.0 Beta 2 released

         

jatar_k

5:33 pm on Oct 30, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



anyone been messing around with it at all?

I pretty much stay away from them until they are released. If I can't use it on a server then it is of no interest yet.

Some of the more major changes include:

  • PHP 5 features the Zend Engine 2.
  • XML support has been completely redone in PHP 5, all extensions are now focused around the excellent libxml2 library
  • SQLite has been bundled with PHP.
  • A new SimpleXML extension for easily accessing and manipulating XML as PHP objects. It can also interface with the DOM extension and vice-versa.
  • Streams have been greatly improved, including the ability to access low-level socket operations on streams.
  • some interesting changes

    Nick_W

    5:36 pm on Oct 30, 2003 (gmt 0)

    WebmasterWorld Senior Member 10+ Year Member




    XML support has been completely redone in PHP 5, all extensions are now focused around the excellent libxml2 library

    That's somthing I'd like to know more about...

    Support for xml is basic at best at the moment..

    Nick

    jatar_k

    5:40 pm on Oct 30, 2003 (gmt 0)

    WebmasterWorld Administrator 10+ Year Member



    I was thinking the same thing that will, hopefully, be as good an improvement as it sounds like.

    DrDoc

    5:58 pm on Oct 30, 2003 (gmt 0)

    WebmasterWorld Senior Member 10+ Year Member



    And what ever happened to them talking about completely disabling "registerglobals"? I know it's by default turned off, but it was supposed to be completely removed in 4.5 already...

    jatar_k

    7:46 pm on Oct 30, 2003 (gmt 0)

    WebmasterWorld Administrator 10+ Year Member



    I would guess at too many sites still use it so hosts would never be able to upgrade.

    DrDoc

    10:46 pm on Oct 30, 2003 (gmt 0)

    WebmasterWorld Senior Member 10+ Year Member



    So... force people to stop writing sloppy code? ;)

    jatar_k

    10:48 pm on Oct 30, 2003 (gmt 0)

    WebmasterWorld Administrator 10+ Year Member



    hehe, true but it would be a host's nightmare. Much smarter to just leave the option available.

    DrDoc

    10:51 pm on Oct 30, 2003 (gmt 0)

    WebmasterWorld Senior Member 10+ Year Member



    Well, it wouldn't be too hard to remove it in PHP, and then provide a wrapper script for sloppy programmers. Just prepend a wrapper script that will give you all the variables - that's what registerglobals does anyway.

    That way it wouldn't be left open for those that do write clean code :)

    jatar_k

    10:55 pm on Oct 30, 2003 (gmt 0)

    WebmasterWorld Administrator 10+ Year Member



    true,

    extract seems to me to be a premade workaround for turning reg globals off.

    I found this the most interesting
    # SQLite has been bundled with PHP

    haven't had a chance to really read up on it yet though.

    DrDoc

    11:02 pm on Oct 30, 2003 (gmt 0)

    WebmasterWorld Senior Member 10+ Year Member



    Yeah, that caught my eyes too. Seems kinda nifty... at least till I have a chance to study it in depth.

    coopster

    12:00 am on Oct 31, 2003 (gmt 0)

    WebmasterWorld Administrator 10+ Year Member



    I read a bit on it. The coolest part is that SQLite is fast and free. But that does come at a price -- not as robust [hwaci.com] and missing features [hwaci.com] you have come accustomed to having available.

    What somewhat concerns me more is this blurb I read recently [us2.php.net]:


    PHP 5 no longer bundles MySQL client libraries, what does this mean to me? Can I still use MySQL with PHP? I try to use MySQL and get "function undefined" errors, what gives?

    Yes. There will always be MySQL support in PHP of one kind or another. The only change in PHP 5 is that we are no longer bundling the client library itself. Some reasons in no particular order:

    • Most systems these days already have the client library installed.
    • Given the above, having multiple versions of the library can get messy. For example, if you link mod_auth_mysql against one version and PHP against another, and then enable both in Apache, you get a nice fat crash. Also, the bundled library didn't always play well with the installed server version. The most obvious symptom of this being disagreement over where to find the mysql.socket unix domain socket file.
    • Maintenance was somewhat lax and it was falling further and further behind the released version.
    • Future versions of the library are under the GPL and thus we don't have an upgrade path since we cannot bundle a GPL'ed library in a BSD/Apache-style licensed project. A clean break in PHP 5 seemed like the best option.

    This won't actually affect that many people. UNIX users, at least the ones who know what they are doing, tend to always build PHP against their system's libmyqlclient library simply by doing --with-mysql=/usr when building PHP. Windows users may enable the extension php_mysql.dll inside php.ini. Also, copy libmySQL.dll into the appropriate %SYSTEMROOT% directory, just like you do with every other bundled DLL from the dll directory.

    Things like this always leave me wondering where this might end up...? And I really hate to hear that maintenance was somewhat lax and falling behind. That's always a confidence booster.

    jatar_k

    12:19 am on Oct 31, 2003 (gmt 0)

    WebmasterWorld Administrator 10+ Year Member



    I remember when that first surfaced everyone was more than a little crazed. I didn't read anything that gave me a real answer. Though it always seems true that until I have to actually get mysql and php playing nicely together with 5.0.0 and 4.x I won't really know how angry to get. ;)

    ergophobe

    6:16 pm on Nov 2, 2003 (gmt 0)

    WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



    I read around about it a bit. I don't think you need to get angry at all, but time will tell.

    One other thing. I thought version 5 would be a more complete object oriented language (private/public/protected objects and methods for example) and some other improvements.

    Tom

    lorax

    3:37 pm on Nov 3, 2003 (gmt 0)

    WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



    I'm quite pleased that the new version is coming soon. Since I'm a programmer and not responsible for the servers it won't affect me until it gets implemented but I will definately be watching for it.

    I do look forward to playing with the XML library but I too am nervous about what is meant by dropping the MySQL libraries. Does this mean we won't be using functions like mysql_fetch_array and such?

    coopster

    4:31 pm on Nov 3, 2003 (gmt 0)

    WebmasterWorld Administrator 10+ Year Member



    Not according to the programmers, lorax:

    There will always be MySQL support in PHP of one kind or another.

    But since you brought it up, I've often thought I should be placing my 'mysql_xxx' functions in a separate config file, functions or something as opposed to embedded within my individual scripts in case I port my code to use a different database or ODBC connection. I'm going to start a new post to see what others do [webmasterworld.com...]

    gethan

    5:36 pm on Nov 3, 2003 (gmt 0)

    WebmasterWorld Senior Member 10+ Year Member



    Registerglobals is only dangerous because of sloppy code. It is possible to write secure code with it on. Granted it is easier for programmers to write insecure code with it, especially novice programmers.

    I agree it should be off by default but disagree that code which relies on it is automatically sloppy or insecure.

    ergophobe

    8:55 pm on Nov 3, 2003 (gmt 0)

    WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month




    I've often thought I should be placing my 'mysql_xxx' functions in a separate config file

    For quite a while I have used functions like "db_fetch_array" which in its default form, just calls mysql_fetch_array.

    I've been telling myself for a while that I should quit doing this since
    - it's a slight performance hit
    - I have to remember my custom function's name
    - "I'll never switch from mysql really anyway"

    Now I'm thinking I'll just stick with the old inefficient way... I guess if anything I do ever starts getting serious traffic, I'll have to rethink that, but for now maintainability rules over speed for me.

    Tom

    copongcopong

    10:30 pm on Nov 4, 2003 (gmt 0)

    10+ Year Member



    support to xml looks very interesting ...