CI4 running in apache server virtualhost. Failed to decode session object. |
Requesting multiple connection to the server using session() will return an error.
session_start(): Failed to decode session object. Session has been destroyed I am using a virtualhost in my wampp server to connect to the public folder of CI4. Every time I have concurrent request to the server I will get this error and will redirect to the login page because the session was destroyed. I also added the line below to my virtualhost to save the sessions on a specific project. php_value session.save_path "${INSTALL_DIR}/www/CI4/writable/session" I got this error on php logs: Quote:PHP Fatal error: Uncaught ErrorException: Unknown: Cannot call session save handler in a recursive manner in Unknown:0 Do you have any idea about this? or can you recommend other way to point the specific project to the public folder? I can't change my DocumentRoot because there are multiple projects on my server.
Must be a configuration problem because I am running file sessions on XAMPP with vhosts
with no problems. What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
I can show you one but you would need to edit it for yourself.
Code: #-------------------------------------------------------------- That's how I do it for both http:// and https:// I program using the https:// For the sessions I load it in my BaseController and extend all controllers form that. PHP Code: <?php Hope that helps, you can use the session helper method or use regular session globals. What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(10-24-2019, 12:47 PM)InsiteFX Wrote: I can show you one but you would need to edit it for yourself. This will still gives me the same error if i do multiple requests using ajax.
@gentlemanoi
Quote:This will still gives me the same error if i do multiple requests using ajax. I use Ajax and think that a separate PHP instance is started and does not recognise the parent constants and they have to be declared again
(10-29-2019, 10:39 PM)John_Betong Wrote: @gentlemanoi Yes. That's why I always got this error. |
Welcome Guest, Not a member yet? Register Sign In |