Error 500 when downloading configuration
-
Hello,
When trying to download the w3 total cache configuration my server responds with this error and does not download:
Internal Server Error Oops! Something went wrong. The server encountered an internal error or misconfiguration and was unable to complete your request. Error Code: 500
I was looking at the plugin code and got here:
function w3tc_config_export() { $filename = substr( get_home_url(), strpos( get_home_url(), '//' )+2 ); @header( sprintf( __( 'Content-Disposition: attachment; filename=%s.json', 'w3-total-cache' ), $filename ) ); echo $this->_config->export(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped die(); }
If I remove the line
@header( sprintf( __( 'Content-Disposition: attachment; filename=%s.json', 'w3-total-cache' ), $filename ) );
and replacement by
header("Content-disposition: attachment; filename=".$filename.".json");
it works perfectly, I have only removed the sprintf function, without removing that part of the code it does not work on my server.
Why could it be?
Only w3 total cache fails when downloading the configuration, wordpress and other plugins work correctly.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Error 500 when downloading configuration’ is closed to new replies.