About PHP usage

The question of who is using PHP has been asked many times. We all know PHP users include everyone from Britney Spears to the UK Labour Party’s Big Conversation. In fact Dream Lab Canada maintains a directory of PHP Powered Sites broken down by industry sector.

For me what’s more interesting, right now, is looking at where PHP is being used; where is it being deployed (Internet vs. Intranet / Extranet), what problems are people solving with PHP, what design decisions come into play when building a online gallery vs. a groupware tool, how do requirements influence CMS design when comparing an online magazine vs. a corporate Intranet, etc. etc.?

There have been surveys of PHP’s use in the past, such as this one from Zend and another from Interakt but neither, from my point of view, explored these type of questions.

There are two things nagging me, which is what’s prompting this stream of thought. First I have a hunch there are whole PHP “user groups” not being addressed or being heard from, largely swallowed by “mainstream” PHP users (those building either personal sites on small online ventures). The second nag is there’s PHP functionality which seems to be being under utilized, most notably the COM extension, which may in some cases also equate to software with a commercial value (as in someone willing to pay for it).

On the Internet, there’s little in depth discussion of how employ PHP on high traffic sites. Sure this is a small user group but it’s also high profile. The best discussion I’ve seen, so far, is George Schlossnagle’s Advanced PHP Programming (it’s an excellent read – will post a longer blog on it in the near future) but other than that, it’s hard to get a clear picture of what constitutes sensible technology decisions when running a high traffic site. There experience is “out there” – Sitepoint itself is an example, ranking in the top 1500 sites, by traffic. The problem there seems to be getting developers to share their experience.

Another (guess) big user group which is largely ignored is those employing PHP on corporate Intranets / Extranets (that includes me so I’ve got opinions). I would hazard a guess that of the top 1000 companies in the world, 80%+ have PHP in action somewhere (although probably also unaware of the fact at a managerial level).

This group faces an entirely different set of problems – performance is often less important, traffic being relatively low. Being able to integrate PHP with a whole range of “back office” systems as well as desktop applications is the biggest issue for this group, integration with Windows being the #1 problem.

It’s typically not acceptable to implement a standard, data driven CMS, for example, users demanding the ability to publish Word documents on the Intranet while also wanting to avoid having to maintain multiple versions of the same document (one on the web server and another on the workgroup server). Users may also demand being able to login with the same username / password as their NT workstation.

There’s likely a whole range of uses that PHP gets applied to in this “segment”, such as sysadmin tools, online reports (data extracted from company databases), publishing company documents, broadcasting internal news, as the front end to CRM systems, online groupware tools, system interop with PHP as “middle man” (e.g. XML-RPC / SOAP) and lots more. At the same time, finding Open Source tools written in PHP to help integrate with existing corporate systems can be tricky – you’ll find few, if any, examples of these types of application on sites like Hotscripts.

COM in particular get’s little attention in mainstream PHP circles but has alot to offer for Intranets / Extranets. Unfortunately, if you’re looking for a way to help users publish Word documents, wvWare is probably a better place to start looking today or alternatively require users save as HTML then strip out what you need with PHP. That PHP <> Windows (in fact applications running on Windows) integration doesn’t seem to be well charted could be for a number of reasons, from PHP being a fundamentally bad choice to lack of developers with experience of both PHP and common Windows APIs. At the same time strikes me there’s be a huge (even commercial) demand for tools able to put Outlook email online (it’s do-able: certainly with Python and PHP’s COM support isn’t such a far cry from Python’s and getting better with PHP5 thanks to Wez).

Anyway – starting to ramble and have committed the sin of starting a discussion without reaching a conclusion. Anyone got any stories of other, less talked about, uses of PHP?

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.

  • Markus Wolff

    I got even two comments :-)
    1.
    I don’t think 80% of TOP1000 companies is too ambitious.
    Sometimes PHP is just used by small workgroups or in extranets without anyone noticing, for example forum applications for group-based discussions. I’ve seen this quite often. Just because they use it it doesn’t mean it’s always business-critical. That would indeed be a bit ambitious :-)

    2. I don’t know why everyone seeems to have such difficulties integrating with Microsoft Office. Just look at how the native Windows applications are handling this: They’re using COM. So can PHP, if you use it on a Windows server. You have exactly the same possibilities using PHP on a Windows machine as you’d have using ASP or even ASP.NET (been there, done that).

    Also, you can have a look at PEAR – not only do they have the Excel file generation package, there’s also a package that deals with OLE in general. And there’s far more that can be done for example with the WebDAV and SOAP packages… use your imagination, folks ;-)

  • Taoism

    I know this is specific to phpBB (but hey, it is written in PHP); have a look at the link below for a thread about configuring phpBB (and hardware, etc) for a high volume site. The thread start (Lanzer) is a who you really want to read for most of the thread. His insights into optimizations for the volume of his website is interesting. The sheer volume that his site gets absolutely stuns me. I have never seen any site that even comes close to it (for a message forum).

    Check out this quote from one of the posts in the ongoing thread:
    “…we receive about 700,000 posts a day…”

    Real stats from the board on his site [GaiaOnline]:
    “Who is Online – In total there are 10181 users online :: 8161 Registered, 539 Hidden and 1481 Guests”
    “We have 606247 registered users”
    “Our forums have a total of 69395290 articles”

    I also remember reading that some of the threads are over 70,000 posts long…

    So read this thread for a very interesting perspective on tuning for a large site:
    http://www.phpbb.com/phpBB/viewtopic.php?t=135383

    Cheers,
    Keith.

  • hanumani

    At our company (http://e11online.com) we use PHP for our help desk / CRM software. We integrate with LDAP, NT User authentication, multiple databases, and we are working on a .NET based windows GUI to talk to an XML service layer. We sell our product to major domain name registrars, software companys and universities to name a few client types handling large databases. It’s going pretty well, and while a discussion came up recently to use J2EE for the next version, we decided that the ease of customizing our application for client’s specific business processes was more important than a standardized framework, so we’re sticking with PHP.

  • http://www.phppatterns.com HarryF

    From reading the fascinating comments makes me wish there was a better “forum” for this discussion.

  • http://www.phppatterns.com HarryF

    [QUOTE=Anonymous]Here are some more maps of PHP Usage, posted once a month.
    They are in French, but maps are… graphical, aren’t they?

    By country (based on domain and geolocalization)
    http://www.nexen.net/phpversion/tld.php

    By version
    http://www.nexen.net/phpversion/versions.php

    My session from PIC frankfurt (in English, November 2003).
    http://www.phpconference.de/2003/slides/business_track/seguy_usagephp_en.pdf

    By Server (outdated)
    http://www.nexen.net/phpversion/serveurs.php[/QUOTE]

    Interesting stats. Of course these only target web servers which are exposed to the Internet. That “Intranet” user group wouldn’t show up. Would be interesting sometime to see the download stats from php.net – again wouldn’t show it all – PHP is distributed by many chanels – but would be another interesting reflection on it’s use.

  • http://www.phppatterns.com HarryF

    [QUOTE=Anonymous]PHP + GD is the best solution for porn galleries and this is where I see PHP most.[/QUOTE]

    John Lim points out similar here: http://php.weblogs.com/discuss/msgReader$3506.

  • http://www.phppatterns.com HarryF

    I don’t think 80% of TOP1000 companies is too ambitious.
    Sometimes PHP is just used by small workgroups or in extranets without anyone noticing, for example forum applications for group-based discussions. I’ve seen this quite often. Just because they use it it doesn’t mean it’s always business-critical. That would indeed be a bit ambitious :-)

    Have had the same experience. Have seen alot projects like eZ publish and PHP Nuke used to help workgroups put their documentation online, and such like. PHP (+ apps written in PHP) being free seems to be the main reason.

  • Ward Germonpr

    I experimented with DCOM/php a lot. It is deadslow, and terminating Word or Excel after the transfer often didn’t happen, forcing the user to kill the process manually. You also have to setup dcom on all clients, which is a pain in a multisubnet company. Then I moved to streaming RTF for Word documents, copypasting from notepad straight into the phpscript and filling out the blanks with echoes, which is adequate up to the point where you generate tables of variable length. Eventually I discovered this guys’ scripts, http://www.paggard.com , he has nice solutions both for Word and Excel exports, not free but almost as good as, and a lot cheaper than trawling the net in search for vanilla solutions. That said, I wish the Zend people spent a little more time on windows lovin’ than OO. OO may be nice for people contributing to PEAR et al, but for guys like me who extract data from a number of db’s, mix it seriously and then display it on one html page, with an excel or word export as important option, I don’t get OO.
    Integrating with office is certainly something they should ‘ve spent more time on.

  • Donavan McDonough

    It is interesting to see that PHP can write to Excel Spreadsheets. Did not know about this particular feature of PHP.

    This further complicates the spreadsheet risk issue, see http://blogs.ittoolbox.com/bi/spreadsheet/archives/000613.asp

  • Damien Seguy

    Here are some more maps of PHP Usage, posted once a month.
    They are in French, but maps are… graphical, aren’t they?

    By country (based on domain and geolocalization)
    http://www.nexen.net/phpversion/tld.php

    By version
    http://www.nexen.net/phpversion/versions.php

    My session from PIC frankfurt (in English, November 2003).
    http://www.phpconference.de/2003/slides/business_track/seguy_usagephp_en.pdf

    By Server (outdated)
    http://www.nexen.net/phpversion/serveurs.php

  • Matt

    Where I work, we integrated PHP with Crystal Reports and MS SQL Server for the Asset Management field… it was very much a kludge, as Crystal Reports only exposed a .asp API, so we ended up somewhat mixing the two. That was for an intranet situation.

  • Jazeps

    PHP + GD is the best solution for porn galleries and this is where I see PHP most.

  • http://www.yvandermeer.net Aquarius

    A couple of months ago, people at my daytime job were talking about replacing an old database program with Access. We use the database to keep track of projects we do for clients and the PowerPoint presentations that are produced for them. I said I could try to do it in MySQL and build a PHP-driven front end so all employees would be able to access the application through the local intranet.

    I

  • Oliver Dueck

    My organization has build several fairly complex PHP applications which receive relatiely low traffic. We may be building a site that will be extremely busy, and I would be most comfortable doing it in PHP. However, as you pointed out, there are not many resources available to help those of us building high-traffic applications. This is odd because there obviously are many high traffic PHP sites out there. I think this would be a great topic for SitePoint to tackle, as the site builders obviously have the relevant experience.

  • http://boyohazard.net Octal

    Interesting discussion. I have switched the corporate Intranet at work to use php rather than asp. However as Harry pointed out the problems inherent in integrating with Windows technology especially in terms of publishing Word documents to the Intranet (and the nightmare of managing those documents) is complex to say the least.

    With regards to the topic of this blog post is there any evidence that PHP for corporate Intranets/extranets is being replaced in favour of .Net? (For reasons stated above; “integration with Windows”)

  • Manuzhai

    I think 80+% of top 1000 companies is *VERY* ambitious. I think you’re overestimating because you live in a PHP world. I’m not blaming you, I just think your frame of reference results in a bias.

  • rick_g22

    I’ve been developing a multi-tier intranet site with PHP under Apache2/Win (it also works under linux). It generates formatted excel spreadsheets, and along with an automated C++ program for file management. The program uploads Visual Foxpro files (DBF) and the PHP converts them to mysql. That’s a rather nifty integration, IMHO.