0

The newest Synology NAS DSM 6 version has a strange PHP set up. The command line binary is PHP version 5.6.11 with almost no enabled modules and the tokenizer part is not compiled into it. But when the synology web server app is installed and I do ran phpinfo(); then it shows me PHP version 5.6.17 with many modules, including intl and tokenizer, enabled. The web server which is running is Apache with php-fpm.

Is it possible to run php on the command line with the PHP binary from the web server? I need that because I have a PHP command line app only which is based on Symfony that requires the intl and tokenizer (probably some more) extensions.

EDIT:

Found that solution https://stackoverflow.com/questions/30238602/how-to-execute-a-php-file-using-a-php5-fpm-pool-socket, but is way too complicated.

Laoneo
  • 274
  • 1
  • 3
  • 13

2 Answers2

1

Simply use php56 instead of php in cli.

Peter
  • 11
  • 1
  • After the upgrade this didn't work. I had to reinstall the PHP 5.6 app and the creating two symbolic links as described in my answer. But your solution brought me on the right track. – Laoneo Mar 31 '16 at 07:13
0

I finally found the answer here https://forum.synology.com/enu/viewtopic.php?f=20&t=91099#p425790. After creating the link like

ln -s /usr/local/bin/php56 /sbin/php

and

ln -s /usr/local/bin/php56 /usr/local/bin/php

it started working trough the command line and cron job.

Laoneo
  • 274
  • 1
  • 3
  • 13