Whether you like it or else, this site uses cookies. On this site will rise... something. Words fail me. Thoughts fail me. Give me a kiss and enliven my inspiration. Hold me. Kiss my asinine comments. This is my website, and I am Loloy D.

Random fun stuff:

Drupal

How To Tweak Synology Drupal Package

I searched and Googled quite a lot on this subject only to become frustrated with unrelated, unhelpful or mildly helpful results. And this is why I am tagging this post with the following distinct words and identifiers:
Tweak Synology Drupal Package with custom and/or modified ini settings, especially open_basedir

This is not necessarily an article on the optimization context of tweaking but on how to make the tweaks or custom PHP INI settings work and persist across Synology restarts and Drupal Package restarts. I imagine that people will be finding this article because they would have wanted to apply custom PHP INI settings on their Synology Drupal Package installations.

In my case, I had my Synology Drupal Package installed at http://192.168.10.138/drupal/, and once logged in with an administrator account, I can verify and confirm as to which PHP INI file my Drupal installation is using by looking at the following token-value set upon browsing http://192.168.10.138/drupal/admin/reports/status/php

Configuration File (php.ini) Path /usr/local/etc/php56
Loaded Configuration File /volume1/@appstore/WebStation/misc/php56.ini
Scan this dir for additional .ini files no value
Additional .ini files parsed /usr/local/etc/php56/conf.d/SYNO.SDS.Drupal.ini, /usr/local/etc/php56/conf.d/SYNO.SDS.MantisBT.ini, /usr/local/etc/php56/conf.d/webstation-extensions.ini, /run/php-fpm/conf.d/timezone.ini

Under PHP INI Core section, you may also find a token-value set something similar to this:

open_basedir /tmp:/var/services/tmp:/var/services/web no value

Your mileage may vary. From this result set, you would think that you could put/place your tweaks in /volume1/@appstore/WebStation/misc/php56.ini or in /usr/local/etc/php56/conf.d/SYNO.SDS.Drupal.ini but according to my personal experience, you would rather implement your changes in /volume1/@appstore/Drupal/synology_added/etc/SYNO.SDS.Drupal.ini. Whatever you do, you'd want to back up that modified PHP INI file some place else, so that you can redo these changes if they ever get overwritten by eventual Synology Package updates.

In my case, I edited the file /volume1/@appstore/Drupal/synology_added/etc/SYNO.SDS.Drupal.ini and put in the following change:

[PATH=/var/services/web/drupal]
open_basedir = /etc.defaults:/etc:/usr/syno/synoman:/tmp:/var/services/tmp:/var/services/web:/var/services/homes:/volume1/Audio

This particular change made my custom PHP scripts alongside (or within Drupal) work as expected. It is in my understanding that similar PHP profiles for various other Synology Packages can be implemented by going through the source templates made available at /volume1/@appstore/*.

The above procedure applies to DSM version 6.1.5-15254 with the as-of-writing latest Synology Drupal Package 7.56.

Extra tags and citations for search engine optimization: Tweak Synology Drupal Package with custom and/or modified ini settings, especially open_basedir, How To Tweak Synology Drupal Package

Subscribe to RSS - Drupal