Jump to content

luckatpf

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

luckatpf's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. For all those facing this same issue, i've found the reason and a solution. I used Web Expression during the site editing, and it seems to add a Byte Order Mask (BOM) that is located at the beginning of the file, and that would be before the <?php ?> tag, that happens only with the version 1 (according to some pages i've read). So the solution is either use another editor or remove the byte order mask. I did open some of the pages with "edit" command under a console box start > run > cmd > edit and i saw that weird coulple of characters in the file. So its not a zend studio issue... Thanks anyway.
  2. Hi, im trying to write my website and im facing an issue with the session_start() function and some others functions, im getting an "output started at line NN" like message. I already checked the spaces and characters in all of my php files. Then doing some reading i found the origin of the issue, ZendStudio for Eclipse is setup to save files with UTF-8 character set, and this adds up to 3 weird characters to my files before the "<?php>" tag. So i switched to US-ASCII the entire project. But now i cannot put punctuation (since the site is in spanish), and if i switch back then... site stops working. Any suggestions?
  3. Thanks, I solved it by moving the session_start() line.
  4. If by assigning a value you mean something like $_SESSION['somevar']='some value' that doesnt change the behaviour, else is it i have to assign a session_id manually??? ----------------------------------------------------------------------- Ok now i get the idea, so its pointless to check for an existing session id unless i set it manually. Then how do i check for an existing session? just by checking for some session variable?
  5. Hi, i'm building a login script for my site using Sessions and Cookies to keep the user logged in. The problem itself is, session_id() returns an empty value after i start the session and the user tries to follow some link. I actually read the php sessions documentation but i think i'm missing something. Tried this and it reproduces the behaviour of my login code: Page1.php <?php session_start(); echo 'Session ID is '.session_id().'<br>'; echo '<a href="Page2.php">Go to Page 2</a>'; ?> Page2.php <?php if (session_id()=''){ echo 'Session ID is empy??'; }else{ echo session_id(); session_start(); } ?> When i Reach page1 i get the So when i click Page2 link, i always get an empty session id. Is this normal behaviuor? I thought session_id kept its value, im not using sessions in URLs options are set to cookies, also checked the gc_max... and are all set so it doesnt timeout Im using XAMPP to develop, and since i thought it may be a xampp issue, i switched to my Apache + PHP server and the behaviour is the same... Tested on Opera and Internet explorer Any help, comment is welcome. Thanks.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.