国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 開發(fā) > PHP > 正文

Warning:chmod() has been disabled for security reasons in

2024-05-04 21:58:48
字體:
供稿:網(wǎng)友

Warning: chmod() has been disabled for security reasons in D://freehost//xxx//WindFile.php on line 102根據(jù)英文的意思我們知道是出于安全原因,已被禁用的chmod()了,那么解決辦法就是很簡單了,直接把chmod()禁用關(guān)了就可以了.

如果你有服務(wù)器權(quán)限操作方法很簡單打開PHP.INI,找到這行:

disable_functions =

在后面那里加上要禁用的函數(shù),如禁用多個函數(shù),要用半角逗號分開,給個例子,代碼如下 :

  1. disable_functions = passthru,exec,system,popen,chroot,scandir,chgrp,chown,escapesh 
  2. ellcmd,escapeshellarg,shell_exec,proc_open,proc_get_status 

如果沒有服務(wù)器權(quán)限,就只能從程序下手了,下面我以ecmall出現(xiàn)此問題的解決辦法.

第一步:找到eccore/controller/message.base.php,將如下代碼:

  1. if ($errno == 2048) 
  2.     { 
  3.         return true; 
  4.     }  
  5.  
  6. //替換為: 
  7.   
  8. if ($errno == 2048 || (($errno & error_reporting()) != $errno)) 
  9.     { 
  10.         //不再需要通過_at方法來抵制錯誤 
  11.         //錯誤被屏蔽時就不拋出異常,該處理就允許你在代碼中照常使用error_reporting來控制錯誤報告 
  12.         return true; 
  13.     } 

第二步:找到eccore/ecmall.php,代碼如下:

  1. function _at($fun
  2.     $arg = func_get_args(); 
  3.     unset($arg[0]); 
  4.     restore_error_handler(); 
  5.     $ret_val = @call_user_func_array($fun$arg); 
  6.     reset_error_handler(); 
  7.  
  8.     return $ret_val
  9. }//開源代碼Vevb.com 
  10. //修改為 
  11.  
  12. function _at($fun
  13.     $arg = func_get_args(); 
  14.     unset($arg[0]); 
  15.     $ret_val = @call_user_func_array($fun$arg); 
  16.  
  17.     return $ret_val; 

有些危險函數(shù)我們盡量在開發(fā)時就為避免掉了,免得以后要改,下面我列出一般服務(wù)器會禁止使用的函數(shù)有如下:

  1. disable_functions = system,exec,shell_exec,passthru,proc_open,proc_close, proc_get_status,checkdnsrr,getmxrr,getservbyname,getservbyport, syslog,popen,show_source,highlight_file,dl,socket_listen,socket_create,socket_bind,socket_accept, socket_connect, stream_socket_server, stream_socket_accept,stream_socket_client,ftp_connect, ftp_login,ftp_pasv,ftp_get,sys_getloadavg,disk_total_space, disk_free_space,posix_ctermid,posix_get_last_error,posix_getcwd, posix_getegid,posix_geteuid,posix_getgid, posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid, posix_getppid,posix_getpwnam,posix_getpwuid, posix_getrlimit, posix_getsid,posix_getuid,posix_isatty, posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid, posix_setpgid,posix_setsid,posix_setuid,posix_strerror,posix_times,posix_ttyname,posix_uname 

發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 加查县| 绥江县| 和田市| 灵山县| 河西区| 石屏县| 浑源县| 定陶县| 太和县| 四川省| 贡山| 永安市| 莫力| 根河市| 江门市| 砀山县| 右玉县| 包头市| 五指山市| 荥阳市| 永登县| 平乐县| 平谷区| 灵丘县| 忻城县| 丰镇市| 大冶市| 凤城市| 偏关县| 诏安县| 嘉义县| 乌拉特中旗| 洛浦县| 仁怀市| 普格县| 托克托县| 衡山县| 四平市| 汉川市| 海兴县| 聂荣县|