abhi10kumar Posted March 2, 2013 Share Posted March 2, 2013 I integrated Login with FB and Twitter; but I'm getting error when I click Login in Facebook link Warning: Cannot modify header information - headers already sent by (output started at /home/delhioia/public_html/index.php:7) in /home/delhioia/public_html/facebook/index.php on line 12 check at http://delhicertificates.in/ /home/delhioia/public_html/facebook/index.php <?php //Always place this code at the top of the Page if (isset($_SESSION['id'])) { // Redirection to login page twitter or facebook header("location: home.php"); } if (array_key_exists("login", $_GET)) { $oauth_provider = $_GET['oauth_provider']; if ($oauth_provider == 'twitter') { header("Location: login-twitter.php"); } else if ($oauth_provider == 'facebook') { header("Location: login-facebook.php"); } } ?> <div style='padding-top:5px;'> <a href="?login&oauth_provider=twitter"><img src="../img/twitter_signin.png"></a><a href="?login&oauth_provider=facebook"><img src="../img/facebook_signin.png"></a> </div> /home/delhioia/public_html/index.php <?php session_start(); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head><title>Birth, Marriage, Domicile Certificates, Passport, Voter ID Card, Aadhar/UIDAI Card, Driving Licence in Delhi</title> <meta name="description" content="Find information, how to apply for Birth, Marriage, Domicile Certificates, Passport, Voter ID Card, Aadhar/UIDAI Card, Driving Licence issued by Delhi Govt."> <meta name="keywords" content="birth certificate, marriage, domicile certificate, passport, voter ID card, aadhar/UIDAI card, driving licence"> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> <meta name="google-site-verification" content="dZ_1PeO1D2NtRj0IamyazEPbRyAsOrpY33IHVI5TbyU" /> <link rel="stylesheet" type="text/css" href="style/style.css"> <script type="text/javascript" src="js/jquery-latest.js"></script> <script type="text/javascript" src="js/jquery.min.js"></script> </head> <style> li{padding-bottom:10px;} </style> <body> <!-- Page Content --> </body> </html> Link to comment https://forums.phpfreaks.com/topic/275113-cannot-modify-header-error/ Share on other sites More sharing options...
Christian F. Posted March 2, 2013 Share Posted March 2, 2013 Please see this post: http://forums.phpfreaks.com/topic/273121-readme-php-resources-faqs/?do=findComment&comment=1405508 Link to comment https://forums.phpfreaks.com/topic/275113-cannot-modify-header-error/#findComment-1415977 Share on other sites More sharing options...
abhi10kumar Posted March 2, 2013 Author Share Posted March 2, 2013 I knew all the stuffs and reason; but still not getting the desired result. I already tested all things like remove white spaces and flush functions; when I flush functions code do not run, Link to comment https://forums.phpfreaks.com/topic/275113-cannot-modify-header-error/#findComment-1415984 Share on other sites More sharing options...
Christian F. Posted March 3, 2013 Share Posted March 3, 2013 I'll give you a tip: Click on "view source", and take a look at what comes before the error message. You should have an epiphany then, as it seems you've misunderstood a very basic concept. Link to comment https://forums.phpfreaks.com/topic/275113-cannot-modify-header-error/#findComment-1416121 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.