Strange code error

Forum
Last Post
Threads / Messages

Kyris

Member
Member
Joined
Jan 21, 2011
Messages
34
Points
0
Mysidian Dollar
3,261
My site: iilura.com

It seems things are going ok, but there's this funny line at the top of my site;

PHP:
Notice: Undefined index: admin in /home/iilura/public_html/inc/functions.php on line 812

Notice: Undefined index: numberofqueries in /home/iilura/public_html/inc/functions.php on line 821

Notice: Undefined index: queries in /home/iilura/public_html/inc/functions.php on line 821

Help please? ^^
 
ETA:

There's tons more error codes popping all over the place, and I can't seem to access the admin control panel. It also seems to log me in and out every now and then.

When I log in, this appears;

PHP:
Notice: Undefined index: usersettings in /home/iilura/public_html/inc/functions.php on line 133

Notice: Undefined variable: usergroup in /home/iilura/public_html/inc/functions.php on line 134

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/iilura/public_html/inc/functions.php:133) in /home/iilura/public_html/inc/functions.php on line 21

Warning: Cannot modify header information - headers already sent by (output started at /home/iilura/public_html/inc/functions.php:133) in /home/iilura/public_html/login.php on line 79

Warning: Cannot modify header information - headers already sent by (output started at /home/iilura/public_html/inc/functions.php:133) in /home/iilura/public_html/login.php on line 80

Notice: Undefined variable: date in /home/iilura/public_html/login.php on line 100

Notice: Undefined index: usersettings in /home/iilura/public_html/inc/functions.php on line 805

Notice: Undefined index: admin in /home/iilura/public_html/inc/functions.php on line 812

Notice: Undefined index: numberofqueries in /home/iilura/public_html/inc/functions.php on line 821

Notice: Undefined index: queries in /home/iilura/public_html/inc/functions.php on line 821
 
Instead of messing with the script, I suggest that you set the error reporting not to display the Notice messages through php.ini
However, if you don't have access to edit the PHP configuration, then you can put this line on top of the functions.php file
PHP:
error_reporting(E_ALL ^ E_NOTICE);
For the Warning messages that are showing up, it's probably because the path to the session folder is incorrect, or it's not writable.
Again, you'll need to edit the php.ini, but if you can't try to use this code.
PHP:
// dir could be /home/user/session
// keep it OUT of webroot
ini_set("session.save_path", "/path/to/dir/with/chmod/777/perms");
Put the above code inside functions.php file before the session_start() is called.
 

Similar threads

Users who are viewing this thread

  • Forum Contains New Posts
  • Forum Contains No New Posts

Forum statistics

Threads
4,280
Messages
33,132
Members
1,603
Latest member
Monako
BETA

Latest Threads

Top