How to REMOVE exec from diabled functions in PHP?

Hi there, I want to be able to use ffmpeg on my website. I was able to install it in the VPS, but to use it from within PHP, I need the exec function available. But exec in the disabled functions list.

I’ve tried everything to remove it. I use DirectAdmin. There I can’t find a way to remove exec from the list of disabled functions. I edited php.ini. Also not working. Where else can I make this work?

Hi

Add exec to disable_functions = in php.ini, then restart Apache.
If using php-fpm, restart php-fpm.
This should disable it.

You can check if it’s disabled using the phpinfo() function.

Reference site:

The question was how to enable a function.

Hello

I misunderstood. My apologies. All PHP versions are enabled via exec.

Please check the manual to see if there are any issues with Notes.

On AlmaLinux 9 system, with PHP 8, the disable_functions = has no value (i.e. is an empty list) in /etc/php.ini

Where in your system is the exec added to that list? Can you find such file?
Perhaps with: grep -r disable_functions /etc

Hi everyone,

Got it.

/usr/local/php83/lib/php.conf.d/50-webapps.ini was the file.

Removed exec from the list and restarted the VPS.

All works fine now. Thanks!!!

A “source install”? Not from RPM packages – Alma 9 and 10 do have PHP 8.3 and Remi’s repository should have 8.3 packaged, suitable for all Almas.