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.
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!

The article compares ACID and BASE database models, detailing their characteristics and appropriate use cases. ACID prioritizes data integrity and consistency, suitable for financial and e-commerce applications, while BASE focuses on availability and

The article discusses securing PHP file uploads to prevent vulnerabilities like code injection. It focuses on file type validation, secure storage, and error handling to enhance application security.

Article discusses best practices for PHP input validation to enhance security, focusing on techniques like using built-in functions, whitelist approach, and server-side validation.

The article discusses strategies for implementing API rate limiting in PHP, including algorithms like Token Bucket and Leaky Bucket, and using libraries like symfony/rate-limiter. It also covers monitoring, dynamically adjusting rate limits, and hand

The article discusses the benefits of using password_hash and password_verify in PHP for securing passwords. The main argument is that these functions enhance password protection through automatic salt generation, strong hashing algorithms, and secur

The article discusses OWASP Top 10 vulnerabilities in PHP and mitigation strategies. Key issues include injection, broken authentication, and XSS, with recommended tools for monitoring and securing PHP applications.

The article discusses strategies to prevent XSS attacks in PHP, focusing on input sanitization, output encoding, and using security-enhancing libraries and frameworks.

The article discusses the use of interfaces and abstract classes in PHP, focusing on when to use each. Interfaces define a contract without implementation, suitable for unrelated classes and multiple inheritance. Abstract classes provide common funct


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

Dreamweaver Mac version
Visual web development tools

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software