What’s keeping you from PHP5?

First up: as an in-house SitePoint’s PHP coder/waterboy, I’m stepping in for Harry as a guest blogger while he digs his way out from the February Zurich snowfall. Hopefully we’ll see him back and all thawed out soon ;-)

What’s keeping you from PHP5? For me this question applies on three fronts. It encompasses work we do on SitePoint’s PHP codebase, work we undertake for clients’ projects and tinkering I do in my spare time.

Only in the latter – the 2am toiling PHP geeks promise to do during the swearing in ceremony – have I made any semblance of a switch to PHP5. SitePoint.com is firmly entrenched in PHP4, even though PHP5 offers many enhancements I’d like to take advantage of.

I suspect many, indeed most, large scale custom built websites using PHP are still running on PHP4 with no plans (short term at least) toward making the switch. In fact – perhaps because it’s my first blog – I won’t throw unfounded claims into the wind; so let’s have a look:

http://www.php.net/
X-Powered-By: PHP/4.3.3-dev

http://www.vbulletin.com/
X-Powered-By: PHP/4.3.11-dev

http://www.friendster.com/
X-Powered-By: PHP/4.3.8

Friendster is an interesting one, given their much publicized – and comparatively recent – switch from JSP to PHP.

Surely if there’s ever a time to hop onboard PHP5′s sublimely object-oriented and exception-handled bandwagon it’s during a ground up re-write?

The fact that php.net is still running PHP 4 is telling indeed. Haven’t managed to find any gossip as to why, perhaps someone knows something about this?

Our experience is likely very similar to other long-running PHP powered websites; we have a large codebase, much of it affectionately described as “legacy”.

In and of itself, though, this isn’t the problem. PHP5/PHP4 compatibility is near perfect until you hit some of the stickier areas of objects and references. These, too, can be fixed easily enough, though it’s likely to be nearly impossible to hunt down all the snafus before going live. Just like any new software release, really, incompatibilities are to be expected.

The real trouble arises when you encounter more esoteric incompatibilities; ones which cannot be readily predicted or spotted without a certain combination of programmatic states. A case in point I encountered while trying to get WordPress running on PHP5.

“Where are the unit tests?” I hear Harry thinking…

PHP of course can’t be blamed for this situation. A bug is a bug, relying on “undefined behavior” is never good practice. But these are the scenarios which can be almost overwhelming in a large scale application that has evolved with PHP as the language has matured.

I don’t remember feeling such friction when we switched from PHP3 to PHP4. I think key to this was the relative simplicity with which we could run PHP3 and PHP4 within a single Apache installation. Unfortunately the same can most definitely not be said for PHP5.

On a personal server box I share with some fellow SitePointers we (perhaps naively) elected to go with PHP5, and I’m pretty much at the point of getting additional IP addresses so I can run an entirely separate Apache process for PHP4.

PHP5 has much of what I want; it’s the premium beer at the minute, but all told I can’t yet make the switch.

So what’s stopping you? And what large sites out there are using PHP5?

Free book: Jump Start HTML5 Basics

Grab a free copy of one our latest ebooks! Packed with hints and tips on HTML5's most powerful new features.

  • http://www.peterakkies.com/ Kilroy

    Nothing is stopping me. Applications I am developing in PHP only run on PHP 5. I feel that if we want everybody to make the switch, all of us have to try to help. Your software might just make others decide to upgrade to PHP 5.

  • http://www.sanisoft.com tariquesani

    Hosts!! Decent affordable hosts ready to put PHP5 on their servers – it is a chicken and egg situation

  • http://www.igeek.info asp_funda

    I build my apps on Win2K/IIS5 combo & then deploy them on Linux/Apache combo. I’ve heard that PHP5 still isn’t stable on Windows. And that being said, my webhost doesn’t offer PHP5 yet. There are quite few webhosts that offer PHP5 at the moment.

    And porting the code-base is indeed a problem but it can be sorted out. Its the first 2 issues that are holding me back.

  • http://www.silentflute.co.uk worchyld

    Five reasons what’s keeping me from moving to PHP5;

    1) Hosts – few hosts actually provide PHP5 – or with all the extensions – or with all the libraries.

    2) Extensions – With my version of PHP4 I got lots of extensions, but with PHP5 there is none – I can’t seem to find a PHP5 download with ALL the extensions, including MySQL, XSTL, etc. What’s the point of allowing me to code in XSL for the first time and not give me the tools to do it?

    3) MySQL – I’m still confused by this, is MySQL supported or not, why not – where are the libraries to make this work?

    4) Complicated installation – Installation seems pretty easy until you are told you have to move libraries here, there and everywhere and creating a mess of libraries – with PHP4.x it’s easy – you install it, it works.

    5) Other people using PHP4 What happens if I need to write code for a project for a client who doesn’t use PHP5? We need clear guidelines of being able to use PHP4 and PHP5 together.

    There are lots more reasons, but that’s basically what’s keeping me and my colleagues from moving from PHP4 to PHP5.

  • lsmith

    MySQL is supported on PHP5. The libs are just not bundled anymore. Actually you even need PHP5 and the new MySQLi extension to talk to the more recent 4.1.x releases.

    Aside from that the reason I am not using PHP5 is that my existing projects/framework are build on PHP4 and it takes a bit more time to start using the new features. Stupid and highly questionable BC breaks like array_merge() are certainly no help either:
    http://www.php.net/manual/en/migration5.incompatible.php

  • Davey

    I just wanted to note that whilst http://www.php.net does not run PHP5, some PHP mirrors do (at least 3 do)

    - Davey

  • http://www.silentflute.co.uk worchyld

    It would appear my main beef is actually ease of use, portability, functionality and usability.

  • Markus Wolff

    Face it, people: PHP4 is no longer actively developed. There will be bug fixes for a certain amount of time, and that’s it.
    So sooner or later, you’ll either have to dig into PHP5, or port your apps to an entirely different web framework. I’ll leave it to you to figure out what’s more work :-)

    I don’t understand why so many people are so afraid of new versions. I don’t get it with Apache 1.3 vs. 2.0 and I don’t get it with PHP4 vs. 5. If you don’t at least try the stuff, you’ll never know if it will work for you or how much work will be involved getting it to run with your existing apps.

    In the end, it might turn out not to be such a big deal: Our application framework, heavily based on PEAR classes, has grown quite complex over the years and we now have a CRM system, a project management system, an eCommerce system and several smaller apps built on top of it. Switching from Apache 1.3 to 2.0 was kind of a no-brainer. The switch from PHP4 to PHP5 required changing a total of 8 lines of code in some of the core components, plus adding a new compatibility function that detects the PHP version and will define a clone() function in case the server still runs PHP4 – so until we start using the exception handling, which is planned for the next versions, we can even switch between PHP4 and 5 seamlessly.

    Really, it ain’t such a big deal.

    Here’s a list of some of the PEAR packages we’re using, if they’re on your list as well, you know those can be safely used with PHP5 (unless in E_STRICT):

    - DB (with MySQL and MSSQL drivers)
    - DB_DataObject
    (if you use the old $obj->__clone() method to
    copy objects, you’ll need to change this to
    use PHP5′s new clone() function, and provide
    a user-defined one when running PHP4, in case
    you need that backwards-compatibility. This
    is *not much work* – trust me :-))
    - DB_DataObject_FormBuilder
    - HTML_Template_Sigma
    - Payment_DTA
    - Spreadsheet_Excel_Writer
    - Cache_Lite
    - Date
    - HTML_QuickForm
    - HTML_TreeMenu
    - Image_Transform
    - LiveUser
    - Mail && Mail_Mime
    - Services_ExchangeRates
    - Validate

    Outside our framework, I also use XML_RSS for grabbing some newsfeeds – this one didn’t seem to run on PHP5 for some strange reason that I couldn’t find out, but I seemed to be the only one having this problem. The Solution was, again, very simple: Instead of the XML_RSS object I made an instance of PHP5′s SimpleXML – from there on handling is pretty similar to XML_RSS.

    I hope this list will convince some more people to give PHP5 a chance :-)

  • Berislav Lopac

    I’m pushing my company to use PHP5, at least for internal projects.

  • http://webtech.lv kaklz

    I must say the biggest problem is about the hosts. I did the switch by setting up my own server box and placing it by some ISP for a reasonable price. There are no hosting providers in my country that offer PHP5 for public users.

  • Anonymous

    just the fact that I incredibly dislike PHP5.

  • http://www.vinniegarcia.com/ vgarcia

    1. The system I make the most use of (WordPress) isn’t really PHP5 compatible yet.
    2. My host doesn’t provide PHP5, and there don’t seem to be any immediate plans to support it (and I’m not switching hosts).
    3. Most other people don’t have PHP5 on their servers yet either, so there’s little point in me writing something that won’t work on a majority of systems.

  • Ren

    http://snaps.php.net uses PHP5, but its not that entirely impressive website, well atleast from the user PoV. :)

    “I’ve heard that PHP5 still isn’t stable on Windows.”
    Hmm been developing with PHP5 on windows 2000/IIS5 fine for sometime now, and seems very stable.

  • http://www.lowter.com charmedlover

    I have it installed of my development server, but my web host is still with PHP 4. I should request them to upgrade, it would be worth it.

  • MiiJaySung

    We use PHP5 at work.

    I think a lot of people blame hosts. I think the big reason the hosts don’t want to rush into this is because PHP5 can’t run with PHP4, and hosts do not want to follow the problems the PHP4 had in it’s early days where security flaws and continuous patches were commonplace. Compatiblity is another issue as you stated with Word Press.

    PHP 5 isn’t common with many install systems (i.e. apt-get, up2date, rpm). On top of this, it can be faffy to compile if you are a ‘lazy’ Linux user.

    The main reason many big sites won’t move is probably due to the “if it ain’t broke, don’t fix it” policy.

    Overall, for new projects PHP5 is the way forward. To me PHP4 was far to annoying with it’s list of silly querks (famous bug 8130, objects can’t be static without being in an array for singletons, etc).

    PHP5 still has a number of stablity issues. I’ve found that the exception handling system tends to unexpectedly make PHP die at times (such as throwing exceptions from ArrayAccess::offsetUnset(); ).

    I’m hoping for some major changes in future versions of PHP 5.x. Maybe I’m being too optimistic, but unicode support, better stablity possibly and fixing the annoy querks with inheritance and static members/methods etc.

    It seems the hosts are the issue. The big question is what other reasons are hosts not using PHP5

  • http://www.pointbeing.net/ pointbeing

    Big sites _are_ moving: we’re using PHP5 everywhere now – we’ve found no reason not to. We’ve had no trouble at all running 4 and 5 simultaneously (yes, with the same Apache installation) so we’re slowly shoehorning it onto our portal sites. All new apps/code are PHP5 exclusively, making heavy use of the new features.

  • Nico Edtinger

    1) Solaris. I know PHP5 runs stable with Mac OS X and Linux. Many people tested it or have already PHP5 running on their servers. With Solaris we have to do our own tests and you need time to do that.

    2) mmcache. No version of turk mmcache for PHP5 is not ready for production. We’ve services that need a cache. The Zend stuff is to expensive for 20 servers with Solaris and maybe more than one CPU.

  • http://www.phpcomplete.com/ jasonlotito

    Slower upgrades, that’s pretty much it. I have a working PHP 4 system. I want to move to PHP 5, but I am not going to just make the switch overnight without any testing. It will take some time. I am also keen on PHP 5.1, so while I am going to test PHP 5 before that, I probably won’t upgrade until PHP 5.1

  • ambilio

    …PHP 5.1

  • Matt

    WordPress 1.5 should address any PHP5 compatibility issues.

  • Jellybob

    Nothing much.

    I was lucky enough to being going professional at around the same time as the 5.0 release, so I’ve been able to start all new projects under PHP 5, which has been so much smoother to work with than 4 it’s unbelievable.

    I’ve also ported some older 4.x sites to run under 5, with a minimum of changes. Follow the guide and you’ll be fine.

  • php_man

    It seems to me that the main advantages in PHP v5 come from a re-write; given that migration is going to be slow because it takes a while to re-write an app/site (and also takes a while to decide this is necessary).

    I think PHP 5.1, 5.2 etc which might bring more immediate features are more likely to be what pushs PHP 5 adoption.

  • Dr Livingston

    i develop solely for php 5 now and have no intentions of going back to version 4 and because of this I lose work

    but im of the view that what time and effort i invest in php 5 will pay back later once the move to 5 does take place on the grand scale :)

    those still developing php 4 and not making the switch to php 5 even for the purpose of developing their knowledge are going to be stumped as they’ll have little time to play catch up :)

    just how long did it take for the switch for php 3 to 4? well i get the feeling that it’ll take (much) longer simple because php 4 is instilled on more hosts than what php 3 was…

  • http://tijs.org/ Tijs

    I was going to post; because my host does not support it, but they will as soon as red hat adds it to the standard updates. So i’m setting up a php 5 test installation next week so i can start testing new apps on 5. Promise! ;)

  • http://www.functionflow.com Geof Harries

    We can only run PHP 4+ on our web server because of Plesk’s refusal to operate with PHP 5. If Plesk would update to support 5, we’d be on it quite quickly. Again, it comes down to 3rd party support – not as easy and seamless as many people think it should be.

    geof

  • OfficeOfTheLaw

    I would really rather do development in PHP5 than PHP4 myself, especially with a new crop of interns at work and the recent sessions training them to use OOP in PHP.

    However, my boss still insists on relying on the local ISP (expensive) or other hosts rather than just doing a colo, and I am stuck with the old php4/mysql3 these hosts use. :(

    That, and xoops, mambo, and ezPublish all do not run on php5. :(

  • http://www.warpspire.com Brak

    Nothing. I’ve been using PHP5 for months, and went with my host specifically because they supported PHP5.

    PHP5 is awesome, flat out. I don’t know why people aren’t adopting it, it’s far superior.

  • gavin

    A few people from my company recently attended the PHPWest conference in Vancouver. Rasmus gave a talk there and said himself that PHP5 wouldn’t be ready for primetime until 5.1. Shortly put, 5.0 is slow.

  • roty

    I would like to add another vote for Hosts. Recently stumbled onto a webmasters forum. Their main reason for not installing PHP5 seems to be due to all the older apps that need to run on PHP4.

    I suspect Hosting Services wont even install PHP5 onto new servers sue to lack of demand for it.

    Until the major OS PHP projects out there release their latest as PHP 5 only. Probably then there will start to have some demand.

    Not forgetting all those custom built proprietory apps that need PHP4 and register globals ON. Many many sites would go down.

    Until then I am still coding PHP4 but with an eye out for PHP5 compatibility.

    Hope this is not a dumb question, if PHP5 is ran with Register_globals ON would it be compatible with most / more of the OS apps out there? (shows how much I know about PHP5 :p ). Maybe if PHP5 is fully PHP (4.x) backwards compatible the adoption rate would be faster.

  • Itshim

    My main reason for not moving to PHP5 is, of course, my host and clients

  • Keith

    We’ve been using PHP 5 for 4 months now and it has been great. Tooka bit of tweaking to get our custom apps 100% in line with 5 but it was worth the performance and features. We also switched to MySQL 4.1 at the same time. I was almost more excited about the MySQL upgrade than the PHP one. Sub queries and the GIS functions are working quite nice.

  • http://www.technosailor.com Sketch

    As a host, my hands are somewhat tied to the control panel we use. Until PHP 5 is completely stable with cPanel, I can’t even LOOK at going to PHP5. And then at that point, I still can’t make the switch until there’s been a ground-up assessment of how many existing sites will be affected by the switch. Perhaps, the solution will ultimately be a server dedicated to PHP5 and incentives for existing customers to upgrade to that system but that is still a ways down the road and around the bend.

  • Brett Epps

    I’ve been using PHP 5 for so long now that I’ve forgotten what I can’t do in PHP 4. My web host (MediaCatch, http://www.mediacatch.com) set up a special server for those who wanted PHP 5 and MySQL 4.1.x support and I got moved to it about two months ago. I’ve had no problems since, and I even use WordPress (version 1.5-gamma, which is quite stable) with no issues so far.

    I see no reason not to upgrade; the cPanel people are really holding developers back.

  • Greg Beaver

    I’ve been moving some heavy-duty apps to work with PHP4 and PHP5 (phpDocumentor and PEAR) and I have to say it is NOT a simple migration in some cases. PHP5 has broken backwards compatibility in more than the obvious get_class() case-sensitivity issues. php://stdin no longer operates the way it used to, references are a nightmare from purgatory when you try to make them work in php5 – even with non-objects, references stick to the item being modified. I had to rewrite a non-recursive function that used references to avoid the speed/memory inefficiency of recursion in PHP, because the arrays were showing &array() in var_dump meaning that the act of doing

    $a = &$b;

    was changing $b into a reference as well – something PHP4 never did.

    I love working in PHP5, and run it for my blog (serendipity is fully php5/mysqli-ready), but apps that must work in both PHP5 and PHP4 will encounter subtle BC breaks for months to come, I guarantee it.

    Greg

  • http://www.realityedge.com.au mrsmiley

    I have the same issue as Sketch. We run the CPanel control system for our hosting servers, and CPanel bundle 3rd party apps that dont support PHP5. Hence, we cant upgrade to PHP5 until CPanel decide to fully support it, or drop the apps the dont (not likely to happen though). Plesk hosts are in the same boat.

    That said, I am very interested in PHP5, so I’ve managed to get PHP4 and PHP5 running on the same server (running CPanel). Only issue is that PHP5 has to run as a CGI. As soon as I get around to recoding our site, it will be running on PHP5 to take advantage of all the cool new toys available.

  • http://www.jonhehir.com Young Twig

    My host doesn’t offer PHP5. I really want to use it, but I can’t unless I find a new host. :(

  • iansym

    2) mmcache. No version of turk mmcache for PHP5 is not ready for production. We’ve services that need a cache. The Zend stuff is to expensive for 20 servers with Solaris and maybe more than one CPU.

    Use this instead: http://eaccelerator.net

    It’s the continuation of turck-mmcache development and seems to run just fine with my php5 setup

    –roger

  • Louis-Philippe Huberdeau

    I’ve made the transition to PHP 5 at work. The transition to PHP 5 itself is quite easy, the transition away from register_globals was more of a problem. I converted a ~15k lines intranet (with really really bad code at places) in 2.5 days, which is not too bad. It’s really not much of an effort for a single application. I can understand shared hosts to hold back, but they could at least offer it as an option for clients who want it. Clean code always helps transition.

    There are a few problems with PEAR. I actually run in E_ALL | E_STRICT. The problem is that the base PEAR library uses a lot of PHP4 OO functions. basically, replacing is_a() for instanceof solves nearly all problems. Still, I think the PEAR base library should be re-written entirely to use exceptions and new OO features.

    I also had problems with PDFLib, which magically removed functions and made useless parameters required in the way. All error reporting is done with exceptions now, which is nice since they give a nice stack trace with no effort. They also added an OO interface but it looks like the old one with a few names changed and no documentation at all.

    I think the XML extension (DOM, XSL and SimpleXML) alone are worth the transition. Working with XML is a charm. It’s actually better in PHP than in any other language I experienced since PHP won’t bother you with casting DOMNode to DOMElement.

    PDO is very nice too. There are no MySQL 4.1 specific drivers yet but the normal MySQL one does the job, with less optimized statements. Good part is that as soon as a driver exists, it will enable the optimization. PDO is for 5.1, but works well from PECL (use from snaps, bundle on download page is not up to date).

  • http://www.aranworld.com konky2000

    I’m not sure I want to make the switch to PHP5 only to find out 2 days later that there is some massive security problem with the release.

    If you look at the early PHP4 releases, there were often security problems and bugs that weren’t really fixed until the 4.1 generation of releases.

  • http://www.wtcbb.com jamslam

    Well I’ve already started re-writing my message board system (wtcBB), and it is making full use of the wonderful features and power of PHP5.

    I will never go back to developing for PHP4, with PHP5 development flows much faster. With PHP4 I stay away from the OOP because it is not too powerful.

    My host is currently running PHP4, but my dev boxes are all on PHP5. I am just hoping that by the time I’m done rewriting my message board, there will be enough people out there using PHP5 that it will be able to be distributed to a significant amount of people.

    But yea, in the end, my host is stopping me from running PHP5 on my production web sites.

  • shimi

    I tried running the site in PHP5, just to find out that my PHP Accellerator, Turck MMCache, is making it act weird. I did not find any PHP accellerator to run well with PHP5, except for Zend (Isn’t that obvious?), which, in my opinion, sucks. Turck gives much better performance than Zend, and it free. I am proud of running my site on a zero-cost as far as it is concering software, and I’ll not change that for PHP5. I don’t have the hardware to run my site without an accellerator. So, when there’ll be a free, good working PHP accellerator, I’ll definately do the switch, because it seems compatible, and it bundles much more stuff for me (like SQLite…), and has a good future (like PDO…)

    Shimi from http://www.fresh.co.il

    p.s. this website runs a vBulletin with security issues. FYI.

  • MiiJaySung

    For those looking for accelerators, look at eAccelerator, it’s the PHP 5 replacment for Turck MMCache

  • Brian

    We run php5 and have had no troubles at all. For the person who is holding back because of Plesk. Plesk actually has its own version of php and apache it uses so the main system php can be change to 5 with no trouble, we did it on 3 servers and have had no trouble.

  • http://www.plagiarist.com jough

    I suppose I’m waiting for all of the esoteric issues to be hashed-out by braver souls. Plus, I am waiting for CPanel to offer it, not because I use CPanel/WHM to install PHP, but because at that point I’ll know that they’ve worked out compatibility issues themselves.

    It’s always slow-going moving to a new software version if the new version isn’t entirely backwards-compatible with the HUGE base of the previous version. How many billions of lines of php 4 code are out there?

  • http://www.iangordon.us Ian R. Gordon

    Not to mention all those people who are still using PHP3…haha!

  • Julian

    We’re about to move our main server (about 12 corporate sites running on ) over to PHP5. Smarty and ADODB are working great so that’s most of what we need. I think I’ll have to rewrite a little bit of XSL stuff but that’s OK.

    The only thing I’ve really had to do so far is change my internal error handling so it doesn’t use throw() as that’s a keyword now.

  • Karin

    Hosts. Plain and simple. I am fiddling around with PHP5 and will be starting a project in it soon, but I haven’t tried switching fully yet because you can’t run PHP5 / MySQL 4.1 everywhere yet.

  • aplusdesigners

    I am not using PHP5 yet due to the host that I am using has not upgraded nor do they have any near future plans to go to PHP5. I plan to start deving on my home machine within the next 6 months using PHP5 in anticipation of possibly moving to another host.

  • http://www.jpipes.com silent

    New work, sure, work in PHP5 if your biz/clients can support it.

    But, remember, we’re developers. The applications we write are used by business users, not necessarily us, and it’s they who are the key stakeholders. Until a programmer can demonstrate that there are significant advantages that a business user may realize from spending the money and time to port an existing PHP4 application to PHP5, the debate will just be a lot of programmers talking about BC breaks and object reference headaches.

    The people who use these applications we write don’t care one bit about that stuff. All they care is: does it work, does it work fast? If you answer yes to both questions, business stakeholders will generally take the stand of “if it ain’t broke, don’t fix it.” Which means don’t bother “converting” existing applications you wrote for a business if there’s nothing wrong with the application currently.

    New applications, or upgrades to commercial projects like vBulletion, etc, sure. But the vast majority of those “billions of lines of PHP4″ code? What benefit will a business user see from a port?

    I think part of the slowness of PHP5′s adoption can be viewed as a result of the strength, speed, and stability of PHP4. Because it is so fast, and so generally stable, there isn’t as much of a perceived need to move, at least from a stakeholder’s perspective. Contrast that to the difference between ASP and ASP.NET, and you can understand the relatively stronger push for companies to move to .NET!

    All, just IMHO, of course. Cheers.

  • yangshiqi

    coz php5.0 is not mature for production, my company still waits, may be 5.1.x.

    although i am attracted by the new features like oo,exception,simplexml and so on, as many points mentioned here, we have a lot of applications running at php4.3.7/8 and apache 1.3, we do not have so much time to adapt them at all.
    as rasmus said we had to wait till some time, may be at the end of this year or even later. anyway, i think 5.0 is not suitable for enterprise yet.

  • Dorsey

    The points raised by “silent” are really on the mark. Without a compelling financial reason to move to PHP5, it won’t happen. There are plenty of COBOL programs still running huge enterprises for the same reason, and some of that code base is more than 30 years old.

    My host won’t be moving to PHP5 anytime soon because ALL the third party vendors’ products must also be upgraded first (cPanel, et al). That’s not likely to happen without a compelling reason for them to do so, and it’s just not there. By the way, I have the same issues with MySQL versions.

    For me, the tradeoff is also a financial one. Do I bring hosting in-house with all its attendent cost, responsibilies, and problems, simply so I can adopt the latest and greatest, or do I pay a tiny fraction of that for someone else to do it and live with the limitations? It doesn’t take an MBA to figure that one out.

  • http://www.tiffanybbrown.com/ webinista

    WestHost (the host for my sites) offers PHP4 and 5 on their servers.

    I just haven’t upgraded yet because they *just* made PHP5 available, and I have some sites and applications to upgrade/migrate first. Plus I want to be sure that nothing breaks.

  • http://locknet.ro fastwork

    I was lucky cause the company that host my web projects decided to go from the beginning on php 5 (since first php 5 stable).
    They updated the system until 5.0.2, do kno why they didnt move to the 5.0.3.
    MySQL 4.0.23, but they plan to upgrade to 4.1 ASAP.

    I still have cPanel but I don`t use the applications provided there (like phpBB and so on), phpMyAdmin is running (2.6.1) without any problems.

    So, I already made the switch!

  • ubaldo

    My site http://www.loquo.com is suffering a mem leak in php 4.x. (apache max requests per child set to 25, just to give an idea how bad things are, apache processes get to 20 MB very quicly, in a few requests

    I’m going to take the plunge, have no choice since I’ve haven’t been able to figure out the mem leak

    Now, my hesitation is that eAccelerator isn’t all that clear that it’s solid on php5, this other http://pecl.php.net/package/APC isn’t either. Zend costs $995 (can’t afford that) I’m relying on mm turck with my 4.x but turck has been discontinued.

    Not a pretty sight. I think I’m the only unlucky being that has this ridiculous mem leak in php 4.x (not many people seem to have that problem)

  • Nico Edtinger

    For you who said we could use eAccelerator instead of mmcache. The homepage of ea doesn’t mention Solaris at all. So we’d have to make a test phase and stuff. That takes time. That’s why we haven’t switch yet.

    In a business enviroment you can’t just throw something at a problem and hope it fixes it. You need someone how can say it works or you need to test it yourself and the time to test.

    b4n

  • http://www.lastcraft.com/ lastcraft

    Hi.

    Three reasons:
    1) Fatal errors are completely unrecoverable in PHP5. In PHP4 there is a cheap trick to get around this which is essential for messaging applications.
    2) Installing PHP5 with XML support, etc. is nearly impossible on older Linux boxes: e.g Mandrake 8.1, RedHat 7.3 and if we cannot install it, we cannot use it. We won’t touch it until it has RPMs for the major distros becuase we use these as templates for our own RPMs.
    3) Zend have change the licensing on their performance tools. They are now a complete rip off.

    yours, Marcus

  • Dr Livingston

    3),

    Well I agree with you on the point of Zends products being over priced :(

    I need to upgrade my licence to encode my scripts for version 5 php and basically it’ll break me short term to do so.

    ‘Bout time Zend took a serious look at their product priceing policy as they’re just shooting themselves in the foot imo.

    As for hosting this is a short term problem which will be resolved soon though you can expect to have to pay a premium I’d think for the privelege of version 5 hosting initially?

  • Brandon

    Being a new host, it wasn’t too hard for me to switch to PHP5. Actually, I was very pleased with the results. I have had not one problem reported by any clients yet. VBulletin is working great on it, and so is PHPBB; the same goes for WHM Autopilot. Cerberus Helpdesk does not work so great on it, but they have a version in CVS that does support PHP5, so I got that, and it works great.

    Personally I don’t see the point with staying with PHP4 much longer. For me, I thought it’d be better just to upgrade now, before I have many clients, to avoid more trouble with incompatibility.

    The option for PHP5 is in WHM, and it works perfectly. CPanel stays at 4.3.10, however, but that is ok.

    I’m not doing projects in PHP5 yet, though I do develop them in a PHP5 environment (I have PHP5 on my computer). I try to make them work on PHP4 and also be compatible with PHP5 (as long as E_STRICT is not on).

  • Derek Martin

    Markus said “I don’t understand why so many people are so afraid of new versions… If you don’t at least try the stuff, you’ll never know if it will work for you”

    DUDE! We have a responsibility to our clients (be they bosses, departments, or customers) NOT to TRY something to see if it works. They want stability, and couldn’t care less what version of a language their app is written in. If the app is up and working, you do not change the underlying engine.

    As for myself, I won’t switch to PHP5 yet ONLY because I have 6 domains hosted at the same place, and it doesn’t yet offer PHP5, and I don’t want to move all those domains. Unfortunately I know the owner of the hosting company and he’s not planning on PHP5ing any time soon (because he is accountable to his clients) :(

  • http://www.primacognos.com bigduke

    Maybe its time I tried PHP5 but not for pro development purposes since none of the target machines I’ve deployed applications on so far have had php5 on them.
    So far I’ve refrained from touching it because of this very reason. No point developing something only to realize that certain features aren’t really backward compatible and then having to change stuff ™ OR finding a bug in the recent version not found on the older ones.

    P.S. its hard to plan out everything when you work alone and the end-clients want everything done PHAST.

  • synergystudio

    1, My Hosts
    I’m running a web design business and host my clients sites through a reseller service. At the moment my Hosts run on PHP 4.3.10
    I think a majority of hosts will probably stay with the 4x releases until 5 is a little more established. Their best policy may be to offer both (if not both on one account then the option of either or) for a while.

    2, Backwards compatibility
    It strikes me that it would have made sense to release it with a backward compatible mode of some description. That would solve a lot of fears and problems.

  • http://www.ad-rotator.com/?spf Son Nguyen

    One of our servers kernel is 2.4.18, which is too old to upgrade only PHP, a server reload would help but it’s a complex system to mess around with. But it’s only time before PHP5 takes over (don’t be like the Apache 2.x)

  • Yuri van der Meer

    I use PHP to develop some small-scale sites. I’ve been trying to switch my development environment from Windows running PHP4, to Linux with PHP4 and PHP5 running in parallel so I could experiment with PHP5 while I could keep working on sites that will be deployed on PHP4. Unfortunately, installing PHP5 alone on Fedora Core proved to be a nearly impossible task (due to package dependency issues), let alone running PHP4 and PHP5 together, so I stayed on Windows.

    Recently however, I gave it another try with Ubuntu Linux. There, it was actually quite easy to set up PHP5 without having to compile anything myself (http://people.debian.org/~dexter/dists/php5/sid/binary-i386/).

    With a few small changes in my code, I got all my PHP4 code to work under PHP5. So, currently I develop on PHP5 (+ MySQL 4.1), then test on subdomain of the PHP4 (+ MySQL 4.0) production server and when everything still works, transfer it to the main domain. Not only do I now have a development environment where I can start to learn PHP5, but I know that all my PHP4 sites will also run on PHP5 with no modifications. This approach may not work for everyone, but I’m pretty happy working this way so far.

  • Anonymous

    You say PHP5 is stable? Yeah right. My provider switched to PHP5 a few days ago (without warning) and took down 5 of my sites at once – because of “minor incompatibilities”. Not to even mention major ones that I still can’t debug – some weird memory corruption problem going on in my CMS that crippled the asite administration. Today they switched back to PHP4 under pressure from me and other users – and I’m glad they did otherwise I’d be looking for other, more responsible hosting company otherwise (I might do that anyway – they should always let us know before such drastic changes).

    Do I want PHP5? Yes, but only as an option. Until the bugs are fixed I don’t want to be forced to run it. PHP4 has all the things I need and it works much better than PHP5 (IMHO).

    Andrew

  • jimdaddy

    THe last comment doesnt make much sense. The fact that your PHP applications broke with PHP 5 upgrade was because they are using depreciated commands. This is the applications fault. And Im sure all these applications have new versions out which support PHP5. I am creating a new version of a very popular open source project which is written specifically for PHP 5.1 mainly because there are so many advantages brought around in this release.

  • arenasa

    For me. mssql support for linux. I have IIS6 + PHP + MSSQL working fine. But if i want to deploy in linux (Which I prefer) FC4+PHP5+ ??? .. no MSSQL support yet.

  • Gubatron

    Nothing is stopping me, not even our sysadmin who I finally had install PHP5 for our upcoming Magnet Links website. Soon you’ll be able to try it out for yourself.

    I just believe the PHP community should support Php5 more, it’s amazing the kind of things you can build with this more complete Object Oriented support in PHP5.

    I recently used abstract classes to build a caching engine for our site, in the past we would’ve done a trillion hacks with function callbacks to do this kind of things, now we just implement one abstract caching method on whatever element of our pages we need to have cached.

    We now rely on our try/catch, and it’s a lot easier to track and fix errors. By being forced to use encapsulation properly, our get/set methods help us eliminate chances for data corruption and inconsistencies on the state of our objects, it’s just awesome, I wish more people were using php5.

  • vwiley1

    There is several hosts who provide both PHP4 and PHP5. This configuration gives you great flexibility, because you can choose which files and directories are processed by what version of PHP. This is all done by adding a line or 2 to your .htaccess.

    Here are a few that do it this way:
    PHP5 Web Hosting at HostRefugee
    PHP5 at WebOnce

  • didimo

    I did move to PHP5.1.2 across all my dedicated servers (also upgraded to apache2 and MySQL 5.0.18)

    to great results! coupled with PDO and custom Object caching class the performance is ver very fast

    it saved me moving one of my largest sites from one dedicated server onto a cluster, the same server performs the job of a 2-3 servers runnign older PHP4 mysql4!!!

    viva la revolution :)

  • Handydude

    If any of you are looking for a host that has php5 and php4 installed, check out http://adventonegraphics.com He doesn’t advertise hosting on his site but if you click the contact button you can email him and get prices for webhosting.

  • Sinner at the Apple Core

    My current employer, a company that runs large portal sites for large cable companies, is still running PHP4. Personally, I am very disappointed that this is the case. The main concern is that moving to PHP5 will break the code in a non-obvious way, and “They” (meaning the management) do not want to put in the time necessary to QA the whole system.

    Also, the people in charge of our servers seem unwilling to compile the new version of PHP and put it on our servers. Why that is I cannot say. All I know is when asked about a new server, the stock reply is “six months, millions of dollars”. But that’s a whole OTHER story – along with some of the PHP3 code still sitting around.

    Even though the end of like announcement for PHP4 has been released, I am extremely skeptical at the prospect of upgrading.