• 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

Resolved Cannot create hosting, php_handler error..

tkalfaoglu

Silver Pleskian
I created a new subscription and it defaulted to NO WEBSITE for some reason.
I clicked to change that, selected Website, filled out the form and was greeted with:

Error: DB query failed: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'php_handler_id' cannot be null, query was: replace hosting set `dom_id`='678', `sys_user_id`='612', `ssl`='false', `sslRedirect`='false', `ssi`='false', `php`='false', `php_handler_id`=NULL, `cgi`='false', `perl`='false', `python`='false', `fastcgi`='false', `asp`='false', `asp_dot_net`='false', `webstat`='none', `same_ssl`='true', `traffic_bandwidth`='-1', `max_connection`='-1', `www_root`='/var/www/vhosts/halukakgun.com/httpdocs', `certificate_id`='0'

Tried it twice using different ways (adding domain instead of subscription), and same problem..
Help, as usual it's urgent for the customer to create this hosting :(

-turgut
 
More Joy: When I go into Tools and Setttings -> PHP Settings, the list of handlers all show "this handler is corrupted" :


PHP Settings
Select the PHP handlers you want to make available. You can install additional handlers using the Plesk Installer.

7 items totalEntries per page: 10 25 100 All

Handler
Domains
warning.png
5.3.29 FastCGI application 105
warning.png
5.4.45 by OS vendor FastCGI application 59
warning.png
5.4.45 by OS vendor FPM application 2
warning.png
5.4.45 by OS vendor mod_php 279
warning.png
5.5.38 FastCGI application 1
warning.png
5.6.34 FastCGI application 3
warning.png
7.1.15 FastCGI application 1
7 items totalEntries per page: 10 25 100 All
 
Many thanks Igor, I had no idea there was a such command :)


Checking the Plesk database using the native database server tools .. [OK]

Checking the structure of the Plesk database

Extra table: helix ................................................ [WARNING]
Delete table 'helix'? [Y/n] y
Creating a database dump ........................................ [OK]
A dump of the database was created before an attempt to repair the database: /home/backup/dumps/mysql.preresolve.20180316-113355.dump.gz
Deleting table 'helix' .......................................... [FIXED]

Extra table: helix_asuser ......................................... [WARNING]
Delete table 'helix_asuser'? [Y/n] y
Deleting table 'helix_asuser' ................................... [FIXED]

Extra table: WordpressInstanceProperties .......................... [WARNING]
Delete table 'WordpressInstanceProperties'? [Y/n] y
Deleting table 'WordpressInstanceProperties' .................... [FIXED]

Extra table: WordpressInstances ................................... [WARNING]
Delete table 'WordpressInstances'? [Y/n] y
Deleting table 'WordpressInstances' ............................. [FIXED]

Extra table: WordpressInstancesDomains ............................ [WARNING]
Delete table 'WordpressInstancesDomains'? [Y/n] y
Deleting table 'WordpressInstancesDomains' ...................... [FIXED]

Checking the consistency of the Plesk database

Inconsistency in the table 'DomainServices' for the column dom_id:
No rows in the table 'domains' with = 84 ......................... [WARNING]
To see more details, run the command in the verbose mode: plesk repair db -verbose
Remove unnecessary rows from the table 'DomainServices'? [Y/n] y
Removing unnecessary rows ....................................... [FIXED]

Inconsistency in the table 'DomainServices' for the column dom_id:
No rows in the table 'domains' with = 278 ........................ [WARNING]
To see more details, run the command in the verbose mode: plesk repair db -verbose
Remove unnecessary rows from the table 'DomainServices'? [Y/n] y
Removing unnecessary rows ....................................... [FIXED]

Inconsistency in the table 'DomainServices' for the column dom_id:
No rows in the table 'domains' with = 519 ........................ [WARNING]
To see more details, run the command in the verbose mode: plesk repair db -verbose
Remove unnecessary rows from the table 'DomainServices'? [Y/n] y
Removing unnecessary rows ....................................... [FIXED]

Inconsistency in the table 'hosting' for the column dom_id: No rows
in the table 'domains' with = 278 ................................ [WARNING]
To see more details, run the command in the verbose mode: plesk repair db -verbose
Remove unnecessary rows from the table 'hosting'? [Y/n] y
Removing unnecessary rows ....................................... [FIXED]

Inconsistency in the table 'hosting' for the column dom_id: No rows
in the table 'domains' with = 519 ................................ [WARNING]
To see more details, run the command in the verbose mode: plesk repair db -verbose
Remove unnecessary rows from the table 'hosting'? [Y/n] y
Removing unnecessary rows ....................................... [FIXED]

Inconsistency in the table 'smb_users' for the column
subscriptionDomainId: No rows in the table 'domains' with = -1 (31
broken references) ................................................ [WARNING]
To see more details, run the command in the verbose mode: plesk repair db -verbose
Fix broken references in the table 'smb_users'? [Y/n] y
Fixing broken references ........................................ [FIXED]

Inconsistency in the table 'smb_users' for the column
subscriptionDomainId: No rows in the table 'domains' with = 48 ... [WARNING]
To see more details, run the command in the verbose mode: plesk repair db -verbose
Fix broken references in the table 'smb_users'? [Y/n] y
Fixing broken references ........................................ [FIXED]

Inconsistency in the table 'smb_users' for the column
subscriptionDomainId: No rows in the table 'domains' with = 58 (2
broken references) ................................................ [WARNING]
To see more details, run the command in the verbose mode: plesk repair db -verbose
Fix broken references in the table 'smb_users'? [Y/n] y
Fixing broken references ........................................ [FIXED]

Inconsistency in the table 'smb_users' for the column
subscriptionDomainId: No rows in the table 'domains' with = 94 (3
broken references) ................................................ [WARNING]
To see more details, run the command in the verbose mode: plesk repair db -verbose
Fix broken references in the table 'smb_users'? [Y/n] y
Fixing broken references ........................................ [FIXED]

Inconsistency in the table 'smb_users' for the column
subscriptionDomainId: No rows in the table 'domains' with = 371 (4
broken references) ................................................ [WARNING]
To see more details, run the command in the verbose mode: plesk repair db -verbose
Fix broken references in the table 'smb_users'? [Y/n] y
Fixing broken references ........................................ [FIXED]

Inconsistency in the table 'smb_users' for the column
subscriptionDomainId: No rows in the table 'domains' with = 479 .. [WARNING]
To see more details, run the command in the verbose mode: plesk repair db -verbose
Fix broken references in the table 'smb_users'? [Y/n] y
Fixing broken references ........................................ [FIXED]

Error messages: 0; Warnings: 16; Errors resolved: 16

BRB, I'll try to re-create that web site..
 
No luck. I just deleted the subscription, the domain and started over. I created a subscription, it created with no web hosting.
I changed it to hosting, and I got the same error..

Error: DB query failed: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'php_handler_id' cannot be null, query was: replace hosting set `dom_id`='680', `sys_user_id`='595', `ssl`='false', `sslRedirect`='false', `ssi`='false', `php`='false', `php_handler_id`=NULL, `cgi`='false', `perl`='false', `python`='false', `fastcgi`='false', `asp`='false', `asp_dot_net`='false', `webstat`='none', `same_ssl`='true', `traffic_bandwidth`='-1', `max_connection`='-1', `www_root`='/var/www/vhosts/halukakgun.com/httpdocs', `certificate_id`='0'
 
here is what mysql shows:

mysql> select id,name,displayName from domains where name like '%haluk%'\G;
*************************** 1. row ***************************
id: 680
name: halukakgun.com
displayName: halukakgun.com
1 row in set (0.00 sec)

ERROR:
No query specified

mysql> select type,host from dns_recs where host like "%haluk%";
+-------+-------------------------+
| type | host |
+-------+-------------------------+
| CNAME | www.halukakgun.com. |
| CNAME | lists.halukakgun.com. |
| A | halukakgun.com. |
| A | pop3.halukakgun.com. |
| TXT | _dmarc.halukakgun.com. |
| A | imap.halukakgun.com. |
| A | mail.halukakgun.com. |
| NS | halukakgun.com. |
| A | ipv4.halukakgun.com. |
| A | webmail.halukakgun.com. |
| MX | halukakgun.com. |
| CNAME | ftp.halukakgun.com. |
| A | ns.halukakgun.com. |
| TXT | halukakgun.com. |
| NS | halukakgun.com. |
| A | pop.halukakgun.com. |
| A | smtp.halukakgun.com. |
+-------+-------------------------+
17 rows in set (0.00 sec)

mysql>
 
GOT IT..
php_handlers_control --reread did the trick. (found it via google)

[root@pluto bin]# /usr/local/psa/bin/php_handler --list
id: display name: full version: version: type: cgi-bin: php-cli: php.ini: custom: status:
fastcgi 5.4.45 by OS vendor 5.4.45 5.4 fastcgi /usr/bin/php-cgi /usr/bin/php /etc/php.ini false broken
fpm 5.4.45 by OS vendor 5.4.45 5.4 fpm /usr/sbin/php-fpm /usr/bin/php /etc/php.ini false broken
module 5.4.45 by OS vendor 5.4.45 5.4 module /usr/bin/php-cgi /usr/bin/php /etc/php.ini false broken
plesk-php53-fastcgi 5.3.29 5.3.29 5.3 fastcgi /opt/plesk/php/5.3/bin/php-cgi /opt/plesk/php/5.3/bin/php /opt/plesk/php/5.3/etc/php.ini true broken
plesk-php55-fastcgi 5.5.38 5.5.38 5.5 fastcgi /opt/plesk/php/5.5/bin/php-cgi /opt/plesk/php/5.5/bin/php /opt/plesk/php/5.5/etc/php.ini true broken
plesk-php56-fastcgi 5.6.34 5.6.34 5.6 fastcgi /opt/plesk/php/5.6/bin/php-cgi /opt/plesk/php/5.6/bin/php /opt/plesk/php/5.6/etc/php.ini true broken
plesk-php71-fastcgi 7.1.15 7.1.15 7.1 fastcgi /opt/plesk/php/7.1/bin/php-cgi /opt/plesk/php/7.1/bin/php /opt/plesk/php/7.1/etc/php.ini true broken

[root@pluto bin]# /usr/local/psa/admin/bin/php_handlers_control --reread


[root@pluto bin]# /usr/local/psa/bin/php_handler --list
id: display name: full version: version: type: cgi-bin: php-cli: php.ini: custom: status:
plesk-php56-fpm 5.6.34 5.6.34 5.6 fpm /opt/plesk/php/5.6/sbin/php-fpm /opt/plesk/php/5.6/bin/php /opt/plesk/php/5.6/etc/php.ini true enabled
plesk-php55-fpm 5.5.38 5.5.38 5.5 fpm /opt/plesk/php/5.5/sbin/php-fpm /opt/plesk/php/5.5/bin/php /opt/plesk/php/5.5/etc/php.ini true enabled
plesk-php54-fastcgi 5.4.45 5.4.45 5.4 fastcgi /opt/plesk/php/5.4/bin/php-cgi /opt/plesk/php/5.4/bin/php /opt/plesk/php/5.4/etc/php.ini true enabled
plesk-php70-cgi 7.0.28 7.0.28 7.0 cgi /opt/plesk/php/7.0/bin/php-cgi /opt/plesk/php/7.0/bin/php /opt/plesk/php/7.0/etc/php.ini true disabled
cgi 5.4.45 by OS vendor 5.4.45 5.4 cgi /usr/bin/php-cgi /usr/bin/php /etc/php.ini false disabled
plesk-php71-fpm 7.1.15 7.1.15 7.1 fpm /opt/plesk/php/7.1/sbin/php-fpm /opt/plesk/php/7.1/bin/php /opt/plesk/php/7.1/etc/php.ini true enabled
plesk-php70-fpm 7.0.28 7.0.28 7.0 fpm /opt/plesk/php/7.0/sbin/php-fpm /opt/plesk/php/7.0/bin/php /opt/plesk/php/7.0/etc/php.ini true enabled
plesk-php56-fastcgi 5.6.34 5.6.34 5.6 fastcgi /opt/plesk/php/5.6/bin/php-cgi /opt/plesk/php/5.6/bin/php /opt/plesk/php/5.6/etc/php.ini true enabled
fpm 5.4.45 by OS vendor 5.4.45 5.4 fpm /usr/sbin/php-fpm /usr/bin/php /etc/php.ini false enabled
plesk-php52-cgi 5.2.17 5.2.17 5 cgi /opt/plesk/php/5.2/bin/php-cgi /opt/plesk/php/5.2/bin/php /opt/plesk/php/5.2/etc/php.ini true disabled
plesk-php71-fastcgi 7.1.15 7.1.15 7.1 fastcgi /opt/plesk/php/7.1/bin/php-cgi /opt/plesk/php/7.1/bin/php /opt/plesk/php/7.1/etc/php.ini true enabled
plesk-php53-cgi 5.3.29 5.3.29 5.3 cgi /opt/plesk/php/5.3/bin/php-cgi /opt/plesk/php/5.3/bin/php /opt/plesk/php/5.3/etc/php.ini true disabled
plesk-php53-fastcgi 5.3.29 5.3.29 5.3 fastcgi /opt/plesk/php/5.3/bin/php-cgi /opt/plesk/php/5.3/bin/php /opt/plesk/php/5.3/etc/php.ini true enabled
fastcgi 5.4.45 by OS vendor 5.4.45 5.4 fastcgi /usr/bin/php-cgi /usr/bin/php /etc/php.ini false enabled
plesk-php55-cgi 5.5.38 5.5.38 5.5 cgi /opt/plesk/php/5.5/bin/php-cgi /opt/plesk/php/5.5/bin/php /opt/plesk/php/5.5/etc/php.ini true disabled
plesk-php55-fastcgi 5.5.38 5.5.38 5.5 fastcgi /opt/plesk/php/5.5/bin/php-cgi /opt/plesk/php/5.5/bin/php /opt/plesk/php/5.5/etc/php.ini true enabled
plesk-php71-cgi 7.1.15 7.1.15 7.1 cgi /opt/plesk/php/7.1/bin/php-cgi /opt/plesk/php/7.1/bin/php /opt/plesk/php/7.1/etc/php.ini true disabled
plesk-php70-fastcgi 7.0.28 7.0.28 7.0 fastcgi /opt/plesk/php/7.0/bin/php-cgi /opt/plesk/php/7.0/bin/php /opt/plesk/php/7.0/etc/php.ini true enabled
plesk-php54-cgi 5.4.45 5.4.45 5.4 cgi /opt/plesk/php/5.4/bin/php-cgi /opt/plesk/php/5.4/bin/php /opt/plesk/php/5.4/etc/php.ini true disabled
module 5.4.45 by OS vendor 5.4.45 5.4 module /usr/bin/php-cgi /usr/bin/php /etc/php.ini false enabled
plesk-php54-fpm 5.4.45 5.4.45 5.4 fpm /opt/plesk/php/5.4/sbin/php-fpm /opt/plesk/php/5.4/bin/php /opt/plesk/php/5.4/etc/php.ini true enabled
plesk-php52-fastcgi 5.2.17 5.2.17 5 fastcgi /opt/plesk/php/5.2/bin/php-cgi /opt/plesk/php/5.2/bin/php /opt/plesk/php/5.2/etc/php.ini true enabled
plesk-php56-cgi 5.6.34 5.6.34 5.6 cgi /opt/plesk/php/5.6/bin/php-cgi /opt/plesk/php/5.6/bin/php /opt/plesk/php/5.6/etc/php.ini true disabled
[root@pluto bin]#
 
Back
Top