Hi there,

I am trying to incorporate Advanced Login System into my site, but I keep getting errors such as:

Notice: Undefined index: REMOTE_HOST in /my_root_path/htdocs/login.inc.php on line 229

Notice: Undefined index: rmbpw in /my_root_path/htdocs/login.inc.php on line 102

Notice: Undefined variable: _SESSION in /my_root_path/htdocs/login.inc.php on line 51

Notice: Undefined index: HTTP_REFERER in /my_root_path/htdocs/login.inc.php on line 56

There is no problem with the system if I place it straight onto the server "as is". The problems started when I tried to include the main content of the login file as an "inc.php" file.

What I have done is taken the original index.php file of the system and placed
<?php include ('login.inc.php'); ?> so that the login system is included as a separate file. This gives me the file login.php, which has the style of the original site with the login form included in it. I think that maybe some code is conflicting from the original system with the login code.

Please see the attached txt files for the code, I cant post it here as it exceeds the post length.

Sorry about the huge amount of code. Just a note, I have 2 config files. One for the login.php file and one for the login.inc.php file. Could this cause the errors? I have done a lot of research on google the errors given are usually corrected by fixing the (isset($POST['login'])) to (isset($GET['login'])). I tried this but it didnt work.

If anyone can help I'd really appreciate this as its been driving me crazy at work for days now!

Regards
Jp

    Hey there

    Yeah I noticed that using :

    error_reporting(E_ALL ^ E_NOTICE);

    remvoes the notice reports.

    Is it not best to fix these though instead of ignore them?

      Is it not best to fix these though instead of ignore them?

      Yes. I am not sure why you have those problems in this case though.

        If your code makes reference to a variable without first defining it, you will get them.

          If your code makes reference to a variable without first defining it, you will get them.

          Yes, but in this case the warnings are coming up for things like $_SERVER['REMOTE_HOST'].

            Write a Reply...