PHP Session Issue
At cfegames.com/login.php there is a session and headers error that has been annoying me and eluding me for months. I've issolated the issue and found it to be within 3 files.
Mysql php database php login php I checked all three, no spaces are before or after the <?php ?> tags. I had a headers list display, it showed normal powered by: php-x-version 2.5.2 and something about content-type: x or something similar. It appears on all pages, but does not bother the others. I'm assuming it may be a cache issue, but I've delete the cache before, and still the problem presists. I'm using Smarty template engine and everything in the portal seems to work but the login. It says can't send session_start(), however, you are able to login. Although, if you select remember me, the cookies will not submit because of the headers already sent. I took the login.php from another website I made that had the same portal system, and moving to cfegames and it still had the error, however, the error does not exist in the website I took it from. This seems very complicated and it is frustrating me very much. I checked the CHMOD and it is 644 like it should be. This has stumped U Tews from the Smarty forum and he could not assist me. I am hoping maybe someone here could assist with this probably very simple issue. |
Re: PHP Session Issue
I have currently commented everything but the following in log_in.php
PHP Code:
I'm starting to think, maybe it is a server thing or a folder property. I don't know if it will seem professional if I have to create a new file and call it signin.php or something like that. But whatever works, I guess I'll try it. Zend analyzed the login.php and did find any errors, however when I use the zend browser, the errors poped up. |
Re: PHP Session Issue
No errors appear in signin.php
www.CFEGames.com/signin.php I rewrote the login and saved it as signin.php. I'm going to contact tech support. :s For once it won't be a hosting question. |
Re: PHP Session Issue
hmm, i have had this before, but i can't think of the sollution by heart now. Could you try to remove the header() function as well? So you only have the session_start() ?
|
Re: PHP Session Issue
Same thing would happen if I just leave session_start().
I changed the file name to signin.php now, the setcookie won't work. I even have the header() after the cookie being set. I will have to investigate further. |
Re: PHP Session Issue
What is the encoding of the files ? If you are using UTF try with UTF-8 without BOM.
|
Re: PHP Session Issue
I have no idea how to change that.
I've been using Frontpage 2003. |
Re: PHP Session Issue
Download Notepad++ (it's free), open the file and from the encoding menu(sorry my version is on bulgarian so I can't tell you what for sure is the name of the menu) choose the option "UTF-8 Without BOM", save the file and check if the error will dissapear. :)
|
Re: PHP Session Issue
Oh my god, that is so stupid of an error.
Now I feel retarded. Thanks. And I am in love with Notepad++ :D People have been having this error for years. I noticed the error was traveling when I changed some files to UTF-8 without BOM. Good fix. TY. |
Re: PHP Session Issue
just another recommended program to use (and free)
try Eclipse and PhpEclipse plugin thats what I always use but notepad++ looks great I think I will try it. |
All times are GMT +2. The time now is 23:07. |
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.