İçeriğe geç
KAMPANYA

Logo Tasarım + Web Tasarım + 1 Yıl Domain + E-posta + Hosting — $299 +KDV

AIOR

How to edit disabled function at Directadmin and Cloudlinux?

Sektör topluluğu — sorularınız, deneyimleriniz ve duyurularınız için.

How to edit disabled function at Directadmin and Cloudlinux?

Aior

Administrator
Staff member
Joined
Apr 2, 2023
Messages
175
Reaction score
2
Points
18
Age
40
Location
Turkey
Website
aior.com
1/3
Thread owner
Issue:
You are using DirectAdmin with CloudLinux, and the exec() function is disabled in PHP 7.3. When you check your [phpinfo()] output, you see `exec` listed under disable_functions.

You want to enable the `exec` function.


Environment:
  • Control Panel: DirectAdmin
  • OS: CloudLinux (with CageFS)
  • PHP Version: alt-php 7.3 (via PHP Selector)

Solution:

1. Connect via SSH as root:
Code:
ssh root@your-server-ip

2. Find the correct config file that sets disable_functions:
Code:
grep -r "disable_functions" /opt/alt/php73/

Look for an output like:
Code:
/opt/alt/php73/etc/php.ini:disable_functions = exec,system,passthru,shell_exec,...

3. Edit the php.ini file:
Code:
nano /opt/alt/php73/etc/php.ini

Find this line:
Code:
disable_functions = exec,system,passthru,shell_exec,...

Remove `exec` from the list:
Code:
disable_functions = system,passthru,shell_exec,...

Save and exit (`CTRL + X`, then `Y`, then `ENTER`).

4. Refresh CageFS and restart PHP:
Code:
cagefsctl --force-update
cagefsctl --remount-all
systemctl restart alt-php-fpm73

Alternative command if the one above fails:
Code:
service php-fpm73 restart

5. Verify with phpinfo():

Create a file called `phpinfo.php` in your website’s public_html folder:
PHP:
<?php phpinfo(); ?>

Open it in the browser and check the “disable_functions” section. `exec` should no longer appear there.

Notes:
- This method works only for alt-php versions managed by CloudLinux PHP Selector.
- If you're using a `.user.ini` or custom `php.ini` per user/domain, check those files as well:
Code:
find /home -name "php.ini"
find /home -name ".user.ini"
 

Forum statistics

Threads
171
Messages
178
Members
27
Latest member
AIORAli

Members online

No members online now.

Featured content

AIOR
AIOR TEKNOLOJİ

Tüm ihtiyaçlarınız için Teklif alın

Hosting · Domain · Sunucu · Tasarım · Yazılım · Mühendislik · Sektörel Çözümler

Teklif al

7/24 Destek · Anında yanıt

Back
Top