Open shoulders opened 1 month ago
Hmm, that's odd that those CGI wrappers would be created when they aren't needed!
To help debug this, it would be useful to see the output from the migration process. Also, if you create a new domain on your system, does it get those php*.cgi
files?
it would be useful to see the output from the migration process.
Is this the text that appears on screen while migrating?
I will runs some tests, clarify and get you the information.
Hmmm ... I'm not sure what could be going on here then. Maybe the default PHP mode wasn't set to FPM when a domain was imported, and thus those .cgi
files were created?
I don't have the php CGI mode available as I removed it. I think I removed php-cgi module for each php version.
I did have them installed at one point, I think.
Only php-fpm is available.
It is almost like some of the behind the scenes handling of php-cgi is being triggered as if it were installed.
Parts of the template system might be being ignored for php when you import.
Are there hardcoded rules for handling CGI?
Is the import saying cpanel had CGI so I will now add CGI files?
Tricky one. I can't see anything obvious.
No, we don't even get the PHP mode from the cPanel backup. Hard to say what's going on here unless it can be re-produced, as I don't see any obvious trigger for this in the code.
Actually ... I did find one code path where the .cgi
wrappers can be created unnecessarily. I'll fix this for the next release : https://github.com/virtualmin/virtualmin-gpl/commit/4e3efd2bfaff558d1d652b240f4a0e5dfd1fba93
I did find one code path where the
.cgi
wrappers can be created unnecessarily. I'll fix this for the next release : 4e3efd2
Even with this patch, if this function is called, like in FPM mode, it will still default to &cgi_bin_dir($_[0])
, and create ~/cgi-bin
and stuff, right?
Why not just add after $mode
:
return if ($mode !~ /cgi/);
But cgi-bin directories are different from PHP .cgi wrappers.
I will clean up those if
statements though.
the issue
I imported a cpanel account in to virtualmin and it has created the following folder and CGI scripts
proposed solution
Don't install CGI stuff when CGI is not selected.