When you run the script, CRONOM crashes. I can not understand where and how to enable this feature for all.

PHP Warning: parse_ini_file() has been disabled for security reasons 
  • Is there ssh access? - mix
  • yes, I have vds. - Sarkis Allahverdian
  • Do you use this function in the crown? - mix
  • yes i use She is needed. - Sarkis Allahverdian
  • then open the php.ini file and remove parse_ini_file from disable_functions - mix

2 answers 2

The reason is in php.ini . There is a block of prohibited functions ( disable_functions ), and, apparently, parse_ini_file() also indicated there. Just get her out of there.

Example:

 disable_functions = fopen, fwrite 

because running through Cron, you need to edit the php.ini that belongs to php-cli, for example /etc/php/7.2/cli/php.ini

  • already checked. there simply stands for disable_functions = + I suppose that then it would be closed for everyone, and so - it works during normal use of the site, but through cron it does not. Maybe crowns need to run with some rights - Sarkis Allahverdian
  • @SarkisAllahverdian supplemented the answer - Captain Flint
  • I found through the search all the files php.ini, because the location is probably different from me. And so, in one of the found files disable_functions not registered. Where then still look for the cause, I do not understand - Sarkis Allahverdian

This is a warning, not a mistake! He says: - I warn parse_ini_file () was disabled for security reasons, i.e. contact your hosting provider . https://stackoverflow.com/questions/23336103/parse-ini-file-has-been-disabled-for-security-reasons-alternative/44238738

  • I have GVA, the whole configuration is after me - Sarkis Allahverdian
  • If you own everything, then try to bookmark the party; , posix_getpwuid - Anton Tsarkov