PHP 7 Is Here And ownCloud Is Ready

php7-transparentToday is a big day for the web: the programming language which powers most websites on the internet has released a major new version. ownCloud has been working for months to be ready for this new release as it delivers many benefits to users, not the least of which is vastly improved performance. It is out now, and ownCloud Server 8.2 is ready for it. Read on to learn about PHP 7, ownCloud and why you should give them a test run!

ownCloud Server

ownCloud is what you use to get control back over your data. It is a powerful but easy to use web server which can host your files (or access them if you have them in other places, like a FTP server or Dropbox), protect them with powerful encryption and can be extended easily through apps to take care of your notes, calendar, contacts, mail and much more. It allows you to share and collaborate with others both using accounts on your ownCloud and through anonymous share links. It is open source, built on PHP/Javascript/CSS, and awesome!

PHP 7

The current stable PHP release series started its life more than ten years ago on the 13th of July 2004. This release brought the brand new Zend Engine II which gave a large performance boost, as well as completely revamped XML support and extensions for MySQL and SQLite. In the subsequent years, PHP releases brought many new features and performance improvements, with the latest 5.6 release having integrated caching and capabilities PHP 5.0 could only dream off.

Despite the big steps, even bigger progress was waiting. After work on a PHP 6 got ‘stuck’, arguably due to ambitions and emotions both running a little higher than healthy, much of the ideas for 6 were rescued, sanitized and reworked to be part of what was to become PHP 7.

Over the last year we’ve seen increasingly impressive performance tests being published about PHP 7. In particular, a competition arose between its development team and the folks at Facebook, developing the HipHop Virtual Machine, which uses Just-In-Time (JIT) compilation to convert PHP code into machine language for better performance.

Fascinatingly, PHP 7 has shown to be on par with HHVM without using JIT compilation itself, although many changes were made to improve the suitability of PHP for such a compiler. This thus promises even better performance the coming years, as JIT techniques are implemented in the Zend Engine powering PHP.

Here’s a short list of improvements PHP 7 brings over its immediate predecessor:

  • Improved performance: PHP 7 is up to twice as fast as PHP 5.6
  • Consistent 64-bit support
  • Many fatal errors are now Exceptions
  • Removal of old and unsupported SAPIs and extensions
  • The null coalescing operator (??)
  • Combined comparison Operator (<=>)
  • Return Type Declarations
  • Scalar Type Declarations
  • Anonymous Classes

PHP 7 and ownCloud

That ‘up to twice as fast as PHP 5.6‘ is no joke. Our engineers have run performance tests and the results are amazing. Taking the latest major ownCloud Server, version 8.2.0, and comparing the metrics for a series of common ownCloud operations, shows improvements ranging from 20% faster to five-folding execution speed, exceeding the twice-as-fast mark more than once.

ownCloud performance comparison between PHP 5.6 and 7
ownCloud performance comparison between PHP 5.6 and 7

You can imagine we’re quite stoked about this new PHP release and we urge you to give it a run for its money: besides the fact that it is free (talk about price/performance ratio there!), you’ll love its snappy response. Imagine: your ownCloud gives you access to your own data – faster than ever! You can share your files with twice as many people, have twice as many users, or use half the amount of power it used to! Now THAT is taking control back over your data – FAST.

Time to check it out. Start by getting ownCloud Server 8.2, then grab the latest PHP packages from your Linux Distribution and see how things run!

EDIT: For now, not all ownCloud apps work perfectly with PHP 7. Notable are the Calendar and Contacts app which sometimes show issues.

28 Responses to “PHP 7 Is Here And ownCloud Is Ready”

  1. robert

    Now that PHP 7 has 64 bit support on windows as well, will Owncloud reconsider supporting it?

  2. Seextra

    I just install the PHP7 and found some good practices that it is very fast. Love to work with. Is it good way to update it PHP5 to PHP7
    And by the way where is PHP6 ?

  3. Waitman Gobble

    This needs to be updated.

    file: lib/private/util.php

    if(version_compare(phpversion(), ‘5.6.0’, ‘>=’) &&
    !self::runningOnHhvm() &&
    \OC::$server->getIniWrapper()->getNumeric(‘always_populate_raw_post_data’) !== -1) {
    $errors[] = array(
    ‘error’ => $l->t(‘PHP is configured to populate raw post data. Since PHP 5.6 this will lead to PHP throwing notices for perfectly valid code.’),
    ‘hint’ => $l->t(‘To fix this issue set always_populate_raw_post_data to -1 in your php.ini’)
    );
    }

    http://php.net/manual/en/ini.core.php

    “always_populate_raw_post_data Removed in PHP 7.0.0.”

    • Waitman Gobble

      Oops, my mistake. Apparently ‘owncloud-latest.tar.bz2’ is actually very old version.. I didn’t realize that googling for ‘updating owncloud’ actually takes me to a very old page. 🙁

      • Chris

        Hi,

        you also shouldn’t report such things at the blog. The bugtracker better fits here 🙂

  4. Bernd Wurst

    I’d like to comment (for future visitors) that CalDAV is NOT READY for PHP 7. When using PHP 7, I get some errors in log and an empty calendar on my phone. Downgrade to PHP 5.6 fixes this.

    It’s really sad that calendar and contacts aren’t core features any more. The PHP7 readiness statement shouldn’t be published when this feature is still broken just because you renamed it a third party feature. :/

    • Chris

      Hi,

      i think this blogposts clearly says “ownCloud” is ready for PHP 7 and not “all ownCloud apps” are ready 🙂

      Btw. have you reported this issues to the issue tracker of the apps so the app developers/maintainer can have a look?

      • Klaus

        On this site in Big Words OC says:

        ownCloud Server
        ownCloud is what you use to get control back over your data. It is a powerful but easy to use web server which can host your files (or access them if you have them in other places, like a FTP server or Dropbox), protect them with powerful encryption and can be extended easily through apps to take care of your notes, calendar, contacts, mail and much more. It allows you to share and collaborate with others both using accounts on your ownCloud and through anonymous share links. It is open source, built on PHP/Javascript/CSS, and awesome!

        PHP 7
        The current stable PHP release series started its life more than ten years ago on the 13th of July 2004. This release brought the brand new Zend Engine II which gave a large performance boost, as well as completely revamped XML support and extensions for MySQL and SQLite. In the subsequent years, PHP releases brought many new features and performance improvements, with the latest 5.6 release having integrated caching and capabilities PHP 5.0 could only dream off.

        So please change that information.
        You cannot tell us of Owncloud an Calendarapps in one way and about the compatibility of PHP 7 without the information, that calendar will not work with php 7.
        Btw: OwnCloud is a very interesting product. But I do not understand how developers always want to explain that Calendar Adressbook will not be OwnCloud Basic Apps but additional apps.
        What shall I do without these Apps: Filesharing for files without Pictures / Fotos because the gallery will be an additional app to.
        Sorry – I think a little bi more clear information will provide less irritation at the users.

        • Jos

          Hey,

          I added a note that PHP 7 doesn’t work yet with all ownCloud apps.

          About your point with regards to Calendar and Addressbook being core parts of ownCloud: this is a matter of expectations. We have four types of apps: Core, Official, Approved and Experimental. Core means part of ownCloud core, like sharing, gallery, external storage, encryption etc. Official are apps which are quite well maintained and important for ownCloud. Approved means they won’t immediately eat your data, we have made sure there are no security problems and we know the maintainers. Experimental = the rest.

          Calendar and Contacts are a bit of an issue as, right now, they are not super well maintained and we probably should downgrade them to Approved. If they were core parts of ownCloud users would expect that they get the same attention as ownCloud core. But these apps are developed mostly by students in their free time and thus are not as stable, don’t scale to large instances and don’t get such swift attention to bugreports as the core of ownCloud which is maintained by people who are paid full-time by customers. If a company (or more than one) steps up to pay ownCloud, Inc. for maintenance of the calendar/contact, or if a company starts to maintain it at enterprise quality level, or if more people would step up to help maintain the apps they could perhaps be part of core. This goes for all apps: if they are well maintained for a long time by reliable people, they are ‘official’. If they are not, you or others can help make them that way by helping out.

          Note that for ownCloud 9 we’re working on integrating the core of calendar and contacts deeper into ownCloud core: the gui will still be in a separate app but handling of calendar and contact storage and syncing will be in core. This means they will fall under the support and maintenance quality standards from ownCloud, Inc. which should help increase their reliability. But this isn’t released yet so plans might change, and the gui of the apps needs a full rewrite (which is underway).

          In any case. If you feel our communication is wrong, I would love suggestions on how to improve! Perhaps I can add an item to the faq on https://owncloud.org/faq ? Or something else?

          • Chris

            Hey Jos,

            thanks for this nice write-up. The part of calendar and contacts could be really included into the FAQ as users are often not aware of this. Had read a lot of user statements like “calendar and contacts needs to be part of ownCloud” in the past.

          • Jos

            Chris,

            Thanks.

            I can write something up for the FAQ, indeed. Let me see. We did write blogs like https://owncloud.org/blog/app-store-changes-in-owncloud-8-1/ and it is in the documentation, of course…

            I also do have a blog planned about the WebDAV work which will touch on this but that will take me some time, it is a big piece of work.

          • Chris

            Now there:

            https://owncloud.org/faq/#calendarcontacts

            Thanks Jos for writing this up.

    • carlitoco

      Do you have an idea how long it will takes until caldav works? carddav-sync-free app for android works well…

  5. Akhénaton

    Users of Linux repositories packages still can’t upgrade to PHP7 because of ownCloud PHP5 dependencies…

    ~$ apt-cache depends owncloud-server
    owncloud-server
    Dépend: php5
    |Dépend: php5-mysqlnd
    Dépend: php5-mysql
    Dépend: php5-sqlite
    Dépend: php5-pgsql
    Dépend: php5-common
    Dépend: php5-gd
    Dépend: php-xml-parser
    Dépend: php5-intl
    Dépend: php5-mcrypt
    Dépend: php5-curl
    Dépend: php5-json
    Dépend: php5-ldap
    Dépend: php5-cli

  6. Matt McGraw

    Congrats to the team and thanks for all of your hard work! Looking forward to upgrading my server os and my ownCloud instance!

    Hope to see you at SCaLE14x!

    Matt

  7. Phil

    Is there any plan to provide re-built VM appliance images for ownCloud 8.2 with PHP7?
    Or will that come with the 9.0 release? Or?

  8. Pegasuz

    I am using the ubuntu 14.04 package on my server and would like to upgrade to php7 (currently using php5.6 mod_apache).
    The owncloud-server package however depends on php5.
    So I cannot upgrade to php7?

  9. Daniel Hansson

    13 July 2014 isn’t ten years ago, or am I understanding this the wrong way?

    • Lukas Reschke

      Oops, that should be 2004. I’m sure Jos will fix this later 🙂

Comments are closed.