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

Show if behavior Problem

Thread began 6/17/2011 6:03 pm by gzirfas374932 | Last modified 6/21/2011 7:55 am by gzirfas374932 | 1195 views | 6 replies |

gzirfas374932

Show if behavior Problem

I have a banner on my pages that is a file include for the nav (see code below). In the include file I added a connection to the users database and filtered by User_ID. Then added a show if Logged in to userdata behavior. Not logged in it didn't show, logged in it showed. It all worked great but then started throwing the message below on some of the pages, then got progressively worse and ended up on all pages.

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/hemgen1/public_html/spec_sheep.php:8) in /home/hemgen1/public_html/WA_SecurityAssist/Helper_PHP.php on line 5

Here are the first lines of my helper file from Security assist Helper_PHP.php file:

<?php require_once( "HelperGroupsRulesPHP.php" ); ?>
<?php require_once( "Mail_PHP.php" ); ?>
<?php
if (!isset($_SESSION)) {
session_start();
}

The session (!isset) should be true, right? So is it trying to start another session which is throwing the error?

Universal page code:
<body>
<div id="wrapper">
<div id="homelink"><a href="index.php"><img src="images/HemoGenixHomeLink.gif" width="338" height="94" /></a></div>
<div id="top_nav">
<?php include('links_topNav.php') ?><!--Show if behavior is in here-->
</div>
<div id="centernav_content">
<?php include('j_menu.php') ?>
</div>

How can I correct this?

URL:
www.hemogenix.com

Sign in to reply to this post

iansheldon422428

No, I don't think that is your issue.

On your PHP pages make sure you have no whitespace or lines between PHP tags

eg

<?php } ?>

<?php ?>

Sometimes even a space after a PHP tag can cause that error.

Cheers
Ian

Sign in to reply to this post

gzirfas374932

Security Assist show if behavior

The problem seems to appear on pages that DO NOT have any security assist stuff applied to them. The downloads page, log in and register pages, that have page access applied to them to NOT exhibit the headers error from Helper_PHP.php line 5 error. Although the spaces around php commands is good advice I don't think that is what is causing the problem. Any more suggestions? Like I said it works fine with other access rules pages but not ones without page access.

Sign in to reply to this post

Jason ByrnesWebAssist

see this post for details on troubleshooting the headers already sent error:
showthread.php?t=19285


The key to finding the cause of the problem is in this poertin of the error message:
output started at /home/hemgen1/public_html/spec_sheep.php:8


this points you to the output causing the error which is at line 8 of the spec_sheep.php page.

Sign in to reply to this post

gzirfas374932

Track errors

I checked line 8 of my files (the opening structure is all the same) and it points to a style sheet. I moved all the style sheets down and it still errors at line 8, which then calls a javascript file. I'm really frustrated as the show region ONLY works on pages which I have applied security assist behaviors previously. Would adding a Not Logged in rule help? I also checked the link you included and everything IS set as specified in the post.

Sign in to reply to this post

Jason ByrnesWebAssist

please send a copy of your page.

Sign in to reply to this post

gzirfas374932

Persistence Pays

Show if behavior was sending headers already sent error...
My persistence paid off. 5 am programming lets the brain kick into auto pilot.

The pages that were working correctly required the user to be logged in ALREADY thru security assist. So the show if behavior worked fine. I put the call to the user database in the include file of the nav, big mistake. It was being called TOO LATE. I made an include file with JUST the connection to the database on all the other pages (over 80 in all) BEFORE the document declaration so it was called first, even if it wasn't in use, or going to be used yet, and voila. Everything works as it should. I am posting the solution in case anyone else has this problem.

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