Page 1 of 1

Undefined index PHP error: remember_user

Posted: Wed Sep 02, 2009 10:31 pm
by MacJoyful
Script URL:
Version of script:2.1
Hosting company: U of M academic department - I'm the sys admin

URL of phpinfo.php: http://slc-admin3.scilabs.lsa.umich.edu ... myinfo.php

URL of session_test.php:
http://slc-admin3.scilabs.lsa.umich.edu ... n_test.php

What terms did you try when SEARCHING for a solution:
in forum: undefined index php error remember_user
Google: undefined index php error
Write your message below:
Undefined index: remember_user in /hesk/admin/index.php on line 137
Found this by googling:
So is a $_POST or another variable not defined correctly?

Here's the portion of the code that's being complained about:

Code: Select all

	/* Remember username? */
	if ($hesk_settings['autologin'] && $_POST['remember_user']=='AUTOLOGIN')
	{
		setcookie('hesk_username', "$user", strtotime('+1 year'));
		setcookie('hesk_p', "$pass_enc", strtotime('+1 year'));
	}
	elseif ($_POST['remember_user']=='JUSTUSER')
	{
		setcookie('hesk_username', "$user", strtotime('+1 year'));
		setcookie('hesk_p', '');
	}
	else
	{
		// Expire cookie if set otherwise
		setcookie('hesk_username', '');
		setcookie('hesk_p', '');
	}

Posted: Thu Sep 03, 2009 7:39 am
by Klemen
Hello,

These are just PHP notices, they are tuned off on most servers (and should be off on live servers). If you have Debug mode disabled these will never show to the third party visitors. HESK will still work completely normally.

To avoid them from being logged into the error log you can try adding

Code: Select all

error_reporting(E_ALL ^ E_NOTICE);
just below

Code: Select all

require(HESK_PATH . 'hesk_settings.inc.php');
in the admin/index.php file.


Alternatively you check inputs with isset first. In admin/index.php add this line of code

Code: Select all

if (!isset($_REQUEST['a'])) {$_REQUEST['a']='';} 
above line 47

Code: Select all

switch ($_REQUEST['a']) 
and this code

Code: Select all

if (!isset($_POST['remember_user'])) {$_POST['remember_user'] = false;}
below

Code: Select all

/* Remember username? */
In any way these functions will still be working properly and I do advise you to turn PHP notices off or you might get similar reports with many PHP scripts.

Error Reporting

Posted: Thu Sep 03, 2009 8:55 am
by MacJoyful
The server this is running on is not a production server although we are using a couple web apps in out day-to-day work. Basically we are trying them out to see how well or if they fit our work model.

Anyway is there a way to log critical errors vs. verbose. I did make some changes to the php.ini file which were intended to address these sorts of non-critical reports being logged. However, this apparently needs some fine tuning on my part. I will take a look at the php manual to try to get a better handle on the error reporting function of php.

This is a learning process. I am not a programmer by trade but of necessity. I have grown weary of spending thousands of dollars on commercial software and required maintenance contracts that really don't meet our needs or fit our work model.

I am using MRBS for room scheduling and possibly Hesk for help request tracking. The downside of using open source software is the need to quickly gain programming skills to better implement these solutions. However, the converse of this is that one gains skills which improve one's marketability which is never a bad thing.

So far my coworkers seem to like the tracking system. We look forward to a method for assigning requests.

Thank you for sharing and maintaining this script. It's pretty nifty.

Posted: Thu Sep 03, 2009 9:06 am
by Klemen
Try setting error_reporting in your php.ini file to

Code: Select all

error_reporting = E_ALL & ~E_NOTICE
That should do the trick.

Regards,
Klemen