Php Prompts Call-timepass-by-referencehasbeendeprecated error

Source: Internet
Author: User
Today, I suddenly found that the installed host control panel reported this error, but the function can still be used normally. I found two solutions online. I hope the following methods will help you. the error message is as follows: Warning: Call-timepass-B... today, I suddenly found that the installed host control panel reported this error, but the function can still be used normally. I found two solutions online. I hope the following methods will help you.

The error message is as follows:

Warning: Call-time pass-by-reference has been deprecated in E: Website Directory www Directory a. php on line 46

Warning: Call-time pass-by-reference has been deprecated in E: www Directory a. php on line 47

Warning: Call-time pass-by-reference has been deprecated in E: www Directory a. php on line 47

Warning: Call-time pass-by-reference has been deprecated in E: Website Directory www Directory a. php on line 48

Warning: Call-time pass-by-reference has been deprecated in E: Website Directory www Directory a. php on line 49

Warning: Call-time pass-by-reference has been deprecated in E: Website Directory www Directory a. php on line 51

Warning: Call-time pass-by-reference has been deprecated in E: Website Directory www Directory a. php on line 56

Warning: Call-time pass-by-reference has been deprecated in E: Website Directory www Directory a. php on line 56 // phprm.com

The solution is as follows:

Method 1:Change display_errors = on of php. ini to display_errors = off // (no error is displayed). However, this method is not very good, but does not display errors. In fact, errors still exist.

Method 2:

1. search for the keyword allow_call_time_pass_reference in PHP. ini and create it by yourself.

2. change Off to On, and the Web Server will be OK when it is restarted ~

Allow_call_time_pass_reference = Off to allow_call_time_pass_reference = On

By the way, the meaning of the allow_call_time_pass_reference parameter is explained: whether to enable the mandatory parameter to be passed by reference when the function is called.

This method is not supported and may not be supported in future PHP/Zend versions. we recommend that you specify which parameters should be passed by reference in function definition, we encourage you to disable this option and ensure that the script runs properly to ensure that the script can run in future versions. every time you use this feature, you will receive a warning, parameters are passed by value instead of by reference.

It is not recommended to pass parameters by reference during function calling because it affects code cleanliness. if the function parameter is not declared as a reference, A function can modify its parameters without writing a document. to avoid its side effects, it is best to specify the parameter only when the function declaration needs to be passed through reference.

Permanent address:

Reprint at will ~ Please bring the tutorial URL ^

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.