18 posts tagged “php”
I'm gonna attend NYPHP next Thuesday (Tuesday, June 24th at 6:30pm sharp) and look forward to meeting some folks from the NY PHP scene - is anyone else in the area and coming?
Their website tells me that Bruce Momjian (PostgreSQL core developer and EnterpriseDB Senior Database Architect ) will give a talk on PostgreSQL. Good enough to convince me to go, even though there will be the Facebook Developer Garage the very same day (good planning :P).
I might add that the meeting is at IBM's offices in Midtown, and that you need to RSVP at least by Monday 3:00 PM.
After more than two years of development we're proud to announce the
first stable version of RoundCube Webmail. It's not as feature rich as
we'd like it to be but the released version is considered to run
stable for a productive environment. Thanks to our users we fixed many
bugs and added some nice new features since the first 0.1-alpha
version was published in 2005. So go ahead and upgrade your
installations now! Download the latest release from
http://roundcube.net/downloadsA more or less complete list of changes is available at
http://trac.roundcube.net/wiki/Changelog
(...)
Quoted from Thomas Brüderli's email this morning.
Rejoice. Celebrate. But also let's move on and keep up the great work. :-)
Thanks again to everyone involved!
Edit: We are on digg. (Please digg!)
After bumping up the PHP 5.2.x on one of our servers Friday night, I got reports from some of our clients that certain websites would not work anymore. After investigating this problem, I found that most all of the my problems were in Joomla, Mambo and Drupal plugins/extensions which those people used.
Of course no offense to those three systems (and their developers and people using them ;-)), but I googled the error and found that many people reported similar issues on support forums of those three. At least the top results suggest that. On the list of offenders are also shops such as the very popular OSCommerce. Anyway - just let me stress this again - no offense meant (but you need to fix your code :-P).
On to the fix.
The offending code, could look like (this example is from Mambo's AKO_Book extension):
Digging into this, you will probably find a class that would look similar to this:MENU_Default::MENU_Default();
At first I (paniced and) thought that effectively all static calls without a "static" keyword are broken in PHP5.2.5. But after investigating and raising a bit of havoc on IRC and internals@ (Sorry!), Bjori shed some light into/onto my confusion and figured out that this is just a static call to the constructor of a class.<?php
class MENU_Default {
function MENU_Default() {
// do something
}
}
?>
And calling the constructor of a class directly is just wrong. And static calls to the constructor have not been allowed since 5.0.0. (I am not sure why no one reported issues before but I guess since I wrote our customers that the update was smooth, they just had to dig up something. :-))
The fix is simple and should have been there to begin with:
// currently:
MENU_Default::MENU_Default();// replace with:
new MENU_Default();
Issues like that are to be traced back to PHP4's more 'lax interpretation of OO. Even on PHP4 coders should have written the latter, but no one forced them to. And because I know the pain of upgrading a system like Joomla/Mambo, Drupal and others - especially once you put a lot of customization in it, I hope this helps someone out there fix their issues.
Debatable is still if any version of PHP5 should really consider this to be a fatal error. Or if this call should be subject to E_STRICT which was introduced in PHP5 to ensure forward compatibility of code, which sounds like the best fit for this. I believe in the E_STRICT way.
I know and understand that there are probably about a dozen technical reasons to E_FATAL instead, but in my (very) humble opinion to make people aware with E_STRICT and to add a note that E_STRICT will eventually turn into E_FATAL in PHP6 would have been the right path to persue here.
Less breakage and more awareness - they make the "we told you so"-argument more valid. Everything but that just adds to the user's general fear to adopt PHP5 and to finally get rid off PHP4.
On a side note - I feel that I need to add that we only allow those old versions to run because we patched them for our clients and because we use an application firewall called mod_security. mod_security is customizable through rule sets and we constantly update them to combat known attacks (e.g. XSS, comment spam, ...).
If you don't have those resources available to yourself, you need to consider an update of the PHP application more sooner than later.
Most of us use a lot of free software everyday, the GPL looks familiar, but how is software classified as free (versus non-free) and where did it come from?
So I had the maybe weird pleasure to see this lecture two days ago. I went primarily not because I wanted to know so much about free software, but rather for reasons such as I think Richard M. Stallman (RMS) is someone you have to at least witness once. Especially when you are involved in this open source (he objects to this term) thing.
Continue at Metroblogging Berlin.
Wee - rapidly approaching the 1.0, I kicked out a the 0.7.0 release of HTTP_Session2 (tag) today.
What's new you ask?
- Memcache support
- Many fixes in the containers
- Documentation fixes
To upgrade:
To install:pear upgrade HTTP_Session2
Make sure your PEAR is semi up to date. :-)pear install HTTP_Session2
Following the discussion around PDO2 and CLAs in the PHP world, I read this email (from Derick) today:
Why not just do the "right thing" (tm):
- Have PDO2 in core, including all the drivers that don't require a CLA
(MySQL, and assume also pgsql, sqlite, firebird...).
- All things that require a CLA somewhere else.
Well, I've read most of the CLA-related email thread over the past weeks and I was so curious to finally find out who exactly pressed for this CLA to be used. Is it just Zend (which has one on all related to Zend Framework), or is it a specific database vendor like IBM, Microsoft or Oracle? I couldn't figure it out. Apparently [assumption] it's not MySQL, FirebirdSQL, PostgreSQL and SQLite.
Then I came across Tony Bibb's blog post (via planet-php), and most notably an email from Microsoft which he shared. From this email, I quote:
Ideally we're hoping that with our assistance, we can help
PHP projects support SQL Server as a database option, running
on top of Windows.
See how this is relevant to PDO2? ;-)
We're hoping to get the permission to contribute code to do that
ourselves, but in the meantime, we can help out in other ways.
Sounds very humble. Not at all like - "Please sign this [big stack of paper], and then we contribute!".
If the undertaking to add SQL Server support is too large, we have
considered funding a developer to write and contribute the code
to the project.
Those are just excerpts of course (and those are not well quoted at all), but what I am getting at here is that apparently the vendor(s) pushing for a CLA are not the SQLServer guys, at least it makes little sense to me to have two different strategies for a single project ("PHP") when the objective is to have developers use your product ("Microsoft SQLServer").
Just an observation, so I thought I'd share.
Here are some updates from my personal PHP-world from January of 2008.
Writing tests
Tests are hip, tests are cool. Lately everyone does it. So I looked at phpUnit and phpt. So far phpt wins for simplicity, though I am sure phpUnit has its use cases as well (and there is this awesome tool called phpUndercontrol puts all your tests, docs and CruiseControl into shiny graphs). But for now I am sticking to phpt to cover some packages with tests. For a dead-simple entry to the phpt-world, check this: http://qa.php.net/write-test.php
For starters I will write a test with phpt for Net_CheckIP2; and see how that works out.
I can haz article
I got published in this month's php|architect. Woohoo! I wrote an article about RoundCube (which by theway is the coolest webmail on the planet). Thanks again to Steph Fox from php|architect for the opportunity and her über-patience, ... and for correcting my name online.
(Surprisingly someone managed to put an Umlaut (ä) into my name but still screwed up on Till vs. Tim.)
RoundCube
In other RoundCube-related news - no, RoundCube is not dead. Development struggled a bit last year since the project's future seemed not so bright for a while but we made it past that and current
ly work on merging my devel-vnext back branch into trunk. The steps are to apply patchsets from trunk; rc1 to rc2 and then rc2 to current trunk. What a load of work. Argh. :O I hope I can write up another post (as a status report) on Monday.
Writing documentation
Documentation is just as sexy as tests are. At least that's another trend. And that's good because some of PHP seems to move away from a PHP-script-kiddy-image to more thoroughly well-tested and well-documented applications (or packages for that matter). I also managed to write some docs for HTTP_Session2. Woohoo! Thanks to everyone who helped out.
Which reminds me that I need to roll a new release of HTTP_Session2 as well and include Thorsten Roehr's awesome additions. (Sorry for not getting to it earlier!) Also speaking of HTTP_Session2. I am currently using it to handle sessions on a small cluster (three servers) and we handle 4Mbit/s on average. It's working pretty well!
Along with HTTP_Session2 the Contact_Vcard_* packages are due for a new alpha.
Services_Plazes
During plazecamp (early January, 2008), I wrote an API wrapper for the plazes.com-REST-api. It's called Services_Plazes and a PEAR-style package and soon to be proposed (once I get those sexy docs and tests done). And someone's using it already.
That's all, kidz.
UPDATE, 2007/12/07 8:00 AM: Make sure to check the comments, James and Adam offer valuable advice!
For a couple weeks now we kept on saying that we need a checklist of what we need on a server in order to make the site run - now since we setup the neato bonito cluster last week the checklist all of the sudden had a higher priority and I took an hour or so to create that last night.
In the process I used a nifty code snippet by Adam Harvey, to do my PEAR package checking and basically added a loop through get_loaded_extensions() and a shell_exec('cd /foo && svn info') to make it complete. Now season the script with with some CSS, and you have your very own phpChecklist and got yourself some piece of mind.
All this code snippeting and code snippet formatting in VOX is not as trivial as I would like - so anyway, I am sure you get an impression of what I mean.
Just added my File_S3 proposal to PEPR.
Check it out, give it a wirllllll - gimme feedback:
http://pear.php.net/pepr/pepr-proposal-show.php?id=519
So basically what this package allows you to do is, you can open/write/delete files and directories (aka buckets) directly into Amazon S3 referencing it by paths like s3://my_fancy_bucket/file.
And thanks to Darshan from easybib who pretty much sponsors my time on anything pear-related right now.
This morning I rolled another release of HTTP_Session2 and uploaded it to PEAR. So what can you use HTTP_Session2 for and what's new in this release?
The usage question was pretty simple for me, at my current one and only gig we run four web servers behind a loadbalancer and since I'm not a fan of NFS shared storage and writing to it I decided that we could utilize our database powerhouses to store our session data. The other option is what commonly in the cluster-loadbalancing-context is referred to as stickyness, which means that a user is kept on one server during the session, but this adds more load on the loadbalancer itself and it defeats the scalability and hot-failover thing for me.
So this is where HTTP_Session2 comes in and saves the day - I must add, that it's a pretty easy drop-in replacement for regular session calls and works like a charm.
HTTP_Session2 currently supports PostgreSQL and MySQL(i). Except for the garbage collection, which is (oddly) very database specific, others backends should work as well, but we had no time to test that yet.
What's new in 0.6.0?
- We decided to remove the MDB and Creole containers
We felt no one was using either one since MDB is very old and almost everyone is using either DB or its successor MDB2. And for Creole - no idea. I toyed with it briefly at my last job but didn't really fall i love with it. So if you are a Creole user and happen to be using HTTP_Session2, I'll revert and you can maintain it. ;-) - Added the new MDB2 container
- Fixed smaller bugs and lots of CS
- Change stability to beta.
- Develop a PDO or Doctrine container to move to PHP5 completely.
- A File container/driver to for example store sessions on NFS without getting rid of HTTP_Session2 calls. ;-)
If you deployed HTTP_Session2 as well, I'd like to hear from you. Contact me at till-at-php-dot-net, or comment. I am pretty sure that in terms of stability it's more than beta code since I use it myself and we sometimes push 4+ mbit of traffic on the site, but all feedback is welcome.