Solution to website background generation errors

Source: Internet
Author: User

If someone has used a PHP program, the webmaster of a website edited in the myqsl language may encounter an error in the background. After the website is generated, the homepage is blank, however, the website page can still be opened. If this problem occurs, it is obvious that there is a problem with the DNS settings of the server. If the website uses a virtual host, you can set it for the Space Provider. If it is a cloud host or vps, you must set it yourself. What is it?

Warning: file_get_contents () [function. file-get-contents]: php_network_getaddresses: getaddrinfo failed: Unknown host. In D: wwwrootindex. php on line 2

Warning: file_get_contents (http://wwwtest.cn/) [function. file-get-contents]: failed to open stream: No error in D: http://www.js-huoyun.comindex.php on line 2

The red code in the middle shows the problem caused by website background errors. After I started searching for a long time, I still couldn't find a solution. When I encountered an irresponsible Space Provider, I directly said that the solution could not be solved, however, after changing the vps, I checked the tutorial and set the website's DNS. I didn't find it so simple, but as a space provider, I couldn't even solve this small problem, therefore, I would like to remind webmasters to choose a service provider here. For server problems, please refer to "soul-server" on the website.

To set the dns for a server or vps:

Step 1: Open the operation procedure, click Control Panel> network connection> right-click Local Connection and click Properties.

Step 2: Click properties to go to an attribute interface, as shown in. In the general options, select "Internet Protocol (TPC/IP)" and click "properties" To Go To The following interface.

  

 

Step 3: Use the following IP address, and then set the IP address, subnet mask, default gateway, preferred DNS server, and backup DNS server in sequence, change to the information displayed on the "Network Configuration Information Query" page, click "OK", and then click "close". The configuration takes effect. Enter IP119.147.115.6, subnet mask 255.255.0, default gateway 119.147.115.1, preferred DNS server 121.12.170.23, backup DNS server 8.8.8.8, as shown in

After the change, click OK. After the shutdown and restart, You can regenerate the website data! At that time, in order to set up this DNS, the Space Provider changed three ip addresses for me, and then I had been restoring the website information, uploading, and restoring. I had not done a good job many times, later I learned it under the guidance of a programmer. I didn't expect it to be so simple. Something is to be shared, so you don't have to worry about website background errors in the future.

The article was edited by Kunshan jiali freight Co., Ltd. at http://www.js-huoyun.com/, the first station long network, and the instructions for reference.

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.