Cannot change subdomain PHP settings: Failed to updated ip. Can't set to addon domain ip different from webspace ip

Created:

2017-06-20 10:57:07 UTC

Modified:

2017-08-16 16:21:15 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Cannot change subdomain PHP settings: Failed to updated ip. Can't set to addon domain ip different from webspace ip

Applicable to:

  • Plesk Onyx for Linux

Symptoms

Cannot change the PHP settings for subdomains of example.com:

Failed to updated ip. Can't set to addon domain ip different from webspace ip

Solution from this article does not work.

Cause

Plesk database inconsistency.

Resolution

Back up Plesk database and fix the inconsistency:

1. Get the IDs of all *.example.com domains:

mysql> select id,name from domains where name like '%example.com%';

+-----+---------------------------+

| id  | name                      |

+-----+---------------------------+

| 832 | analytics.example.com     |

| 822 | example.com               |

| 834 | caffelatte.example.com    |

| 835 | dev.example.com           |

| 830 | fileshare.example.com     |

| 831 | gualtieri.example.com     |

| 833 | locator.example.com       |

| 829 | workflow.example.com      |

+-----+---------------------------+

8 rows in set (0.00 sec)

2. Get IP Collection IDs for all the domains:

mysql> select * from DomainServices where dom_id in (832,822,834,835,830,831,833,829);

+------+--------+------+--------+---------------+----------------+

| id  | dom_id | type | status | parameters_id | ipCollectionId |

+------+--------+------+--------+---------------+----------------+

| 1335 |    822 | mail |      0 |          1384 |          1335 |

| 1336 |    822 | web  |      0 |            0 |          1336 |

| 1343 |    829 | web  |      0 |            0 |          1343 |

| 1344 |    830 | web  |      0 |            0 |          1344 |

| 1345 |    831 | web  |      0 |            0 |          1345 |

| 1346 |    832 | web  |      0 |            0 |          1346 |

| 1347 |    833 | web  |      0 |            0 |          1347 |

| 1348 |    834 | web  |      0 |            0 |          1348 |

| 1349 |    835 | web  |      0 |            0 |          1349 |

+------+--------+------+--------+---------------+----------------+

9 rows in set (0.00 sec)

3. get IP address IDs for the IP collections:

mysql> select * from IpAddressesCollections where ipCollectionId in (1346,1335,1336,1348,1349,1344,1345,1347,1343);

+----------------+-------------+

| ipCollectionId    |  ipAddressId |

+----------------+-------------+

|           1335 |           1 |

|           1336 |           3 |

|           1343 |           1 |

|           1344 |           1 |

|           1345 |           1 |

|           1346 |           1 |

|           1347 |           1 |

|           1348 |           1 |

|           1349 |           1 |

+----------------+-------------+

9 rows in set (0.00 sec)

4. Get the IP addresses:

mysql> select id,ip_address from ip_addresses where id in (1,3);

+----+----------------+

| id | ip_address |

+----+----------------+

|  3  |  203.0.113.2  |

|  1  |  203.0.113.5  |

+----+----------------+

5. check the DNS resolution and IPs in Plesk Control Panel:

[root@jumper ~]# ping example.com

PING example.com (203.0.113.2) 56(84) bytes of data.

[root@jumper ~]# ping workflow.example.com

PING workflow.example.com (203.0.113.2) 56(84) bytes of data.

[root@jumper ~]# ping locator.example.com

PING locator.example.com (203.0.113.2) 56(84) bytes of data.

...

6. Set the correct IP address ID:

mysql> update IpAddressesCollections set ipAddressId=3 where ipCollectionId in (1346,1335,1336,1348,1349,1344,1345,1347,1343);

Query OK, 1 row affected (0.00 sec)

Rows matched: 1  Changed: 1  Warnings: 0

Have more questions? Submit a request
Please sign in to leave a comment.