close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Error Redirect Protected Login page

Thread began 9/26/2019 7:00 pm by erinlima318673 | Last modified 10/01/2019 3:57 pm by Ray Borduin | 93 views | 17 replies |

erinlima318673

Error Redirect Protected Login page

Recently upgraded to PHP 5.6 (not sure if this is why I am now having these issues) and Login Page for my Protected Pages is throwing an error:

Warning: Cannot modify header information - headers already sent by (output started at /home/content/29/8748029/html/protected_LogIn.php:5) in /home/content/29/8748029/html/WA_SecurityAssist/Helper_PHP.php on line 37

Line 37 of Helper_PHP.php starts with the word "header" in the following function:

if($WA_Auth_Parameter["successRedirect"]!=""){
$WA_Auth_Parameter["successRedirect"] = WA_Auth_BuildRedirectURL($WA_Auth_Parameter["successRedirect"], $WA_Auth_Parameter["keepQueryString"], FALSE);
header("Location: ".$WA_Auth_Parameter["successRedirect"]);
exit();
}

These pages have worked great for a number of years and only just today started having issues.

Sign in to reply to this post

Ray BorduinWebAssist

The source of the problem is on protected_LogIn.php line 5.

Sign in to reply to this post

erinlima318673

Error Redirect Protected Login page

This post has been deleted.

erinlima318673

Line 5 of my login page is: <?php require_once('Connections/conn_inventory.php'); ?>

Not sure how my DB connection file is causing the error. HELP!

I have reinstalled the full DataAssist V2 package, tried to recreate my protected login pages 5 times, and I am still getting the same error messages. The login page upon clicking the login button still throws the similar error messages:

Warning: Cannot modify header information - headers already sent by (output started at /home/content/29/8748029/html/Connections/conn_inventory.php:10) in /home/content/29/8748029/html/login2.php on line 23

Warning: Cannot modify header information - headers already sent by (output started at /home/content/29/8748029/html/Connections/conn_inventory.php:10) in /home/content/29/8748029/html/login2.php on line 27

Warning: Cannot modify header information - headers already sent by (output started at /home/content/29/8748029/html/Connections/conn_inventory.php:10) in /home/content/29/8748029/html/login2.php on line 39

Warning: Cannot modify header information - headers already sent by (output started at /home/content/29/8748029/html/Connections/conn_inventory.php:10) in /home/content/29/8748029/html/login2.php on line 43

Warning: Cannot modify header information - headers already sent by (output started at /home/content/29/8748029/html/Connections/conn_inventory.php:10) in /home/content/29/8748029/html/WA_SecurityAssist/Helper_PHP.php on line 37

I see that the error message is pointing to line 10 of my DB connection; line 10 is:

$conn_inventory = mysql_pconnect($hostname_conn_inventory, $username_conn_inventory, $password_conn_inventory) or trigger_error(mysql_error(),E_USER_ERROR);

These pages had been working great for about 6 years, but only just started throwing error messages when we upgraded to PHP 5.6 2 days ago.

I would greatly appreciate your expertise in getting this resolved.

Sign in to reply to this post

Ray BorduinWebAssist

You probably have error_display turned on in your php.ini file. That line would produce a deprecated message warning you that it won't work once you update to php 7. You may have to turn off deprecated messages (it won't effect the functionality of the page). That will prevent it from printing the error and allow the redirect to proceed.

If you give me FTP access and a URL with steps to reproduce the error I could try turning off deprecated messages on the page to confirm that is the cause.

Sign in to reply to this post

erinlima318673

I used the following code you provided to another user who was having the same "deprecated" error messages on all my pages:

<?php
error_reporting(E_ALL & ~E_DEPRECATED & ~E_NOTICE);
?>

which is why line 5 on all my pages is:

<?php require_once('Connections/conn_inventory_i.php'); ?>

The deprecated messages no longer appear, however, every one of my pages is throwing up at least one error message saying:

Warning: Cannot modify header information - headers already sent by (output started at /home/content/29/8748029/html/anypagename.php:5) in /home/content/29/8748029/html/WA_SecurityAssist/Helper_PHP.php on line XX

(where XX = whatever line in the Helper_PHP.php file, and anypage.php:5 all point to the "<?php require_once('Connections/conn_inventory_i.php'); ?>")

Why is my db connection file causing an error saying "header already sent"?

HELP!

Sign in to reply to this post

Ray BorduinWebAssist

You have a blank line on line 4 of both pages... a blank line counts as sending content to the page, so redirects can't happen lower after.

Sign in to reply to this post

erinlima318673

Thank you -- I figured the errors were something silly like that.

I have deleted the spaces between all the php lines on my pages, so now I don't get any errors, but after entering valid login credentials on the page login it returns to the login page, with no redirect to the results page. And I try to go to the results page, it redirects to the login page. So I am stuck on the login.

Sign in to reply to this post

Ray BorduinWebAssist

What credentials are you using to log in? I need to reproduce the issue in order to look into it.

Sign in to reply to this post

erinlima318673

see private message with login credentials

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...