Welcome Guest, Not a member yet? Register   Sign In
session_start problem
#1

[eluser]dimis[/eluser]
I have 2 models that have controls at php session variables.
So I extend model class as
Code:
class My_Model extends Model {  
    function My_Model()
    {
        parent::Model();
        @session_start();


    }
}
and the 2 models extends this class .
At my log file I see that
Code:
ERROR - 2008-11-05 12:44:05 --> Severity: Notice  -->
A session had already been started -
ignoring session_start() C:\xampp\htdocs\dslook\system\application\libraries\My_Model.php 7
.
Is there any problem with that and how can I solve it?
#2

[eluser]Alexdamo[/eluser]
your decendant classes that extend My_Model class call its constructor (function My_Model), so the session_start() is called several times, that is the reason of the above log message.
#3

[eluser]dimis[/eluser]
Is there a way to call only once the session_start at a codeigniter application?
Dimis
#4

[eluser]new developer[/eluser]
Can you check your <?php line sometimes it happens when you give extra line before <?php tag..I may be talking useless but it happened to sometime before..
#5

[eluser]dimis[/eluser]
The reason is that i use wcart and I had problem using CI seesions.




Theme © iAndrew 2016 - Forum software by © MyBB