Solved: Diskstation PHP 7.0 Does not Know Any Extensions

With DSM 6.1, PHP 7.0 can be installed. Great, because it is faster than 5.6 and hopefully has less vulnerabilities.
Unfortunately, PHP 7.0 does not know any extensions at first.

To solve this for web sites, you need to look at two files:
  1. /volume1/@appstore/PHP5.6/misc/extension_list.json
  2. /volume1/@appstore/PHP7.0/misc/extension_list.json
Any extensions you are missing in PHP 7.0, just copy from the first file to the second.

Finally, enable the added extensions in Web Station:

To enable extension for command line PHP, you need some extra work:

  • Look at this directory: /usr/local/etc/php56/conf.d/ Here you will find a few .ini files that enable certain extensions. For my purposes I used  webstation-extensions.ini, which contains the extensions we activated above. Copy them.
  • Create a new file /usr/local/etc/php70/conf.d/user.ini and paste the copied extensions there.

Now you have the extensions also availble in command line (CLI) mode.

I needed the latter to get ownCloud's occ program to run under PHP 7.

No comments:

adaxas Web Directory