Problem with session_start() |
I have a problem with the CAS authentication library in CI3. In CI2.x worked perfectly but with the CI3, the session has been re-designed and it seems to have problems with this library.
This is the error I get: Code: A PHP Error was encountered Code: A PHP Error was encountered Here is my config.php settings: PHP Code: $config['sess_driver'] = '[color=#ff3366]database[/color]'; Note that I'm using a table called 'ci_session' in my database to store the session as stated in the CI3 user manual. It works perfectly but once I load the CAS library I get the previous error in the session_start() line. CAS library https://github.com/eliasdorneles/code-ig...as-library Someone wrote a code for easily integrate phpCAS into Codeigniter 2.X but it is no longer mantained nor updated to CI3. For me, it is mandatory to use the CAS authentication method, any ideas on how to fix this error or use another alternative CAS client? Thank you very much.
Try:
Open your php.ini file with the File Manager in cPanel (if it is not exists create one) Add the following line of code to top of your php.ini file date.timezone = "US/Central" Replace "US/Central" with the timezone that corresponds to the time you want to display. http://www.php.net/manual/en/timezones.php
Hello,
I do not have access to the php.ini file. Any other ideas? Don't you think it has something to do with how CI3.0 handles sessions? session_start() is php native whereas CI uses his own implementation of sessions. I think this could cause the issue but not sure how to fix it. Thanks anyway. (01-29-2016, 07:08 AM)moshair Wrote: Try:
Update your CodeIgniter root index.php file, like this:
PHP Code: /* Of course, change UTC to your own timezone.
Best regards,
José Postiga Senior Backend Developer
Hello,
If you put a file php.ini in your website or in any folder it will change the php.ini default settings for values in it. Also if you contact the hosting support they may fix it in the server settings. This error related to the server more than the CI, I remember it happened with me before years and I was not using CI, using that php.ini solved it and now it seems it is fixed by the hosting company. Note: using custom php.ini file I think started with php 5.3.6. Also you can try the solution by josepostiga. Regards, (01-29-2016, 07:27 AM)Mitteg Wrote: Hello,
Done! The timezone error disappeared but the session_start() error keeps appearing. Any more ideas? Lost so many time with this issue...
Code: A PHP Error was encountered (01-29-2016, 07:36 AM)josepostiga Wrote: Update your CodeIgniter root index.php file, like this:
I have set permissions 777 to the directory C:\Windows\Temp and still have the same error. Any more ideas? Thanks.
Well, I've given up with this issue. The only solution I found is to go back to CodeIgniter versión 2.x. Hopefully in the future this will be fixed. Thanks everyone.
(02-05-2016, 04:36 AM)Mitteg Wrote: I have set permissions 777 to the directory C:\Windows\Temp and still have the same error. Any more ideas? Thanks.
Line 3620 of the CAS Client is in which method? What version of the client are you using? Have you tried another version?
Is the session library loaded before the CAS library? The storage module "user" and the Windows temp path indicate that something other than CodeIgniter may be configuring the session handler. After all, with the CodeIgniter settings you've posted, there's nothing to indicate that the Windows temp path should be used. I'm also assuming that the and in your posted configuration was an attempt to highlight the values, rather than part of the actual values in your file. There appear to be a few options to configure phpCAS' session handling, but they're not well documented, and may be relatively new additions to the code. It's possible that the library could be modified to initialize phpCAS to work properly with CI3, but it's probably something that would require someone familiar with phpCAS (or at least a valid testing environment) to figure out. |
Welcome Guest, Not a member yet? Register Sign In |