Quinton Dunbar Jersey PHP warning

PHP warning

Cannot modify header information - headers already sent by (output started at /home/lienfoun/public_html/adifferentclass.sg/index.php:2)

/home/lienfoun/public_html/adifferentclass.sg/protected/extensions/yii-hybridauth/src/Auth.php(351)

339     }
340 
341     // --------------------------------------------------------------------
342 
343     /**
344     * Utility function, redirect to a given URL with php header or using javascript location.href
345     */
346     public static function redirect( $url, $mode = "PHP" )
347     {
348         Hybrid_Logger::info( "Enter Hybrid_Auth::redirect( $url, $mode )" );
349 
350         if( $mode == "PHP" ){
351             header( "Location: $url" ) ;
352         }
353         elseif( $mode == "JS" ){
354             echo '<html>';
355             echo '<head>';
356             echo '<script type="text/javascript">';
357             echo 'function redirect(){ window.top.location.href="' . $url . '"; }';
358             echo '</script>';
359             echo '</head>';
360             echo '<body onload="redirect()">';
361             echo 'Redirecting, please wait...';
362             echo '</body>';
363             echo '</html>'; 

Stack Trace

#0
+
 /home/lienfoun/public_html/adifferentclass.sg/protected/extensions/yii-hybridauth/src/Auth.php(351): header("Location: http://adifferentclass.sg/site/social?hauth.start=Face...")
346     public static function redirect( $url, $mode = "PHP" )
347     {
348         Hybrid_Logger::info( "Enter Hybrid_Auth::redirect( $url, $mode )" );
349 
350         if( $mode == "PHP" ){
351             header( "Location: $url" ) ;
352         }
353         elseif( $mode == "JS" ){
354             echo '<html>';
355             echo '<head>';
356             echo '<script type="text/javascript">';
#1
+
 /home/lienfoun/public_html/adifferentclass.sg/protected/extensions/yii-hybridauth/src/Provider_Adapter.php(143): Hybrid_Auth::redirect("http://adifferentclass.sg/site/social?hauth.start=Facebook&hauth...")
138         Hybrid_Auth::storage()->config( "CONFIG", Hybrid_Auth::$config );
139 
140         // move on
141         Hybrid_Logger::debug( "Hybrid_Provider_Adapter::login( {$this->id} ), redirect the user to login_start URL." );
142 
143         Hybrid_Auth::redirect( $this->params["login_start"] );
144     }
145 
146     // --------------------------------------------------------------------
147 
148     /**
#2
+
 /home/lienfoun/public_html/adifferentclass.sg/protected/extensions/yii-hybridauth/src/Auth.php(217): Hybrid_Provider_Adapter->login()
212         if( ! Hybrid_Auth::storage()->get( "hauth_session.$providerId.is_logged_in" ) ){ 
213             Hybrid_Logger::info( "Hybrid_Auth::authenticate( $providerId ), User not connected to the provider. Try to authenticate.." );
214 
215             $provider_adapter = Hybrid_Auth::setup( $providerId, $params );
216 
217             $provider_adapter->login();
218         }
219 
220         // else, then return the adapter instance for the given provider
221         else{
222             Hybrid_Logger::info( "Hybrid_Auth::authenticate( $providerId ), User is already connected to this provider. Return the adapter instance." );
2019-03-23 00:45:16 Apache Yii Framework/1.1.14