Lamp+yii problems encountered in the framework configuration

Source: Internet
Author: User

Here are a list of different questions and answers:

1.

In the YII framework, modify the database information, mainly main.php and database.php two files.

2.

Problem:


Answer:

Modify PHP.ini:
error_reporting = E_all
Switch
error_reporting = E_all & ~e_notice

3.

Problem:

[Sat 25 22:07:40 2015] [ERROR] [client218.30.116.3] File does not exist:/var/www

/favicon.ico

[Sat 25 22:08:42 2015] [ERROR] [client218.30.116.8] File does not exist:/var/www

/favicon.ico

Answer:

Favicon.ico refers to your website icon. When someone (using IE browser) collects your website as "My favorite", it will refer to the "Favicon.ico" file in the root directory of the website, which is the icon shown in "My favorite".
For example, when you listed "http://www.debian.org/" as "my favorite",
Your "My favorite" list will show the icon "Http://www.debian.org/favicon.ico".
When you do not have the "Favicon.ico" file in your root directory, "My favorite" will display the Internet Explorer icon, while the "favicon.ico" information that does not exist (404 Not Found) will be written to your apache2 error log, So you can see from this log, when, what people (their IP address) set your site as "my favorite".
The solution is to either find a favicon.ico in the directory or generate one online.
cp/usr/src/httpd-2.2.23/docs/manual/images/favicon.ico/var/www/html/
Then you don't get an error.

4.


Answer:

Yii is considered safe. By default, the GII component is allowed to run natively. Therefore, the above problems are generally the server is not native.
Workaround: Edit your main.php configuration file
' Modules ' =>array (
' Gii ' =>array (
' Class ' = ' System.gii.GiiModule ',
' Password ' = ' password ',
' Ipfilters ' =>array (' 127.0.0.1′, ':: 1′),//Change the IP here to the IP currently used by this machine
),
),
Set up your native IP in ipfilters (remember that it is your native Client IP instead of the server IP)

Moreover, my IP address is the intranet, the external network interface is not fixed, so the external IP interface is an IP segment,
' Ipfilters ' =>array (' 127.0.0.1′, ' 218.30.116.* ', ':: 1′)


Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Lamp+yii problems encountered in the framework configuration

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.