Buy Now
Sign in

Unidentified index in /cegcore/libs/session.php on line 74

c
christian_wagner

Hi all,

Currently receiving this CRON error related to the form. I have done nothing to change it. Can anyone provide some clarity on this? My google searching has turned up empty. Thanks!

Undefined index: HTTP_USER_AGENT in /cegcore/libs/session.php on line 74

GreyHead

Hi Christian,

Is this showing up as a PHP Error, or just a Notice or Warning?

The code on Line 74 of that file is this

				$this->set('user.agent', $_SERVER['HTTP_USER_AGENT'], 'gcore__system');
				
I think that should use 'gcore__system' as a default value if $_SERVER['HTTP_USER_AGENT'] is not set - as it may not be by a Cron job.

Bob

ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much

c
christian_wagner

Hey Bob,

Thanks for the quick reply. I should elaborate. This error started happening after Siteground experienced a DoS attack yesterday.

Upon further inspection I see the CONTACT page has this above the form:

Notice: wpdb::escape is deprecated since version 3.6.0! Use wpdb::prepare() or esc_sql() instead. in wp-includes/functions.php on line 3831

Notice: date_default_timezone_set(): Timezone ID '' is invalid in /chronoforms/cegcore/libs/app_wp.php on line 181

Notice: wpdb::escape is deprecated since version 3.6.0! Use wpdb::prepare() or esc_sql() instead. in /wp-includes/functions.php on line 3831

GreyHead

Hi Christian,

It looks as though the PHP.ini file settings may have changed somehow. You need to check and change the Error Reporting level there. This WordPress doc should help.

Bob

ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much

c
christian_wagner

Thanks Bob, this worked.

For what it's worth, here's the current string in the /cegcore/libs/sessions.php file:

				protected function _validate(){
      $agent = $this->get('user.agent', null, 'gcore__system');
      if(is_null($agent)){
         $this->set('user.agent', $_SERVER['HTTP_USER_AGENT'], 'gcore__system');
         return true;
      }
      if($agent != $_SERVER['HTTP_USER_AGENT']){
         //incorrect agent
         $this->restart();