Manage cookies that are used for advertising, such as ad personalization, remarketing, and ad effectiveness analysis.
2.4.3.3. Error 405 Not Allowed
A similar error may occur in several cases:
- The error is caused by the operation of a PHP script responsible for importing data to the site. The hosting has a script execution time limit set, which is 30 seconds by default. The script does not complete within the allotted time, resulting in the "405 Not Allowed" error. In this situation, there are several possible solutions:
- Before running the script, increase the value of max_execution_time to the maximum value.
- Split the file into smaller parts and import them sequentially through a PHP script.
- Import data directly into the database using available methods.
- If there is a fundamental requirement to regularly import data specifically using a PHP script, you can configure its execution through cron. In this case, the execution time will be 1 hour, which should be sufficient for importing the necessary data.
- Consider the option of switching to the business plan.
- This error may also occur when performing POST requests. In most cases, it will be visible in the server logs. The issue is that the file extensions you are trying to invoke in the script must be handled directly by Apache. In this case, you will need to remove these extensions (not all, only those that directly interfere with the correct operation of the script) from the list of static files.
- When executing POST requests, in the event of a request being blocked at the nginx level (for example: codes 500 or 403, including site access restrictions, and so on). All standard errors and access restrictions are handled by the nginx web server by default, which does not accept POST requests, and therefore returns the response "405 Not Allowed". This is also relevant for requests from blocked User-Agent.