After installing a new server, based in Rocky Linux 9.7, I have found an unexpected behaviour.
When serving HTML provided from a PHP application, the server alters content, rewriting ids of DOM elements related with forms, changing with random characters the original ids.
I know this is a security related practice, some times recommended, but I have never found myself in a host acting that way without a specific personalized configuration.
The problem comes from the fact the ids are used by some javascript codes, and while scripting included in content is updated in some elements, some other are not detected and changed, and shared javascript files are obviously unchanged, preventing many actions to work.
I know mod_security2 can be configured to make such behaviour, but it does not look like activated and neither being installed at all.
Is somebody aware of the origin of such behaviour and how to deactivate?
Hmmm…in that case, I think I’m stumped. None of the Apache modules that could do anything like that are enabled in a default Virtualmin system.
Have you enabled any extra modules in Apache? mod_perl, mod_substitute, anything along those lines?
If not, you’ll need to narrow it down somehow. Maybe some caching layer? Redis? Something else that might be serving old results? I dunno. But, probably not Apache (and definitely not Virtualmin, as we don’t manage any of the Apache modules that could do that).
I have checked the process is made on the PHP part of ecuation. If serving plain HTML files it does not happen.
It happens in every browser, and not related with codepages at all - HTML content that is altered is mostly coming from included plain files, not generated by PHP processing
If this is a new server why VM 7.40.1? I was going to ask the if you knew of any differences with the 2 that are ‘working’ and noticed this. Differing php versions?