PHP intl Modul / PHP Extension in macOS High Sierra 10.13 aktivieren (run ownCloud Server 10.3.2 at macOS Server 5.6.3)

Hello OC Community.

Software:
macOS 10.13.6 (High Sierra)
macOS Server 5.6.3
OwnCloud Server 10.3.2
PHP Version 7.1.32 (built-in High Sierra)
apache 2.0 (built-in High Sierra)

Target:
Get OwnCloud Server running on macOS Server.

Setup:
macOS server is running and the service website is active. PHP is selected and active.
ownCloud Server is configured under the Service Websites and is accessible.

Problem:
PHP module intl not installed.
Please contact your server administrator and ask for the module to be installed.

PHP modules have been installed but are still listed as missing?
Please contact your server administrator and ask to restart the web server.

Research:
I read on the internet that the PHP intl module is already on board with macOS High Sierra.
** So the question arises, how can I activate or update the PHP intl module ** without using Homebrew’s solutions. Homebrew then requires you to deactivate the built-in apache2 server from High Sierra and that will probably cause problems with the macOS server app.

PHP version test:
To make sure that the PHP version of the macOS Server app is the same as the Terminal Command ** php -v ** shows me, I created the website “phpversion.mac” with macOS Server and ran the following index.php over it.

** <? Php **
** echo “Hello From Sites Folder!”; **
** phpinfo (); **
**> **

As a result it turned out that the PHP version is identical in each case.
** php version ** 7.1.32
** php extension version ** 7.1.32
Accordingly, the macOS server app should access the macOS system PHP by default and not work with its own PHP version. This is not the case with homebrew and here the built-in PHP and the built-in apache must be deactivated or edited.

Precisely because I use macOS Server and its services, I want to avoid potential problems and don’t wanna go with homebrew solutions.

My wish:

  1. Activate PHP intl module (built-in) under macOS High Sierra
  2. Operate ownCloud Server 10.3.2 under macOS Server 5.6.3
  3. Keep PHP and PHP intl Module Extension up to date without macOS server causing problems. (without having to rely on homebrew)

Note:
I am not an IT expert or developer, just a simple user.
If I am wrong in any way, I apologise and pleas report it.
Thank you very much and hopefully I can be helped.

------------------------------------------------------------------------------------------------------------------------------
– DEUTSCH –

Hallo OC Gemeinde.

Software:
macOS 10.13.6 (High Sierra)
macOS Server 5.6.3
OwnCloud Server 10.3.2
PHP Version 7.1.32 (built-in High Sierra)
apache 2.0 (built-in High Sierra)

Ziel:
OwnCloud Server auf macOS Server zum laufen zu bekommen.

Setup:
macOS Server läuft und der Service Websites ist aktiv. PHP ist ausgewählt und aktiv.
ownCloud Server ist unter dem Service Websites konfiguriert und ist erreichbar.

Problem:
PHP-Modul intl nicht installiert.
Bitte kontaktieren Sie Ihren Server-Administrator und bitten Sie um die Installation des Moduls.

PHP-Module wurden installiert, werden aber als noch fehlend gelistet?
Bitte kontaktieren Sie Ihren Server-Administrator und bitten Sie um den Neustart des Webservers.

Research:
Ich habe im Netz gelesen, dass das PHP intl Modul bereits bei macOS High Sierra mit an board ist.
Also stellt sich mir die Frage, wie kann ich das PHP intl Modul aktivieren oder updaten ohne dabei auf die Lösungen von Homebrew zurückzugreifen. Homebrew erfordert nämlich dann auch den built-in apache2 Server von High Sierra zu deaktivieren und das gibt bestimmt Probleme mit der macOS Server App.

PHP Version Test:
Um sicher zu stellen, dass die PHP Version der macOS Server App die gleiche ist die mir das Terminal Command php -v anzeigt, habe ich die Website “phpversion.mac” mit macOS Server erstellt und folgende index.php darüber laufen.

<?php
echo “Hello From Sites Folder!”;
phpinfo();
?>

Als Ergebnis hat sich herausgestellt, dass jeweils die PHP Version identisch ist.
php Version 7.1.32
php extension version 7.1.32
Demnach sollte die macOS Server App standardmäßig auf die macOS System PHP zugreifen und nicht mit einer eigenen PHP Version arbeiten. Bei Homebrew ist das genau nicht der Fall und hier muss die built-in PHP sowie der built-in apache deaktiviert bzw. bearbeitet werden.

Gerade weil ich macOS Server und dessen Services verwende will ich potentielle Probleme vermeiden und auf Homebrew Lösungen verzichten.

Mein Wunsch:

  1. PHP intl Module (built-in) unter macOS High Sierra aktivieren
  2. ownCloud Server 10.3.2 unter macOS Server 5.6.3 betreiben
  3. PHP und PHP intl Module Extension up to date halten ohne dass macOS Server Probleme macht. (also ohne auf Homebrew angewiesen zu sein)

Hinweis:
Ich bin kein IT-Experte oder Entwickler, lediglich einfacher Anwender.
Sollte ich in irgendeiner Weise irren und falsch liegen, bitte ich um Entschuldigung und um Mitteilung.
Herzlichen Dank und hoffentlich kann mir geholfen werden.

Hey,

have you tried to check the phpinfo() output to see if that intl extension is correctly loaded? I think this isn’t the case so this could be the reason why ownCloud complains that the extension isn’t loaded.

If the extension isn’t loaded maybe you can have a look at a tutorial for PHP on macOS to see how the module could be loaded on this environment?

I think you should also be aware that macOS isn’t listed at the https://doc.owncloud.org/server/10.4/admin_manual/installation/system_requirements.html#officially-supported-environments of ownCloud so it might be possible that ownCloud doesn’t run at all on this operating system or might give problems / issues.

I’ll just explain to you how it works on Linux, perhaps that knowledge is transferable to macOS.

On normal Linux distributions you have a configuration folder for PHP.
You have to find it, on Linux it is in /etc/php/. On Ubuntu for example, you’ll find in a subfolder for the PHP version the php.inis for apache2 (mod_php) and cli and finally a third subfolder mods-available.

So there are the following directories:

/etc/php/7.x/apache2
/etc/php/7.x/cli
/etc/php/7.x/mods-available

In the php.ini for apache is defined that additional modules are being loaded from /etc/php/7.1/apache2/conf.d/. In that folder are symlink to the mods-available folder.

A typical module loading configuration file looks like this:

root@ubuntu1804:/etc/php/7.1# cat /etc/php/7.1/mods-available/intl.ini
; configuration for php intl module
; priority=20
extension=intl.so

This works because it will look in the standard extension path for modules, you can overwrite the standard extension in your php.ini:
https://www.php.net/manual/en/ini.core.php#ini.extension-dir

The standard extension dir on Ubuntu is:

/usr/lib/php/<date string for each PHP version>/

Now to tie it all together for your mac:

  1. Find your php configuration folder
  2. Find whether you have a intl.so file in your extension dir
  3. Adjust your PHP configuration too load that .so file
1 Like