CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • Error after installation: Strict warning: Non-static method CRM_Core
Pages: [1]

Author Topic: Error after installation: Strict warning: Non-static method CRM_Core  (Read 11162 times)

jan_

  • I’m new here
  • *
  • Posts: 1
  • Karma: 0
  • CiviCRM version: 4.2
  • CMS version: Drupal 7
  • MySQL version: 5.5.27
  • PHP version: 5.4.7
Error after installation: Strict warning: Non-static method CRM_Core
October 14, 2012, 03:17:33 am
Trying to install latest version on my localhost, i get the following errors:
Quote
    Strict warning: Non-static method CRM_Core_Block::setTemplateValues() should not be called statically in CRM_Core_Block::setTemplateValues() (regel 587 van C:\xampp\htdocs\crm\sites\all\modules\civicrm\CRM\Core\Block.php).
    Strict warning: Non-static method CRM_Core_Block::setTemplateShortcutValues() should not be called statically in CRM_Core_Block::setTemplateShortcutValues() (regel 287 van C:\xampp\htdocs\crm\sites\all\modules\civicrm\CRM\Core\Block.php).
    Strict warning: Non-static method CRM_Core_Block::setTemplateValues() should not be called statically in CRM_Core_Block::setTemplateValues() (regel 587 van C:\xampp\htdocs\crm\sites\all\modules\civicrm\CRM\Core\Block.php).
    Strict warning: Non-static method CRM_Core_Block::setTemplateValues() should not be called statically in CRM_Core_Block::setTemplateValues() (regel 587 van C:\xampp\htdocs\crm\sites\all\modules\civicrm\CRM\Core\Block.php).
    Strict warning: Non-static method CRM_Core_Block::setTemplateDashboardValues() should not be called statically in CRM_Core_Block::setTemplateDashboardValues() (regel 291 van C:\xampp\htdocs\crm\sites\all\modules\civicrm\CRM\Core\Block.php).
    Strict warning: Non-static method CRM_Core_Block::setTemplateValues() should not be called statically in CRM_Core_Block::setTemplateValues() (regel 587 van C:\xampp\htdocs\crm\sites\all\modules\civicrm\CRM\Core\Block.php).
    Strict warning: Non-static method CRM_Core_Block::setTemplateValues() should not be called statically in CRM_Core_Block::setTemplateValues() (regel 587 van C:\xampp\htdocs\crm\sites\all\modules\civicrm\CRM\Core\Block.php).

and
Quote
    Strict warning: Non-static method HTML_QuickForm_RuleRegistry::singleton() should not be called statically, assuming $this from incompatible context in HTML_QuickForm->registerRule() (regel 388 van C:\xampp\htdocs\crm\sites\all\modules\civicrm\packages\HTML\QuickForm.php).
    Strict warning: Non-static method HTML_QuickForm_RuleRegistry::singleton() should not be called statically, assuming $this from incompatible context in HTML_QuickForm->registerRule() (regel 388 van C:\xampp\htdocs\crm\sites\all\modules\civicrm\packages\HTML\QuickForm.php).
    Strict warning: Non-static method HTML_QuickForm_RuleRegistry::singleton() should not be called statically, assuming $this from incompatible context in HTML_QuickForm->registerRule() (regel 388 van C:\xampp\htdocs\crm\sites\all\modules\civicrm\packages\HTML\QuickForm.php).
    Strict warning: Non-static method HTML_QuickForm_RuleRegistry::singleton() should not be called statically, assuming $this from incompatible context in HTML_QuickForm->registerRule() (regel 388 van C:\xampp\htdocs\crm\sites\all\modules\civicrm\packages\HTML\QuickForm.php).
    Strict warning: Non-static method HTML_QuickForm_RuleRegistry::singleton() should not be called statically, assuming $this from incompatible context in HTML_QuickForm->registerRule() (regel 388 van C:\xampp\htdocs\crm\sites\all\modules\civicrm\packages\HTML\QuickForm.php).
    Strict warning: Non-static method HTML_QuickForm_RuleRegistry::singleton() should not be called statically, assuming $this from incompatible context in HTML_QuickForm->registerRule() (regel 388 van C:\xampp\htdocs\crm\sites\all\modules\civicrm\packages\HTML\QuickForm.php).
    Strict warning: Non-static method HTML_QuickForm_RuleRegistry::singleton() should not be called statically, assuming $this from incompatible context in HTML_QuickForm->registerRule() (regel 388 van C:\xampp\htdocs\crm\sites\all\modules\civicrm\packages\HTML\QuickForm.php).
    Strict warning: Non-static method HTML_QuickForm_RuleRegistry::singleton() should not be called statically, assuming $this from incompatible context in HTML_QuickForm->registerRule() (regel 388 van C:\xampp\htdocs\crm\sites\all\modules\civicrm\packages\HTML\QuickForm.php).
    Strict warning: Non-static method HTML_QuickForm_RuleRegistry::singleton() should not be called statically, assuming $this from incompatible context in HTML_QuickForm->registerRule() (regel 388 van C:\xampp\htdocs\crm\sites\all\modules\civicrm\packages\HTML\QuickForm.php).
    Strict warning: Non-static method HTML_QuickForm_RuleRegistry::singleton() should not be called statically, assuming $this from incompatible context in HTML_QuickForm->registerRule() (regel 388 van C:\xampp\htdocs\crm\sites\all\modules\civicrm\packages\HTML\QuickForm.php).
    Strict warning: Non-static method HTML_QuickForm_RuleRegistry::singleton() should not be called statically, assuming $this from incompatible context in HTML_QuickForm->registerRule() (regel 388 van C:\xampp\htdocs\crm\sites\all\modules\civicrm\packages\HTML\QuickForm.php).
    Strict warning: Non-static method HTML_QuickForm_RuleRegistry::singleton() should not be called statically, assuming $this from incompatible context in HTML_QuickForm->registerRule() (regel 388 van C:\xampp\htdocs\crm\sites\all\modules\civicrm\packages\HTML\QuickForm.php).
    Strict warning: Non-static method HTML_QuickForm_RuleRegistry::singleton() should not be called statically, assuming $this from incompatible context in HTML_QuickForm->registerRule() (regel 388 van C:\xampp\htdocs\crm\sites\all\modules\civicrm\packages\HTML\QuickForm.php).
   
 (...)

any suggestions?

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Error after installation: Strict warning: Non-static method CRM_Core
October 14, 2012, 04:10:48 am
CiviCRM is not guaranteed to work with PHP 5.4. I believe you're seeing this messages due to PHP 5.4
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Error after installation: Strict warning: Non-static method CRM_Core
October 14, 2012, 09:06:10 am

fix your php.ini to suppress E_STRICT messages.

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

hiweed

  • I’m new here
  • *
  • Posts: 1
  • Karma: 0
  • CiviCRM version: 4.2.2
  • CMS version: Drupal 7.15
  • MySQL version: 5.5.24
  • PHP version: 5.4.4
Re: Error after installation: Strict warning: Non-static method CRM_Core
October 16, 2012, 01:12:55 am
In /etc/php5/apache2/php.ini, it's:
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
However, strict warnings still appear.

I'm using CiviCRM 4.2.2 and Debian Wheezy (PHP 5.4.4, Mysql 5.5.24, Apache 2.2.22).

donquixote

  • I post occasionally
  • **
  • Posts: 42
  • Karma: 3
  • CiviCRM version: none
  • CMS version: Drupal
  • MySQL version: 5
  • PHP version: 5.2
Re: Error after installation: Strict warning: Non-static method CRM_Core
November 15, 2012, 08:30:34 pm
I think this is not cool.
I also updated to PHP 5.4 recently, and I think more people will do, soon.
What can we do? Change those functions to static?
Probably QuickForm is a dead horse, and it doesn't really hurt to hack it?

donquixote

  • I post occasionally
  • **
  • Posts: 42
  • Karma: 3
  • CiviCRM version: none
  • CMS version: Drupal
  • MySQL version: 5
  • PHP version: 5.2
Re: Error after installation: Strict warning: Non-static method CRM_Core
November 15, 2012, 09:05:14 pm
Ok, I can say:
A lot of the places with methods that are called static can be fixed.
However, there are some other PHP 5.4 issues which cannot be fixed that easily.
So maybe the PHP settings are still the preferable option?

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Error after installation: Strict warning: Non-static method CRM_Core
November 16, 2012, 08:03:50 am

Civi 4.3 will work with PHP 5.4. Howeveri suspect we will not be able to eliminate all the STRICT warnings, though that is the next step in the process

if you can start submitted patches to get rid of the STRICT warnings that would be great :)

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

phani

  • I’m new here
  • *
  • Posts: 28
  • Karma: 3
    • namahatta.org DB
Re: Error after installation: Strict warning: Non-static method CRM_Core
March 15, 2013, 02:18:31 am
i've started using CiviCRM again after a really long time and came across these STRICT warnings.

i've managed to get rid of them on PHP 5.4 by simply adding "static" to the functions called, and adding  a couple additional variables to functions in two or three places. i must admit that i'm not really sure if or how these newly 'static' functions affect things overall, and before i start putting this into patches, i want to ask if that's the way this is supposed to be fixed? seems a little too easy, somehow...

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Error after installation: Strict warning: Non-static method CRM_Core
March 15, 2013, 10:50:20 am

You should use the 4.3 version which is in beta3 right now.

We've fixed a fair bit / most of the strict warnings and notices from php 5.4

if u want to be on 4.2, just suppress the strict warnings in drupal admin and/or php.ini

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

phani

  • I’m new here
  • *
  • Posts: 28
  • Karma: 3
    • namahatta.org DB
Re: Error after installation: Strict warning: Non-static method CRM_Core
March 15, 2013, 08:28:01 pm
switching off via php.ini doesn't work, for some reason. doesn't bother me though, since on my production server i can choose PHP 5.3. it's only my local archlinux that's on 5.4 and i don't want to go through the trouble of installing an alternative version.

just thought that since i did hack those files for me locally, i could share that if it was useful. not figuring out how exactly to write CiviCRM patches sounds rather good, unless i have to.

The Next Wave

  • I post occasionally
  • **
  • Posts: 111
  • Karma: -9
  • I'm just here to change the world.
  • CiviCRM version: 4.4.4
  • CMS version: Wordpress 3.8.1
  • MySQL version: 5.1.72-cll
  • PHP version: 5.4.25
Re: Error after installation: Strict warning: Non-static method CRM_Core
June 10, 2013, 02:45:56 pm
So is civi 4.3.3 ready for PHP 5.4?
No one seems to have said anything lately- and cpanel never made it to 5.3.3 for php- stopping at 5.3.26

need to know.

MarkDQ

  • I’m new here
  • *
  • Posts: 5
  • Karma: 0
  • CiviCRM version: 4.6.0
  • CMS version: Drupal 7.35
  • MySQL version: 5.5.41
  • PHP version: 5.4.38
Re: Error after installation: Strict warning: Non-static method CRM_Core
April 09, 2015, 12:41:12 pm
The last post is dated June 10, 2013, but I got "strict warnings" today (the real account name is replaced by <account name>):
Strict warning: Non-static method CRM_Core_BAO_UFGroup::checkFieldsEmptyValues() should not be called statically, assuming $this from incompatible context in CRM_Profile_Form->postProcess() (regel 1315 van /var/www/htdocs/<accountname>/public/sites/all/modules/civicrm/CRM/Profile/Form.php).


using
- php 5.4.38
- drupal 7.35
- civiCRM 4.6.0

so, still having to change php.ini as suggested in previous posts?


Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • Error after installation: Strict warning: Non-static method CRM_Core

This forum was archived on 2017-11-26.