10.0.2: "Fatal error: Out of memory" after enabling PHP Memory Cache APCu


I want to enable the Memory Cache on my fresh owncloud server 10.0.2 installation as the admin section advises.

I have restricted access via putty to my hosted server.

In order to enable ACPu my hosting provider told me to just create a "php.ini" with the following settings:

extension_dir = ""
extension = apcu.so

So I've created this small "php.ini" in the owncloud root folder.
I do a check with just calling phpinfo(); (tiny PHP script in the same folder) and can see a new section "apcu" appeared in the "configuration" section:

Version 5.1.8
APCu Debugging Disabled
MMAP Support Enabled
MMAP File Mask no value
Serialization Support php
Build Date Jul 10 2017 15:44:58

But when I am trying to access my owncloud I get an error:

Fatal error: Out of memory (allocated 2097152) (tried to allocate 36864 bytes) in /home/<username>/www.<MyDomain>.de/dev/owncloud/lib/composer/composer/autoload_static.php on line 347

So, because I've read that this problems occurs when the PHP memory_limit is hit, I did the following in order to increase the memory_limit:

  1. Enhanced the previously created php.ini by additional setting
    memory_limit = 4096M
    -> Same error

  2. Increased memory_limit in .htaccess-file in the root-folder of my owncloud installation:
    If Module mod_php7.c
    php_value memory_limit 4096M
    -> Same error

  3. Edited the mentioned oc-script "autoload_static.php" (I know it's a no-go but I am frustrated)
    and called ini_set('memory_limit', '4096M');

public static function getInitializer(ClassLoader $loader)
  error_log("Set memory limit to 4096M.\n", 3, "my_oc.log");
  **ini_set('memory_limit', '4096M');**

-> Same error

Any ideas?

My config:
owncloud server version: 10.0.2
PHP Version 7.1.7
OS version: Ubuntu 16.04.3 LTS