• 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
  • Inviting everyone to the UX test of a new security feature in the WP Toolkit
    For WordPress site owners, threats posed by hackers are ever-present. Because of this, we are developing a new security feature for the WP Toolkit. If the topic of WordPress website security is relevant to you, we would be grateful if you could share your experience and help us test the usability of this feature. We invite you to join us for a 1-hour online session via Google Meet. Select a convenient meeting time with our friendly UX staff here.

PHP settings broken with error: Call to a member function isDefault() on null (Domain.php:748)

Dan Mikkelsen

Basic Pleskian
I have plesk 12.5 on debian 7.5, and after I just tried adding a reseller and moved a customer to this account, I get several errors, and afterwards I cant open the PHP settings when logged in as the customer.
After checking around some of the knowledge base, it seemed like a faulty php setting ID, but in the plesk database, the domain doesn't have the phpconfigurationID at all.

All I get is the ERROR: Call to a member function isDefault() on null (Domain.php:748)
If I try to change the subscription I just get a new error for the function.
In the Webserver Configurations Troubleshooter i see there is an error for the domain, and it tells me "Configuration scheduled and not applied", but it cannot rebuild it or fix it in anyway.
What can I do? I already tried doing a restore of the domain, but to no help.
 
What is output of following SQL query:

select d.name, sp.name, sp.value from domains d, Subscriptions s, SubscriptionProperties sp where d.id=s.object_id and s.Object_type='domain' and s.id=sp.subscription_id and sp.name='phpSettingsId' and d.name='yourdomain.com';

?
 
Ok. Fix it with

mysql> insert into PhpSettings values (15,0);
mysql> insert into PhpSettings values (8,0);
 
Arh nice! this finally worked thank you!! I did found a KB article, but it didn't found the PhpSettingsID for me!

But what could have coursed this error, and could I expect other errors I need to examine?
 
Do you have any warnings/errors in output of

# plesk repair db

?
 
I'm a little bit scared of running that command since things just broke all of the sudden earlier :/
But does it only write to the database, so that all i need is a backup of it to restore?
 
With -n option it will check database only, without repairing.

# plesk repair db -n
 
Back
Top