Home  >  Article  >  Backend Development  >  What should I do if php cannot access this website?

What should I do if php cannot access this website?

藏色散人
藏色散人Original
2021-07-26 09:07:249588browse

Solutions for php unable to access this website: 1. Initialize the space or redeploy the program; 2. Modify the website program file permissions; 3. Delete the IP currently accessing the network from the blocked IP list; 4. Re-analyze the domain name; 5. Use domestic servers, etc.

What should I do if php cannot access this website?

The operating environment of this article: windows7 system, PHP7.1 version, DELL G3 computer

php What should I do if I cannot access this website?

For webmasters, the most troublesome problem is when website access is abnormal. Sometimes good websites cannot be accessed. If you are an experienced webmaster, you can find them in time. The problem is that it is difficult for novice webmasters to start.

Possible reasons and solutions for inaccessible PHP websites

1. A 404 error occurs when accessing a website. A 404 error occurs when accessing a website. The appearance of the HTTP 404 status code means that the link points to The webpage does not exist, that is, the URL of the original webpage is invalid.

Possibility 1: The space structure file is deleted and the space is initialized.

Possibility 2: The program is lost or deleted, redeploy the program.

2. A 500 error occurs during access. A 500 error is generally a problem with the website program file permissions.

Possibility 1: The file permissions are incorrect and need to be modified manually. The file management of the worry-free host control panel can Modify, the total selection of folders is 755, and the single file is 644;

Possibility 2: It is caused by an error in the .htaccess file rules. Just rename the file or delete it.

3. A 403 error occurs during access. A 403 error indicates access is denied. This is usually caused by space blocking of IP addresses. If access to an IP is abnormal, the system will consider it an offensive IP, so it will be blocked. At this time, you can find "Block IP" in the control panel and delete the IP you are currently accessing the network from the blocked IP list.

4. The access will prompt a DNS-related error. The DNS error is a domain name server problem. Before looking for a domain name provider, there are two solutions.

Possibility 1: Resolution problem, the resolution does not take effect. Or the parsing method is wrong, you need to parse it correctly, and then wait for it to take effect;

Possibility 2: The default DNS address is modified, usually the default one is used. Starting from July 18, 2016, domestically registered domain names require real-name authentication. If this happens, check whether the domain name has been authenticated by real-name authentication. Other possible reasons are that the domain name has expired without renewal and needs to be re-resolved after renewal.

5. It cannot be accessed domestically. Multiple domestic devices and multiple regions cannot be accessed normally from abroad. The possible reason why it is accessible abroad is that the domain name is blocked.

Solution:

1. Use a domestic server;

2. Bind a new domain name to the server and use a domestic forwarding server to jump the blocked domain name to the new domain name; [Recommended]. When using the second method, by setting up 301 and site-wide forwarding, the weight of the original domain name can be transferred to the new domain name. Or changing the domain name can also solve the problem.

6. A white screen appears when accessing the website. A white screen does not mean that the website cannot be accessed, it just does not display the content. It is usually caused by program configuration. All PHP open source may cause a white screen phenomenon.

7. Prompt database error The bridge between the program and the database is the database configuration file. When this problem occurs, you must first check whether the database configuration is correct. The host address is set to localhost. Check whether the database account and user name are correct. The password can be passed Check the login form. If it is not correct, you can reset and reconfigure it in the database management of the control panel. The possibility is relatively small, but it does not rule out that the database version is incorrect or there is a problem with the database. You can check it in the local environment.

8. When accessing, "This IP is being shared among many domains..." indicates that the IP is being used by multiple domain names.

Possibility 1: This is a shared IP that can only be bound to the top domain name. It cannot be accessed directly using IP.

Possibility 2: The domain name resolution does not take effect. If the IP obtained by pinging the domain name is consistent with the space IP, it means it has taken effect. It may be caused by the browsing cache. Clear the browser cache before accessing.

9. After renewal or upgrade, the pause status is still displayed. The worry-free host has expired or has been shut down due to overcapacity. It is usually controlled by the system. When the space is renewed or upgraded, it will be automatically turned on. The access prompts that the pause may be caused by browsing. The browser cache can be solved by refreshing the browser multiple times or clearing all caches.

10. The redirection problem is usually caused by modifying the hosts file. If the domain name is parsed on the website, you can delete the local parsing and clear the browser cache before accessing; if it is still possible because of the router There is a dns cache in the server and restart the router.

11. When accessing, it is mentioned that the php version prompt information is different. For example, require php > 5.3.0, which means that the current version is lower than 5.3.0, and the worry-free host customer service is required to change to 5.3 or higher. .

13. Errors caused by changing the domain name. After the website changes the domain name, some links may be inaccessible or the layout is confusing. This is because the original domain name exists in the program or database, and it can be solved after changing it.

14. "Internal Server Error The server..." appears when accessing. An internal error or incorrect configuration of the server is encountered, and the access request cannot be completed. In order to protect the security of the user site, the php virtual host server in the Linux environment sets the virtual host root globally. The directory is prohibited from running with permissions higher than 755. If the permissions of 777 are set in the program file, the permissions need to be reset.

The above are common errors encountered when building a PHP virtual host website. The operation instructions are not very detailed, but they are also It can generally provide solution ideas for novice webmasters.

Recommended learning: "PHP Video Tutorial"

The above is the detailed content of What should I do if php cannot access this website?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn