473,395 Members | 1,474 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

This webpage has a redirect loop

ditditsasa
in my php page have the following error

The webpage at http://localhost/emr4all/multiclient/index.php has resulted in too many redirects. Clearing your cookies for this site or allowing third-party cookies may fix the problem. If not, it is possibly a server configuration issue and not a problem with your computer.

Expand|Select|Wrap|Line Numbers
  1. <code>$filename=$GLOBALS['OE_SITE_DIR'];
  2. if (file_exists($filename)) {
  3.     require_once($GLOBALS['OE_SITE_DIR'] . "/config.php");
  4. } else {
  5.  
  6.        //$_SESSION['multi'] = 1;
  7.        header("Location:/../emr4all/multiclient/index.php");
  8.   }</code>
the header cant redirect pls help me
Apr 11 '12 #1
4 3887
Marknut
42
Try adding exit after the header.

Expand|Select|Wrap|Line Numbers
  1. $filename=$GLOBALS['OE_SITE_DIR'];
  2. if (file_exists($filename)) {
  3. require_once($GLOBALS['OE_SITE_DIR'] . "/config.php");
  4. } else {
  5.  
  6. //$_SESSION['multi'] = 1;
  7. header("Location:/../emr4all/multiclient/index.php");
  8. exit;
  9. }
Apr 11 '12 #2
Rabbit
12,516 Expert Mod 8TB
Are you redirecting the page to itself? Why would you do that?
Apr 11 '12 #3
because login failure can redirect the login page
Apr 12 '12 #4
johny10151981
1,059 1GB
why dont you do the other way? if fail load the page without redirecting if succeed redirect to the desired page

The reason I am saying this is because: you will validate in this page, if fail you will give the log in window from the same page, if succeed you will redirect to different page.

but if this is like this that log in failed and you are reloading the same page without the uri, which would lead it to log in page, is really unnecessary
Apr 12 '12 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Jim | last post by:
Im getting way too many rows retured..what its trying to do is insert a 0 for revenue for months 7 - 12 (aka July through December) for each of these cost centers for each payor type..Im getting a...
8
by: Mark Constant | last post by:
I have a xslt file and it keeps giving me an EOF error when it reaches the point <xsl:for-each select="lc:Entertainment/lc:$Hardware"> and <xsl:for-each select="lc:Entertainment/lc:$Hardware"> ...
1
aprilmae36
by: aprilmae36 | last post by:
Nice day to all... I'm new in java programming and I'm having some problem with this program. The problem is this: Write a program that will read an unspecified number of non-zero integers and...
2
by: =?Utf-8?B?dG9ueSBsb2Nr?= | last post by:
Has anybody else noticed that this webpage freezes when viewed with IE7 on a wide screen (1920*1200) when IE7 is maximised. Or is it just me, using Vista Ultimate by the way.
3
by: jimgym1989 | last post by:
import java.io.*; import java.util.*; import java.lang.*; public class ArrayNo9 { static Scanner console = new Scanner(System.in); public static void main(Stringargs) { int...
3
by: ethan86 | last post by:
int tryagain; do{ String cur_cat; String msg=""; msg = "Select Category\n"; msg += "\n1. IT"; msg += "\n2. Geography"; msg += "\n3....
2
Steel546
by: Steel546 | last post by:
public static void main(String args) { double modArray= new double; for (int i =1, i < modArray.length(), i++){ modArray= (26*i+7)%31; }...
2
by: neogazz | last post by:
I have designed a webpage using XHTML, CSS and JavaScript. When I open this webpage on my computer I get the following message "Internet Explorer restricts this webpage running of a script or Active...
3
by: Chinthaka Shan | last post by:
http://www.eclecticenglish.com/grammar/PresentSimpleToBe1A.html
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.