2.20.3. Error 405 Not Allowed
This error can occur in several cases:
- The error was caused by a PHP script that is responsible for importing data to the site. Hosting installed script execution time limit, which defaults to 30 seconds. The script does not fit into the time allotted to it, as a result of which you can see an error "405 Not Allowed"... In this situation, there may be several solutions:
- Increase the value before running the script max_execution_time up to the maximum value.
- Split the file into smaller parts and import them one by one through a PHP script.
- Import data directly into the database available ways.
- If there is a fundamental task of regularly importing data using a PHP script, then in this case you can configure it to run through cron... In this case, the execution time will be equal to 1 hour, which should be enough to import the required data.
- Consider switching to businesstariff.
- This error can also occur when making POST requests. In most cases, this will be visible in the server logs. The problem is that the file extensions you are trying to call in the script must be handled directly by Apache. In this case, you will need to remove these extensions (not all, but only those that directly interfere with the correct operation of the script) from list of static files.
- When executing POST requests, if the request is blocked at the nginx level (for example: codes 500 or 403, including restricting access to the site, and so on). All standard errors and access restrictions by default are handled by the nginx web server, which does not accept POST requests, and therefore returns a response "405 Not Allowed"... This is so relevant for requests from blocked User-Agent.