close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Security Assist issues

Thread began 2/09/2011 7:24 am by diamou_fr200291 | Last modified 2/14/2011 10:21 am by Jason Byrnes | 1749 views | 11 replies |

diamou_fr200291

Security Assist issues

Hello,

I'm having some issues with Security Assist.

The first problem is when I add :
<?php
if (!isset($_SESSION)) {
session_start();
}
?>
on top of my page, I get the following warning message :

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /public_html/gainde/welcome.php:1) in /public_html/gainde/welcome.php on line 3

The second issue is that, if the page's name is index.php and I add a dynamic text (i.e: {WAATKmembre.MemPseudo}) on it, I cannot see it even if I'm logged in. But if I change the page name to something else (i.e: welcome.php, home.php...), I can see the dynamic text.

I have attached the security assist and the index.php files for your references.

Thanks in advance for your help.

Attached Files
wa support files.zip
Sign in to reply to this post

Jason ByrnesWebAssist

the WAATKmembre recordset relies on the session variable, so you will need to session start code for it ot work


the headers already sent error occurs if there is balnk space between code tags.

My gues is that when you past the session start code in, you are leaving a blank line at the top or after the closing php tag ?>. any blank lines lines or space between the php blocks will cause this error.

Sign in to reply to this post

diamou_fr200291

Hi Jason,

Thanks for your reply.
I already put the session_start code and that's after that I'm seeing the error message. I have checked again and again before that there is no blank space before opening this thread.

I have even deleted my cache but nothing has changed.

The second thing is the fact the WAATK recordset elements are not displaying when the page name is index.php.

Sign in to reply to this post

Jason ByrnesWebAssist

That error at line one can also be caused if you enable the Univ=code Signature on the page.

In Dreamweaver, go to Modify -> Page Properties. Select the Title / Encoding section and un-check the "Include Unicode Signature (BOM)" Option.


for the dynamic test, can you send a copy of one of the pages where the dynamic text does work so it can compare it to the page you sent previously.

Sign in to reply to this post

diamou_fr200291

Hi Jason,

Great! The session error is now gone after I followed your instructions.

Regarding the other issue, I have attached another file in this message for the comparison.

Thanks in advance.

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

Jason ByrnesWebAssist

your welcome page includes the code to initialize the session:
<?php
if (!isset($_SESSION)) {
session_start();
}
?>

the index page does not

since the recordset relies on the session, this code must be added to the index page to initialize the session.

Sign in to reply to this post

diamou_fr200291

Hi Jason,

I actually sent and old index in which I deleted the session_start() code in order to take out the error. Now I just realize that the dynamic text is working if I put the "site_url/index.php". If I just put "site_url", the dynamic text will not show. Any method to show the dynamic text with the "site_url" only?

Sign in to reply to this post

Jason ByrnesWebAssist

it sounds to me like you have an index.htm page and an index.php page.


when you use site_url/ it is loading the .htm page instead of the php page.

Sign in to reply to this post

diamou_fr200291

Jason,

There is no .htm or .html file. And the site_url/ is loading the index.php file with all the contents except the dynamic text when logged in.

The strange thing is this is the first time this happens to me.

Sign in to reply to this post

Jason ByrnesWebAssist

try adding the following code at line 1 of the page:

php:
<?php

if((substr($_SERVER['REQUEST_URI'],-1,1) == "/")  && (substr($_SERVER['SCRIPT_NAME'],-9,9) == "index.php")) {
    
header("Location: ".$_SERVER['SCRIPT_NAME']);
}
?>
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...