解决:shell_exec()无法使用,shell_exec()被禁用

本文介绍了解决PHP中shell_exec()函数被禁用的方法。通过修改php.ini文件中的disable_functions配置项,并重启Apache服务,使该函数恢复正常运行。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

文章来源:https://www.onepound.cn/yc/?p=9257

最近刚买了一个新空间,网站上线后发现总是出现以下警告:

Warning: shell_exec() has been disabled for security reasons

in /home/shoesnba/public_html/redsoleshoeses.com/includes/functions/general.php on

line 1486。

意思是shell_exec()这个功能被禁用了,这一看就是配置问题,找到php.ini里面的

disable_functions = exec , popen, system …然后 把这个里面的exec去掉,最后在重启下apache就好了

php.ini exec()函数无法使用

php.ini exec()函数无法使用

原因:在php.ini的 disable_functions配置中,默认exec执行函数都是被 禁止的,需要在php.ini中

disable_functions = exec , popen, system …. ,将你需要用的函数从列表中删掉,然后在重启apache就可以了

转载于:https://www.cnblogs.com/enjie/articles/8124716.html

老化测试:am start com.rockchip.devicetest/.AgingTestActivity [ 311.222723][ T323] type=1400 audit(1752063960.450:1186): avc: denied { search } for comm="ll.splashworker" name="com.rockchip.devicetest" dev="mmcblk1p15" ino=2493823 scontext=u:r:platform_app:s0:c512,c768 tcontext=u:object_r:system_app_data_file:s0 tclass=dir permissive=1 app=com.android.systemui [ 311.333423][ T323] type=1400 audit(1752063960.560:1187): avc: denied { open } for comm="RenderThread" path="/dev/__properties__/u:object_r:vendor_default_prop:s0" dev="tmpfs" ino=280 scontext=u:r:system_app:s0 tcontext=u:object_r:vendor_default_prop:s0 tclass=file permissive=1 [ 311.333472][ T323] type=1400 audit(1752063960.560:1188): avc: denied { getattr } for comm="RenderThread" path="/dev/__properties__/u:object_r:vendor_default_prop:s0" dev="tmpfs" ino=280 scontext=u:r:system_app:s0 tcontext=u:object_r:vendor_default_prop:s0 tclass=file permissive=1 [ 311.333492][ T323] type=1400 audit(1752063960.560:1189): avc: denied { map } for comm="RenderThread" path="/dev/__properties__/u:object_r:vendor_default_prop:s0" dev="tmpfs" ino=280 scontext=u:r:system_app:s0 tcontext=u:object_r:vendor_default_prop:s0 tclass=file permissive=1 [ 313.417596][ T323] type=1400 audit(1752063962.643:1190): avc: denied { execute } for comm="Thread-4" name="stressapptest" dev="mmcblk1p15" ino=2494064 scontext=u:r:system_app:s0 tcontext=u:object_r:system_app_data_file:s0 tclass=file permissive=1 [ 313.417967][ T323] type=1400 audit(1752063962.643:1191): avc: denied { execute_no_trans } for comm="Thread-4" path="/data/user/0/com.rockchip.devicetest/files/stressapptest" dev="mmcblk1p15" ino=2494064 scontext=u:r:system_app:s0 tcontext=u:object_r:system_app_data_file:s0 tclass=file permissive=1 [ 313.425043][ T323] type=1400 audit(1752063962.650:1192): avc: denied { search } for comm="stressapptest" name="tmp" dev="mmcblk1p15" ino=1291810 scontext=u:r:system_app:s0 tcontext=u:object_r:shell_data_file:s0 tclass=dir permissive=1 [ 313.425313][ T323] type=1400 audit(1752063962.650:1193): avc: denied { getattr } for comm="stressapptest" path="/postinstall" dev="dm-0" ino=45 scontext=u:r:system_app:s0 tcontext=u:object_r:postinstall_mnt_dir:s0 tclass=dir permissive=1 [ 313.425425][ T323] type=1400 audit(1752063962.653:1194): avc: denied { read } for comm="stressapptest" name="/" dev="mmcblk1p15" ino=2 scontext=u:r:system_app:s0 tcontext=u:object_r:system_data_root_file:s0 tclass=dir permissive=1
最新发布
07-10
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值