• We value your experience with Plesk during 2025
    Plesk strives to perform even better in 2026. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2025.
    Please take this short survey:

    https://survey.webpros.com/

php files download to users computer if php disabled

B

BillT

Guest
Hi there,

I've noticed that if I add a new domain in plesk but forget to enable php, and then upload some php files to the domain and load one in a browser window, the file actually downloads to my computer with all the php code intact. This is obviously a concern as I often have passwords etc in my php code. Is it possible to change the apache config or something to prevent this happening?

Thanks in advance
 
Hello

There is no such configuration option, as far as I know, at least I could not find any. You can create domain template with PHP enabled by default, and then create domains using that template, just not to bother with PHP enabling each time.
 
thanks for the reply. I've set up a template but was hoping for a fallback safeguard in case someone unchecks the php box. Also the templates don't seem to be supported with subdomains so an error could easily occur there too.

Thanks
 
Back
Top