close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

New error

Thread began 6/29/2012 12:06 pm by newimage96814918 | Last modified 6/29/2012 1:14 pm by newimage96814918 | 1641 views | 6 replies |

newimage96814918

New error

I turned on error reporting in the page and I'm getting this error:
Warning: Cannot modify header information - headers already sent by (output started at /home/smwellne/public_html/barterx.net/news.php:7) in /home/smwellne/public_html/barterx.net/webassist/security_assist/helper_php.php on line 49


It's not a space problem that I can see, What it is is I have a header.php include that has a login form and behavior on it, working fine locally but when I sent up to thye server I get this error when using it.
This is what at line 49 of helper_php.php: header("Location: ".$WA_Auth_Parameter["successRedirect"]);
I will attach a sample page that calls for header.php and header.php for your review
Also my helper_php.php file
Thanks!

Tracy

Attached Files
stuff.zip
Sign in to reply to this post

Jason ByrnesWebAssist

the problem is that the php code on the header.php file, lines 1 - 27:

php:
<?php

@session_start();
ini_set('display_errors',1); 
 
error_reporting(E_ALL);
?>
<?php 
require_once('Connections/connbarter.php'); ?>
<?php 
require_once( "webassist/security_assist/helper_php.php" ); ?>
<?php
if(isset($_POST["login"])){
    
$WA_Auth_Parameter = array(
    
"connection" => $connbarter,
    
"database" => $database_connbarter,
    
"tableName" => "site_user",
    
"columns" => explode($WA_Auth_Separator,"UserName".$WA_Auth_Separator."password"),
    
"columnValues" => explode($WA_Auth_Separator,"".((isset($_POST["username"]))?$_POST["username"]:"")  ."".$WA_Auth_Separator."".((isset($_POST["password"]))?$_POST["password"]:"")  .""),
    
"columnTypes" => explode($WA_Auth_Separator,"text".$WA_Auth_Separator."text"),
    
"sessionColumns" => explode($WA_Auth_Separator,"UserId".$WA_Auth_Separator."UserName".$WA_Auth_Separator."LevelAccess"),
    
"sessionNames" => explode($WA_Auth_Separator,"UserId".$WA_Auth_Separator."UserName".$WA_Auth_Separator."LevelAccess"),
    
"successRedirect" => "memberhome.php",
    
"failRedirect" => "failed.php",
    
"gotoPreviousURL" => TRUE,
    
"keepQueryString" => TRUE
    
);
    
    
WA_AuthenticateUser($WA_Auth_Parameter);
}
?>




needs to come before the doctype tag of the page you are including it in.

Sign in to reply to this post

newimage96814918

What do you think would be the easiest way to solve this problem? Do I got this set up wrong? Do I need to move the code out of the header page and paste it into every page of my site?

Tracy

Sign in to reply to this post

Jason ByrnesWebAssist

easiest way to get around this is to create anew page, add the login form to the body and add the Authenticate user behavior to it.

then Use Framework Builder to add the login page as a plugin to your pages.

framework builder plugins will automatically add the authenticate user behavior code to the correct place in your page.

Sign in to reply to this post

newimage96814918

is'nt it already in it's own page sinceI have it in header.php? And I don't think I have that framework builder extension, So i might have to do it more manually?

Tracy

Sign in to reply to this post

Jason ByrnesWebAssist

well, it is in its own php page, but it is not a complete php page. in others words, it is missing the basic HTML tags that make a full page.


To do it more manually, create a login page that has the login form and authenticate user behavior, on it.

then copy the login form to your header page, and make the action post to the login page, this way the server behavior is not in the header file.

Sign in to reply to this post

newimage96814918

That did the trick! Thanks Jason!

Tracy

Sign in to reply to this post

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...