The page isn't redirecting properly

Hi Experts,

I've just uploaded a PHP code that works on my localhost, but on the server FF gives me:

The page isn't redirecting properly

Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

    This problem can sometimes be caused by disabling or refusing to accept cookies.


IE just hangs.

The code behind this is
  $user = $_POST['txtUser'];
        $password = $_POST['txtPassword'];
        $login_status = Login::verify_login($user, $password);
    
        if ($login_status == 'admin') {
            header('Location: index.php?action=list');
        } 
        else if ($login_status == 'rs') {
            header('Location: ../dispatch');
        } 
        else {
            header('Location: ../?type=err&msg=User Id / Password combination not found.');
        }
      

Open in new window


What could it be?  Again, under localhost, no issues..
APD TorontoSoftware DeveloperAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

gr8gonzoConsultantCommented:
Always add a die() underneath header() lines that redirect the Location. Not sure if it's relevant, but it'll avoid continuing to run the script, which could introduce unexpected behavior.
0
APD TorontoSoftware DeveloperAuthor Commented:
Still happening
0
gr8gonzoConsultantCommented:
Install Fiddler if you don't already have it installed, then turn it on to start capturing requests and reproduce the problem. It should tell you all the redirects that are happening.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Challenges in Government Cyber Security

Has cyber security been a challenge in your government organization? Are you looking to improve your government's network security? Learn more about how to improve your government organization's security by viewing our on-demand webinar!

APD TorontoSoftware DeveloperAuthor Commented:
Fiddler?
0
Dave BaldwinFixer of ProblemsCommented:
In this one...
header('Location: ../?type=err&msg=User Id / Password combination not found.');

Open in new window

'/' is not a 'legal' character in a query string.  It must be urlencoded or percent encoded.  %2F
header('Location: ../?type=err&msg=User Id %2F Password combination not found.');

Open in new window

0
Dave BaldwinFixer of ProblemsCommented:
Fiddler - network debugging tool.
http://www.telerik.com/fiddler
0
APD TorontoSoftware DeveloperAuthor Commented:
Thanks
0
Dave BaldwinFixer of ProblemsCommented:
You're welcome!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.