Files automatically minified and saved over originals

#1
I have Cyberpanel + Open Litespeed with just a default installation package- no extra plugins.

Somehow every time I upload a file via FTP it is automatically replaced with a minified version. (which breaks my website because of the php code within gets messed up)

Do you know how I can disable this auto-minifying "feature" which I assume is in OpenLiteSpeed?
 

Cold-Egg

Administrator
#2
Can you compare the file size before/after upload to the server? If it's uploaded via the FTP, then it sounds not web server-related.
 
#3
Hi, I use FileZilla for FTP and it is not causing it- it doesn't do this with any of the other dozens of websites I maintain. It's also not Cloudflare as I disabled it and Cloudflare can't write over files on your server anyway. It replaces my original files like this:

Brief example BEFORE:
<?php require_once('sqliconnect.php');
header("X-Content-Type-Options: nosniff");
header('X-Frame-Options: DENY');
header("Content-Security-Policy: frame-ancestors 'self';");
header("X-XSS-Protection: 1"); ?>
<!DOCTYPE html>
<html lang=en>

AFTER:
<?php require_once('sqliconnect.php'); header("X-Content-Type-Options: nosniff"); header('X-Frame-Options: DENY'); header("Content-Security-Policy: frame-ancestors 'self';");header("X-XSS-Protection: 1"); ?> <!DOCTYPE html> <html lang=en>


The act of it auto removing spaces and returns breaks the code because if you have a comment in php like // this before code you wish to execute, it will comment out that code, including } brackets , etc. So it completely destroys the page.

Does Open Litespeed or Cyberpanel have anything that would remove returns, put all code on 1 line and save over your original files on the server?
 
#5
Thanks, but unfortunately that's not FTP. I forced ASCII and same result, plus the FTP works fine for other servers without Cyberpanel+Open Litespeed . It seems specific to Cyberpanel+Open Litespeed.
 
Top