• The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Problem reactivate nginx

EnriqueR

Regular Pleskian
By reactivating nginx has left me the following error message:

The new configuration files for the Apache web server were not created due to errors in the configuration templates: Fatal error: Call to a member function isDefault () on a non-object in /usr/local/psa/admin/conf/templates/default/domainVhost.php. Detailed descriptions of the error has been sent to your email address. Please correct errors and click here to generate configuration files damaged or click here to generate all the configuration files again.

I clicked the 'generate all the configuration files' but I still get the message.
 
Hello Enrique,

As a PHP programmer that error basically indicates a missing function isDefault(). Basically this could be a result of an incomplete upgrade / update of your plesk control panel. (resulting to a missing file with the respective function defination)

Please again, try re-running the auto installer to upgrade plesk to any new current MUs. This will help copy the missing files to your server.
 
This error takes me a long time to appear. My Plesk is always updated to the latest version (currently # 33). For example, when I try to unlock some subscriptions show me the following error message:

ERROR: Call to a member function isDefault() on a non-object (Domain.php: 966)
 
Hi EnriqueR,

you have several option to "repair" Plesk. First of all, there is the "bootstrapper". Please use the command:

/usr/local/psa/bootstrapper/pp12.0.18-bootstrapper/bootstrapper.sh repair



If such a repair didn't help, consider using the command:

/usr/local/psa/admin/bin/autoinstaller --select-product-id plesk --select-release-current --reinstall-patch --install-component base

... to make sure, that all patches/updates/upgrades are successfully installed for your Plesk version.



As well, you can always try to use the autoinstaller, to remove and add features/addons with the commands:

/usr/local/psa/admin/bin/autoinstaller --select-product-id plesk --select-release-current --remove-component COMPONENTNAME

/usr/local/psa/admin/bin/autoinstaller --select-product-id plesk --select-release-current --install-component COMPONENTNAME

/usr/local/psa/admin/bin/autoinstaller --select-product-id plesk --select-release-current --install-everything

Please see the full command list for the autonstaller with the command:

/usr/local/psa/admin/bin/autoinstaller --help



If you still experience issues/problems/failures, please investigate logs and configuration files and post them, if you need help with it:

 
My Plesk is always updated to the latest version (currently # 33).

It's very common for plesk to break during an upgrade and it doesn't complete the importation of plesk files.

Also the error you are getting is a PHP related error. Its a plesk software related error and NOT your server or Nginx or Apache. And unless the respective PHP file with the definition of that function exists, you will always get the error.

You mentioned about taking a long time not seeing it, well chances are that is a brand new function whose file got missed out in your last update. Also, it could be that it takes you such a long time to run the actions you took that required that function.
 
/usr/local/psa/bootstrapper/pp12.0.18-bootstrapper/bootstrapper.sh repair

Bootstrap setup actions for Plesk 12.0.18

Usage: bootstrapper.sh <prep-install|post-install|rerun|perform-deferred-actions> [component|BASE]
bootstrapper.sh <repair|perform-deferred-actions>

Running 'bootstrapper.sh repair' with PLESK_INSTALLER_FAST_REPAIR=1 environment
variable set will skip some of the most time-consuming restore actions.

¿How can I run bootstrapper with PLESK_INSTALLER_FAST_REPAIR=0?
 
Hi EnriqueR,

you probably used "copy and paste", using the command "/usr/local/psa/bootstrapper/pp12.0.18-bootstrapper/bootstrapper.sh repair". As you can see in your next messages, your command failed, without any action and instead you were getting the help, how you should use the bootstrapper command. Please try to TYPE the command, to avoid invisible symbols, formats or spaces, which can result to such issues.

The bootstrapper repair will start immidiatly after your ( correct ) command is being confirmed with "enter/return" over the command line.
 
I have run the command and returns me the following result:

HTML:
START Bootstrapper 12.0.18 repair AT Fri Jan 30 15:34:12 CET 2015

**** Product repair started.

===> Checking for previous installation ... found.
Started bootstrapper repair procedure. This may take a while.
Certain actions may be skipped if not applicable.

Trying to start service mysqld... Se está ejecutando mysqld (pid  3959)...
done
Trying to establish test connection... connected
done
Trying to start service mysqld... Se está ejecutando mysqld (pid  3959)...
done
Trying to establish test connection... connected
done
Trying to find psa database... version is 012000018
Version is OK, no need to create psa database.
Trying to backup MySQL database... done
MySQL databases are dumped to /var/lib/psa/dumps/mysql.preupgrade.12.0.18-12.0.18.20150130-153413.dump.gz
Finishing up upgrade procedures and rerunning previously failed upgrade actions...
===> Cumulative APS controller database (apsc) upgrade and repair has been started.
Upgrade or repair for 'apsc' (stage 'prep') is not required
Trying to backup MySQL database... done
MySQL databases are dumped to /var/lib/psa/dumps/mysql.preupgrade.apsc.12.0.18-12.0.18.20150130-153416.dump.gz
===> Cumulative upgrade and repair of APS controller database has been completed.
Connection to APSC DB is possible
===> Cumulative APS controller upgrade and repair (final stage) has been started.
Upgrade or repair for 'apsc' (stage 'post') is not required
===> Cumulative upgrade and repair of APS controller (final stage) has been completed.
Trying to reset database user password for 'pma_aYREhA2enStB@'... done
===> Cumulative Plesk database upgrade and repair (revertable stage) has been started.
Upgrade or repair for 'core' (stage 'prep') is not required
===> Preparing Plesk database upgrade (revertable stage).

Trying to set psa database version to 012000018... done
===> Cumulative upgrade and repair of Plesk database (revertable stage) has been completed.
Database is up-to-date
===> Cumulative Plesk upgrade and repair (final stage) has been started.
Upgrade or repair for 'core' (stage 'post') is not required
===> Preparing Plesk upgrade (final stage).
===> Cumulative upgrade and repair of Plesk (final stage) has been completed.
Trying to upgrade and repair SpamAssassin service configuration... Upgrade or repair for 'spamassassin' (stage 'files') is not required
done
Trying to upgrade and repair Roundcube webmail configuration... done
Trying to upgrade Roundcube Web Based mail client configs and DB from '0.9.5' to '1.0.0'... PHP Warning:  Directive 'safe_mode' is deprecated in PHP 5.3 and greater in Unknown on line 0
PHP Warning:  ini_set(): SAFE MODE Restriction in effect.  The script whose uid is 0 is not allowed to access /var/log/plesk-roundcube/errors owned by uid 10077 in /usr/share/psa-roundcube/program/lib/Roundcube/rcube_config.php on line 158
PHP Warning:  finfo_file(): Unable to access /usr/share/psa-roundcube/installer/images/roundcube_logo.png in /usr/share/psa-roundcube/program/lib/Roundcube/rcube_mime.php on line 753
PHP Warning:  finfo_file(/usr/share/psa-roundcube/installer/images/roundcube_logo.png): failed to open stream: No such file or directory in /usr/share/psa-roundcube/program/lib/Roundcube/rcube_mime.php on line 753
WARNING: File type detection doesn't work properly!
Please check the 'mime_magic' config option or the finfo functions of PHP and run this script again.
WARNING: Mimetype to file extension mapping doesn't work properly!
Please check the 'mime_types' config option and run this script again.
Executing database schema update.
sh: /php: No such file or directory

Roundcube DB update failed.

WARNING!
Some problems are found during upgrade Roundcube Web Based mail client configs and DB from '0.9.5' to '1.0.0'. Run /usr/share/psa-roundcube/bin/update.sh manually to complete upgrade.(see log file: /var/log/plesk/install/plesk_12.0.18_repair.log)

Continue...

Trying to upgrade and repair Horde webmail configuration... Upgrade or repair for 'horde' (stage 'files') is not required
done
Trying to upgrade and repair Parallels Premium antivirus (DrWeb) service configuration (bootstrapper-prep stage)... Upgrade or repair for 'drweb' (stage 'bootstrapper-prep') is not required
done
Trying to upgrade and repair Parallels Premium antivirus (DrWeb) service configuration (bootstrapper-post stage)... Upgrade or repair for 'drweb' (stage 'bootstrapper-post') is not required
done
Trying to upgrade and repair Fail2Ban configuration (bootstrapper-prep stage)... Upgrade or repair for 'fail2ban' (stage 'bootstrapper-prep') is not required
done
Trying to upgrade and repair Fail2Ban configuration (bootstrapper-post stage)... Upgrade or repair for 'fail2ban' (stage 'bootstrapper-post') is not required
done
Trying to upgrade and repair Firewall service configuration... Upgrade or repair for 'firewall' (stage 'post') is not required
done
Reconfiguring mail subsystem...
Trying to execute mail_restore to synchronize mail server settings and Plesk Database... ==> Checking for: mailsrv_conf_init... ok
==> Checking for: mail_handlers_init... ok
==> Checking for: mailsrv_entities_dump... ok
==> Checking for: mail_admin_aliases... ok
==> Checking for: mail_auth_dump... ok
==> Checking for: mailman_lists_dump... ok
==> Checking for: mail_kav8_restore... ok
==> Checking for: mail_responder_restore... ok
==> Checking for: mail_imap_restore... ok
==> Checking for: mail_spam_restore... ok
==> Checking for: mail_grey_restore... ok
==> Checking for: mail_mailbox_restore... ok
==> Checking for: mail_spf_restore... ok
==> Checking for: mail_dk_restore... ok
==> Checking for: mail_drweb_restore... ok
==> Checking for: mail_outgoing_restore... ok
==> Checking for: mail_transport_restore... ok
done
Reconfiguring Apache web server...
Reconfiguring ProFTPD FTP server...
Reconfiguring AWStats web statistics...
Reconfiguring WatchDog...
Restoring SELinux contexts...
Regenerating web servers' configuration files...
Execution failed.
Command: httpdmng
Arguments: Array
(
    [0] => --reconfigure-domains
    [1] => multiple domains
)

Details: PHP Fatal error:  Call to a member function isDefault() on a non-object in /usr/local/psa/admin/plib/Smb/Plesk/Bridge/Domain.php on line 966

Warning: web server configuration is broken. We will try to repair it. This operation can take a lot of time, please do not interrupt the process.
Unable to rebuild web server configuration, possible there are broken domains
Trying to reconfigure web-server configurations skipping broken domains... Execution failed.
Command: httpdmng
Arguments: Array
(
    [0] => --reconfigure-domains
    [1] => domain.com
    [2] => -skip-broken
    [3] => -no-restart
)

Details: PHP Fatal error:  Call to a member function isDefault() on a non-object in /usr/local/psa/admin/plib/Smb/Plesk/Bridge/Domain.php on line 966


WARNING!
Some problems are found during reconfigure web-server configurations skipping broken domains(see log file: /var/log/plesk/install/plesk_12.0.18_repair.log)

Continue...

Cleaning active Panel sessions...

Bootstrapper repair finished.
If problems persist, please check installer logs ('/var/log/plesk/install/plesk_12.0.18_repair.log' and '/var/log/plesk/install/plesk_12.0.18_repair_problems.log') for errors.
If you can't resolve the issue on your own, please address Parallels support.

**** Product repair completed successfully.

STOP Bootstrapper 12.0.18 repair AT Fri Jan 30 15:39:27 CET 2015
 
Hi EnriqueR,

please download the patch "http://kb.odin.com/Attachments/kcs-31170/patch.tar.gz" from KB - article 121 844 ( http://kb.odin.com/121844 ). This patch includes the Plesk file "Domain.php".

The mentioned KB - article suggests the following procedure:
Code:
cd /root/
wget http://kb.odin.com/Attachments/kcs-31170/patch.tar.gz
tar zxvf /root/patch.tar.gz
mv /usr/local/psa/admin/plib/Smb/Plesk/Bridge/Domain.php /usr/local/psa/admin/plib/Smb/Plesk/Bridge/Domain.php.orig
mv /usr/local/psa/admin/plib/PHosting/Apache.php /usr/local/psa/admin/plib/PHosting/Apache.php.orig
cp /root/plib/Smb/Plesk/Bridge/Domain.php /usr/local/psa/admin/plib/Smb/Plesk/Bridge/Domain.php.orig
cp /root/plib/PHosting/Apache.php /usr/local/psa/admin/plib/PHosting/Apache.php
service php5-fpm restart


Due to the case, that you only would like to replace the "Domain.php", you could stick to this suggestion:

Code:
cd /root/
wget http://kb.odin.com/Attachments/kcs-31170/patch.tar.gz
tar zxvf /root/patch.tar.gz
mv /usr/local/psa/admin/plib/Smb/Plesk/Bridge/Domain.php /usr/local/psa/admin/plib/Smb/Plesk/Bridge/Domain.php.orig
cp /root/plib/Smb/Plesk/Bridge/Domain.php /usr/local/psa/admin/plib/Smb/Plesk/Bridge/Domain.php.orig
service php5-fpm restart
You could as well restart your Plesk Control Panel afterwards with the command: service psa restart ( or: /etc/init.d/psa restart )


After you copied the file "Domain.php", you could delete the downloaded patch and it's decompressed folder/files to clean up your system.


Please repeat the bootstrapper repair after your replacement and post the new log for further investigations.



To solve your "mime_type" - issue, you could have a look at the => KB - article 3505 <=, which might help - if it doesn't, please post again, what you did to solve the issue and please include as well your operating system and your used PHP - version on your system.
 
Now that is the problem:
Error: Unable to make action: Unable to manage service by nginxmng: PHP Fatal error: Call to undefined method Db_Table_Broker_Subscriptions::getDomainSubscription() in /usr/local/psa/admin/plib/Smb/Plesk/Bridge/Domain.php on line 828

This file is version 11.5 and I have the 12.0.18. Is it useful?

GenuineIntel, Intel(R) Xeon(R) CPU E5-2660 0 @ 2.20GHz
Parallels Plesk v12.0.18_build1200140606.15 os_CentOS 6
CentOS 6.2 (Final)
PHP 5.3.3
 
Last edited:
Hi EnriqueR,

I added my "Domain.php" - version, which was recently updated. Please try to use this one.
 

Attachments

  • Domain.php.zip
    39.4 KB · Views: 9
Enrique,

Please let us know if replacing that file helped solve the problem at hand ...

Thanks!
 
By replacing the file stops the error message and let me do certain things that did not let me before. But now I get this one:
Fatal error: Call to a member function isDefault() on a non-object in /usr/local/psa/admin/conf/templates/default/nginxDomainVhost.php

Also, when I have uninstalled nginx and I returned to install, surprisingly the file has replaced the original and now still gives me the same error.
 
Hi EnriqueR,

please post your "nginxDomainVhost.php" from the folder: /usr/local/psa/admin/conf/templates/default/
 
Hi EnriqueR,

please perform the following commands and let us know the output please:

Login to MySQL with: mysql -uadmin -p`cat /etc/psa/.psa.shadow`

you will now see something like:

Code:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is xxxxxx
Server version: .......

Please post your very own output in your next post for further investigations.

Please enter then: SHOW VARIABLES LIKE "%version%";
... and afterwards: STATUS;

... and post as well your very own outputs in your next post.


( to leave MySQL and get back to your command line, you can use the command "exit" ).
 
Finally we have found the problem. The problem resided in an inconsistency in the database.

mysql> SELECT `PhpSettings`.* FROM `PhpSettings` AS `PhpSettings` WHERE (((`PhpSettings`.`id` = 48)));
Empty set (0.00 sec)

mysql> insert into PhpSettings values (48,0);
Query OK, 1 row affected (0.00 sec)

After that we've re-enabled nginx and reconfigured domains. Working correctly :)
 
Code:
/usr/local/psa/bootstrapper/pp12.0.18-bootstrapper/bootstrapper.sh repair

Bootstrapper should have resolved the DB inconsistency. If it didn't then Parallels team @igor should check that out as a bug.
 
Back
Top