sessions not enabled on go daddy server |
[eluser]labao[/eluser]
Hello, I am using codeigniter to build a car rental website and I am having trouble implementing it on a godaddy server. I am still in school so forgive me for not being so technical but the sessions that I am putting variables into don't seem to want to be recorded. I am using the following come to dump the var into session data: Code: $vehicle=$this->input->post('vehicle'); Code: $this ->session->set_userdata('vehicle', $vehicle); and then I am pulling the vars out on the last page via this line of code: Code: $car=$this->session->userdata('vehicle'); Also this code works locally... but not remotely. I can go to the website and go through all the steps and have it run perfectly on my machine but when I go try it on another computer, the sessions aren't created and the application doesn't work. Any help is appreciated. This is a school project and time is of the essence! Thanks, Lorne.
[eluser]labao[/eluser]
note - I am pretty sure this is a server issue because I developed the site using localhost however, changed all the database params in the config file...
[eluser]cahva[/eluser]
Does it fail using database and without? Also if time is not on your side, you could try the native PHP session library. I have used this found here: http://www.philsbury.co.uk/index.php/blo...-sessions/ It works just like the normal session library so you dont have to change any code. Just copy that to application/libraries and load the session library normally.
[eluser]labao[/eluser]
Thanks for the reply... for some reason I am getting an internal server error when I surf to the site. I am hoping it's just a .htaccess issue and I can surf to the site within the hour. I'll try your solution as soon as I can.
[eluser]labao[/eluser]
ok It's up I am going to try your solution now... lets hope it works because this is all that stands between a pass an a fail for me due to the fact that it's the only project we've been doing for past 4 months.
[eluser]labao[/eluser]
Code: $this->load->library('session'); would go into the config/autoload file yes? under libraries? if yes it still doesn't work...
[eluser]labao[/eluser]
I think it's actually the user userdata that isn't being recorded... I can get a session ID and it will get logged into the server...
[eluser]labao[/eluser]
perhaps someone could tell me what the actual name of this process is called and then I can call godaddy and ask them whats going on. Like I said, the site works locally while on the actually website. not using a local server. but doesn't work remotely. Im trying to assign multiple vars to the userdata column in my ci_sessions table... EVERYTHING else in the table is being recorder EXCEPT userdata. is the userdata function reliable on the server?
[eluser]xoRiZ[/eluser]
[quote author="labao" date="1270852497"] Code: $this->load->library('session'); would go into the config/autoload file yes? under libraries? if yes it still doesn't work...[/quote] application/config/autoload.php Code: $autoload['libraries'] = array('session'); What does your config.php look like for sessions? Code: # This section Can you post this, as well as, any pertinent error logs? EDIT: Also, in the code you posted above, your accessor appears to be spaced. Code: $this ->session->set_userdata('vehicle', $vehicle); I'm not sure if this would cause the issue or not. EDIT: Tested, this won't cause an issue. Have you verified that $this->input->post('vehicle') is not null? If you're able to $this->session->userdata('session_id') and get a variable- I would doubt it's the session class.
[eluser]labao[/eluser]
My config.php is fine. no I am not getting any errors at all actually which makes this rather annoying. $vehicle is not null and is being posted via a form then is sent to a controller which will input the var and then I will take that var out on the next page Quote:$this->session->userdata('session_id')does in fact give me a variable... |
Welcome Guest, Not a member yet? Register Sign In |