Warning: chmod() has been disabled for security reasons in D:\\freehost\\xxx\\WindFile.php on line 102根据英文的意思我们知道是出于安全原因,已被禁用的chmod()了,那么解决办法就是很简单了,直接把chmod()禁用关了就可以了.
如果你有服务器权限操作方法很简单打开PHP.INI,找到这行:
disable_functions =
在后面那里加上要禁用的函数,如禁用多个函数,要用半角逗号分开,给个例子,代码如下 :
- disable_functions = passthru,exec,system,popen,chroot,scandir,chgrp,chown,escapesh
- ellcmd,escapeshellarg,shell_exec,proc_open,proc_get_status
如果没有服务器权限,就只能从程序下手了,下面我以ecmall出现此问题的解决办法.
第一步:找到eccore/controller/message.base.php,将如下代码:
- if ($errno == 2048)
- {
- return true;
- }
-
-
-
- if ($errno == 2048 || (($errno & error_reporting()) != $errno))
- {
-
-
- return true;
- }
第二步:找到eccore/ecmall.php,代码如下:
- function _at($fun)
- {
- $arg = func_get_args();
- unset($arg[0]);
- restore_error_handler();
- $ret_val = @call_user_func_array($fun, $arg);
- reset_error_handler();
-
- return $ret_val;
- }
-
-
- function _at($fun)
- {
- $arg = func_get_args();
- unset($arg[0]);
- $ret_val = @call_user_func_array($fun, $arg);
-
- return $ret_val;
- }
有些危险函数我们尽量在开发时就为避免掉了,免得以后要改,下面我列出一般服务器会禁止使用的函数有如下:
- 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
|