This issue has already been reported at http://helpdesk.getpantheon.com/customer/portal/questions/887090-failed-..., but wasn't fixed.
Warning: session_start(): user session functions not defined in /srv/bindings/[ID]/code/profiles/civicrm_starterkit/modules/civicrm/install/index.php on line 33 Fatal error: session_start(): Failed to initialize storage module: user (path: ) in /srv/bindings/[ID]/code/profiles/civicrm_starterkit/modules/civicrm/install/index.php on line 33
I'm not entirely sure what the difference between setting this here would have on other types of session.save_handlers. This patch will add the line for everyone. hasn't caused any issues in my testing, but I'm open to applying this setting only when using Pantheon.
Comment | File | Size | Author |
---|---|---|---|
#1 | 1978796-session.save-as_file.patch | 251 bytes | kreynen |
Comments
Comment #1
kreynen CreditAttribution: kreynen commentedComment #2
kreynen CreditAttribution: kreynen commentedComment #4
jenlamptonIs this code still working for you? I tried adding the same code you used
As well as what's recommended in pantheon's handbook:
But I'm still getting the following errors:
Update: I never could get PHP sessions working on Pantheon. Switched to using cookies instead.
Comment #5
afinnarn CreditAttribution: afinnarn commentedI still don't think this works and Pantheon support doesn't offer help. Seems like cookies are the only way to go here?
Comment #6
kreynen CreditAttribution: kreynen commentedThis solution still works for the CiviCRM and Community Media Starter Kits. @afinnarn is this specific to CiviCRM?
Comment #7
afinnarn CreditAttribution: afinnarn commentedNo not at all. This post is the highest on Google for the Pantheon issue/bug in general with session_start(), but you are saying the patch still works for you on Pantheon sites with CiviCRM and Community Media Starter Kits? I realized after the fact this is the wrong place to post, but Pantheon certainly doesn't help you out here so I thought maybe people finding this thread would know something.
I can start a stackoverflow question as that is more appropriate.
Comment #8
nubeli CreditAttribution: nubeli commentedI'm confused. I've used this patch which hasn't caused any issues, but Pantheon seems to have conflicting messages about using the default PHP session handler.
In the link posted by Jen suggests enabling local sessions and save to file, but another Pantheon article on sessions with Wordpress suggests that using PHP's default session manager -- temporary files on local disk -- isn't supported for their distributed environment and provides a library to save sessions to the database.
Is Drupal's session not available when CiviCRM is being installed? (The only other place this seems to be an issue is with the extern/* urls such as rest.php, soap.php). And if it can't access Drupal's session there won't it default to the PHP default of using temporary files?
Comment #9
kreynen CreditAttribution: kreynen commentedIt's entirely possible this changed when WP was added and/or is different when using containers tied to WP. I tested using this build of CiviCRM w/ WordPress before that option was public on and it worked, but I haven't done much testing since.
Comment #10
nubeli CreditAttribution: nubeli commented@kreynen, I don't think this has anything to do with WP in particular. From Pantheon's documentation it has everything to do with their system of different containers being able to respond to the same request:
I think the confusion lies in that it won't fail ALL the time, since there's still a good chance the same container will respond. But it will fail spectacularly when a different one responds.
I believe that is what is happening to me even though I added the patches to force the session to files. Every so often contributions with Paypal will fail with a 502 and it will continue until caches are cleared (and even then doesn't always work).
So I think that the solution instead is to have it use Drupal's session handler, which is what CiviCRM will normally do, it just avoids bootstrapping Drupal it seems on the external scripts.