• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

PHP 5.4, FastCGI possible mass fix ??

lvalics

Silver Pleskian
Plesk Guru
I am looking for a solution where it is hundred of sites on a webserver and a lot of the websites have FastCGI enabled and Safe Mode was ON (or also magic_quotes_gpc).
Made some DIG in PSA table and I have found that if I add to `PhpSettingsParameters`for example

insert into `PhpSettingsParameters`(`id`,`name`,`value`) values (151,'magic_quotes_gpc','off');
insert into `PhpSettingsParameters`(`id`,`name`,`value`) values (151,'safe_mode','off');

and I reconfigure-domains, then work the solution globally. BUT ...

that 151 is not the domainID, that number is comming from table `PhpSettings`. Now I dunno how to check if for domain is enabled FASTCGI and how to get the connection between `PhpSettings.ID and DomainID. (Igor? help??)

I have a clue, but not sure that PhpSettings table have only for that domains active an ID where something has been changed on PHPSettings. So if is default, then is nothing changed.
Good and bad.

Can be easily write a small script to get out all ID (unique) and insert with that ID's where not exist a line like

insert into `PhpSettingsParameters`(`id`,`name`,`value`) values (151,'magic_quotes_gpc','off');
insert into `PhpSettingsParameters`(`id`,`name`,`value`) values (151,'safe_mode','off');

and then regenerate the domains (all).

But what will happening with that domains which was only default settings, nothing modified in phpSettings, will be excluded from update and that domains will not working still. On a server with hudnred of domains hard to find out.

So, SOLUTION should be:
- Either Parallels guys write a fast update based on this idea (if is real) and then everyone can fix the issues
- Include into a MU update this and put all domains to safe_mode off and magic_quote=off and will solve the solution
- worst, Igor provide a database connection to handle by us this solution, to not do too much reverse engineering :)
 
Hey, congratulations on the 1000th post!

Here's an idea:
1) edit all server-wide php.ini files and make sure safe_mode and stuff are off;
2) use Plesk CLI utilities to remove any custom values for these directives (either domain or domain_pref, don't remember exactly);
3) call either php_settings --update-all or httpdmng --reconfigure-all to apply changes!
 
Tx Nikolay.
It is not what we can do as let's say advanced people, it is about thousand of servers who still suffer on this update :-(
We will need to offer to people a solution if PLESK guys will not do this in time.
Just I do not have enough time to do research in this and if anyone have more info, then we can get out Monday with a small PHP script to fix this issues.

I have found a possible downgrade offered by ART, here is the details. I will test it later today on one of our test server. https://www.atomicorp.com/wiki/index.php/Nucleus
 
Back
Top