Hi all,

We are running a Drupal 6 installation (everything up-to-date, including modules) with 1&1 and they recently requested that customers upgrade from PHP 4 to PHP 5.4. When I did this, a ton of stuff broke and we now receive 'strict warnings' all the time - have a look at the front page:

www.

We use views and a couple of other custom modules - and while it appears that I get most of the errors from 'Views' I also seem to get errors from other modules, e.g. 'Subscriptions'.

Any ideas how we can solve this?

Thanks so much

Comments

vasheck’s picture

Hi kga1978... I am experiencing the exact same problem. I have my hosting with 1&1 as well and switched to PHP 5.4.

Now, I am getting the following error.

strict warning: Non-static method view::load() should not be called statically in /mywebsite/sites/all/modules/views/views.module on line 906.
strict warning: Declaration of views_handler_filter::options_validate() should be compatible with views_handler::options_validate($form, &$form_state) in /mywebsite/sites/all/modules/views/handlers/views_handler_filter.inc on line 607.
strict warning: Declaration of views_handler_filter::options_submit() should be compatible with views_handler::options_submit($form, &$form_state) in /mywebsite/sites/all/modules/views/handlers/views_handler_filter.inc on line 607.
warning: Creating default object from empty value in /mywebsite/sites/all/modules/date/date/date.module on line 662.
strict warning: Only variables should be passed by reference in /mywebsite/sites/all/modules/date/date_api.module on line 866.
strict warning: Only variables should be passed by reference in /mywebsite/sites/all/modules/date/date_api.module on line 866.
strict warning: Only variables should be passed by reference in /mywebsite/sites/all/modules/date/date_api.module on line 866.
strict warning: Only variables should be passed by reference in /mywebsite/sites/all/modules/date/date_api.module on line 866.
strict warning: Only variables should be passed by reference in /mywebsite/sites/all/modules/date/date_api.module on line 866.
strict warning: Non-static method view::load() should not be called statically in /mywebsite/sites/all/modules/views/views.module on line 906.
warning: Creating default object from empty value in /mywebsite/sites/all/modules/date/date/date.module on line 662.
strict warning: Only variables should be passed by reference in /mywebsite/sites/all/modules/date/date_api.module on line 866.
strict warning: Only variables should be passed by reference in /mywebsite/sites/all/modules/date/date_api.module on line 866.
strict warning: Only variables should be passed by reference in /mywebsite/sites/all/modules/date/date_api.module on line 866.
strict warning: Only variables should be passed by reference in /mywebsite/sites/all/modules/date/date_api.module on line 866.

Any suggestions how to fix this would be greatly appreciated!

Thanks!

drupalfever’s picture

I am having the same problem on my development environment. It was very hard to update PHP to 5.4 because it has a new password encryption. As a result, all my Development Environment websites stopped working. When I finally overcame this problem, the websites are now showing these weird warning messages on every page.

    strict warning: Only variables should be passed by reference in /var/www/html/sites/all/modules/date/date_api.module on line 866.
    strict warning: Non-static method view::load() should not be called statically in /var/www/html/sites/all/modules/views/views.module on line 906.
    strict warning: Declaration of views_handler_filter::options_validate() should be compatible with views_handler::options_validate($form, &$form_state) in /var/www/html/sites/all/modules/views/handlers/views_handler_filter.inc on line 607.
    strict warning: Declaration of views_handler_filter::options_submit() should be compatible with views_handler::options_submit($form, &$form_state) in /var/www/html/sites/all/modules/views/handlers/views_handler_filter.inc on line 607.
    strict warning: Declaration of views_plugin_row::options_validate() should be compatible with views_plugin::options_validate(&$form, &$form_state) in /var/www/html/sites/all/modules/views/plugins/views_plugin_row.inc on line 134.
    strict warning: Declaration of views_plugin_row::options_submit() should be compatible with views_plugin::options_submit(&$form, &$form_state) in /var/www/html/sites/all/modules/views/plugins/views_plugin_row.inc on line 134.
    strict warning: Non-static method view::load() should not be called statically in /var/www/html/sites/all/modules/views/views.module on line 906.
    strict warning: Declaration of calendar_plugin_display_page::options_submit() should be compatible with views_plugin_display_page::options_submit(&$form, &$form_state) in /var/www/html/sites/all/modules/calendar/includes/calendar_plugin_display_page.inc on line 297.
    strict warning: Declaration of calendar_plugin_display_page::options() should be compatible with views_object::options() in /var/www/html/sites/all/modules/calendar/includes/calendar_plugin_display_page.inc on line 297.
    strict warning: Declaration of calendar_plugin_display_block::options() should be compatible with views_object::options() in /var/www/html/sites/all/modules/calendar/includes/calendar_plugin_display_block.inc on line 78.
    strict warning: Declaration of calendar_plugin_display_attachment::options_submit() should be compatible with views_plugin_display_attachment::options_submit(&$form, &$form_state) in /var/www/html/sites/all/modules/calendar/includes/calendar_plugin_display_attachment.inc on line 242.
    strict warning: Declaration of calendar_plugin_display_attachment::options() should be compatible with views_object::options() in /var/www/html/sites/all/modules/calendar/includes/calendar_plugin_display_attachment.inc on line 242.
    strict warning: Declaration of views_handler_filter_boolean_operator::value_validate() should be compatible with views_handler_filter::value_validate($form, &$form_state) in /var/www/html/sites/all/modules/views/handlers/views_handler_filter_boolean_operator.inc on line 159.
    strict warning: Declaration of date_api_filter_handler::value_validate() should be compatible with views_handler_filter::value_validate($form, &$form_state) in /var/www/html/sites/all/modules/date/includes/date_api_filter_handler.inc on line 591.
    strict warning: Only variables should be passed by reference in /var/www/html/sites/all/modules/date/date_api.module on line 866.
    strict warning: Only variables should be passed by reference in /var/www/html/sites/all/modules/date/date_api.module on line 866.
    strict warning: Only variables should be passed by reference in /var/www/html/sites/all/modules/date/date_api.module on line 866.
    strict warning: Only variables should be passed by reference in /var/www/html/sites/all/modules/date/date_api.module on line 866.
    strict warning: Only variables should be passed by reference in /var/www/html/sites/all/modules/date/date_api.module on line 866.
    strict warning: Only variables should be passed by reference in /var/www/html/sites/all/modules/date/date_api.module on line 866.
    strict warning: Only variables should be passed by reference in /var/www/html/sites/all/modules/date/date_api.module on line 866.
    strict warning: Only variables should be passed by reference in /var/www/html/sites/all/modules/date/date_api.module on line 866.
    strict warning: Only variables should be passed by reference in /var/www/html/sites/all/modules/date/date_api.module on line 866.
vm’s picture

running drupal 6 on PHP 5.4 is going to be hit or miss with regard to contrib modules. As the warnings are coming from the date.module you should be checking the date.module issue queue to aid in understanding if it has been updated to work with PHP 5.4.

also of note, if you haven't already requested drupal trademark permission you should read and abide by http://drupal.com/trademark

drupalfever’s picture

I read another discussion where they would advise not to update PHP to 5.4 on an environment where there are Drupal 6 or 7 websites. Drupal 6 & 7 does not currently give and will not give support for PHP 5.4 in the future. PHP 5.4 is for Drupal 8 only.

I already created a separate Development Environment specifically for Drupal 8 with PHP 5.4.

With regards to trademarks, I already read the trademark agreement page. I got nothing to worry about. My website falls under the AUTOMATIC LICENSE category. My website is a none profit entity created to disseminate and promote Drupal. The tutorials that I created are freely shared on YouTube.