CyberPanel Community

Site is downloading a file called download automatically

7 replies
wh
whattheserver #2

check your .htaccess for an add handler its possible its invalid or from previous cPanel and causing the PHP files to be downloaded vs executed.

ca
cafedelmar #4

I’m having a very similar issue with my test website: https://turntable.rpess

Apparently this has something to do with wp-rocket caching plugin, as turning it off/on solves the issue, at least temporarily.

lu
luckyrajpurohit #5

Hello,
did you get any solution. i am facing same issue with cyberpanel and wp-rocket.

er
erobus #6

Hi,

Any solution for WP-Rocket plugin? I think it has to do something with .htaccess but couldn’t fix it. It works sometime and if i restart openlitespeed it starts acting weird again.

wh
whattheserver #8

its most likely a bad php add handler “AddHandler” in an .htaccess file which is causing this issue which is probably being added by the plugin or leftover from a different cPanel server.

Can find this as root for a user like
user=‘Username_not_provided_in_form’; USER_HOME=$(eval echo ~${user}); sudo grep -Evir --include=\.ini --include=\.htaccess --include=\.cfg ‘^#|^;’ $USER_HOME | grep --color -E ‘AddHandler|SetHandler|ea-php|alt-php|memory_limit|post_max_size|upload_max_filesize|max_execution_time|session.save_path|php_value|php_flag’

or across a server like
sudo grep -Evir --include=\.ini --include=\.htaccess --include=\.cfg ‘^#|^;’ /home| grep -Ev ‘11211|memory_limit 1024M|memory_limit = 1024M|upload_max_filesize 150M|upload_max_filesize = 150M|max_execution_time = 300|post_max_size 256M|post_max_size = 256M|php_value max_execution_time 300|virtfs|language|include_path|extension_dir’| grep --color -E ‘AddHandler|SetHandler|ea-php|memory_limit|post_max_size|upload_max_filesize|max_execution_time|session.save_path|php_value|php_flag’

Can find all these commands and more in the WizardAssistant app which has all of the cyberpanel CLI and tons of other handy goodies for troubleshooting stuff like this

videos here

Hopefully that was helpful

Sign in to reply