Remove duplicate php paths: set_php_bin_path_in_crons=2

Version 1.62.0

Feature
Finished

New option for set_php_bin_path_in_crons, where setting it to 2, eg: /usr/local/directadmin/directadmin set set_php_bin_path_in_crons 2 service directadmin restart will reduce any duplicate /usr/local/phpXX/bin entries from the crontab's PATH value. Eg, if you have: crontab -u fred -l | grep PATH PATH=/usr/local/php70/bin:/usr/local/php74/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/fred/bin where there are 2 entries for php 7.0 and 7.4, you can clear out the 2nd entry, regardless of the version set, by using 2, and issuing a rewrite: cd /usr/local/directadmin echo "action=rewrite&value=httpd&user=fred" > data/task.queue.cb; ./dataskq d1000 --custombuild (or without &user=fred for all accounts) and it will reduce it down to: PATH=/usr/local/php70/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/fred/bin in the crontab. This setting should only be used temporarily, and we would recommend setting it back to 1 once you're done clearing any duplicates.

Interested to try DirectAdmin? Get a 30-day Free Trial!