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

Source: Internet
Author: User

Warning: chmod () has been disabled for security reasons in D :\\ freehost \ xxx \ WindFile. php on line 102 according to the English meaning, we know that for security reasons, chmod () has been disabled, so the solution is very simple, directly put chmod () disable it.

If you have the server permission, you can easily open PHP. INI and find this line:

The Code is as follows: Copy code

Disable_functions =

Add the function to be disabled. For example, to disable multiple functions, separate them with commas (,).

Here is an example:

The Code is as follows: Copy code

Disable_functions = passthru, exec, system, popen, chroot, scandir, chgrp, chown, escapesh

Ellcmd, escapeshellarg, shell_exec, proc_open, proc_get_status

If you do not have the server permission, you can only start with the program. The following describes how to solve this problem with ecmall.
 

Step 1: Find eccore/controller/message. base. php
Set

The Code is as follows: Copy code
If ($ errno = 2048)
{
Return true;
}

Replace

The Code is as follows: Copy code

If ($ errno = 2048 | ($ errno & error_reporting ())! = $ Errno ))
{
// The _ at method is no longer required to resist errors.
// When an error is blocked, no exception is thrown. This process allows you to use error_reporting in the code to control the error report as usual.
Return true;
}


Step 2: Find eccore/ecmall. php

The Code is as follows: Copy code

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;
}

Change

The Code is as follows: Copy code

Function _ at ($ fun)
{
$ Arg = func_get_args ();
Unset ($ arg [0]);
$ Ret_val = @ call_user_func_array ($ fun, $ arg );

Return $ ret_val;


}

Some dangerous functions should be avoided during development as much as possible, so as not to be changed in the future. Below I will list the functions that will be disabled by General servers.

The Code is as follows: Copy code

Response = system, exec, shell_exec, passthru, proc_open, proc_close, closed, checkdnsrr, getmxrr, getservbyname, getservbyport, syslog, popen, show_source, highlight_file, dl, comment, socket_create, comment, example, socket_connect, example, ftp_connect, ftp_login, ftp_pasv, ftp_get, example, example, disk_free_space, example, posix_getegid, posix_geteuid, example, example, posix_getgrnam, posix_getgroups, upper, lower, lower, posix_getpid, lower, posix_getpwnam, lower, lower, posix_getsid, posix_getuid, lower, posix_kill, posix_mkfifo, lower, posix_setsid, posix_setuid, posix_strerror, posix_times, posix_ttyname, posix_uname

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.