Hi Takashi,

Yes without the session, I can connect to the database. All forms 
working.There are no suspicious logs.

On Wednesday, May 3, 2017 at 11:02:58 PM UTC+5:30, Takashi Matsuo (Google) 
wrote:
>
>
> Hi Dhandapani,
>
> Are you able to connect to the database in other part of your app?
> Are there any suspicious logs?
>
> On Wed, May 3, 2017 at 7:59 AM Justin Beckwith <[email protected] 
> <javascript:>> wrote:
>
>> + a few folks
>>
>> On Wed, May 3, 2017 at 2:51 AM, Dhandapani Sattanathan <
>> [email protected] <javascript:>> wrote:
>>
>>> I m migration my CRM application developed in CodeIgniter Framework from 
>>> GAE SE to Google App Engine flexible environment.
>>>
>>> UserService not available in GAE FE.So I used Integrating Google 
>>> Sign-In into your web app 
>>> <https://developers.google.com/identity/sign-in/web/sign-in>.
>>>
>>> I need session so I used the below.I am using CI_VERSION', '3.0.0
>>>
>>>
>>> application/config/config.php
>>> $config['sess_driver'] = 'database';
>>> $config['sess_cookie_name'] = 'ci_session';
>>> $config['sess_expiration'] = 7200;
>>> $config['sess_save_path'] = 'ci_sessions';
>>> $config['sess_match_ip'] = TRUE;
>>> $config['sess_time_to_update'] = 300;
>>> $config['sess_regenerate_destroy'] = FALSE;
>>>
>>> Using the below query I created the ci_sessions table in second 
>>> generation cloud SQL.
>>>
>>>
>>> CREATE TABLE IF NOT EXISTS `ci_sessions` (
>>> `id` varchar(40) NOT NULL,
>>> `ip_address` varchar(45) NOT NULL,
>>> `timestamp` int(10) unsigned DEFAULT 0 NOT NULL,
>>> `data` blob NOT NULL,
>>> PRIMARY KEY (id),
>>> KEY `ci_sessions_timestamp` (`timestamp`)
>>> );
>>>
>>>
>>> I can get session userstamp in ctrl_Index.php
>>>
>>>
>>> application/controllers/Ctrl_Index.php
>>> <?php
>>> defined('BASEPATH') OR exit('No direct script access allowed');
>>>
>>> class Ctrl_Index extends CI_Controller {
>>>
>>> public function index()
>>> {
>>> $userstamp=base64_decode($_GET['UserStamp']);
>>> $this->session->set_userdata('UserStamp', $userstamp);
>>> echo $this->session->userdata('UserStamp'); // here session id came.
>>> $this->load->view('Vw_Menu'); // Redirect to vw_menu page.
>>>
>>> }
>>> }
>>>
>>> ?>
>>>
>>>
>>> application/views/Vw_Menu.php
>>> <?php
>>> ?>
>>> <html>
>>> <head>
>>> <script src="
>>> https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js";
>>> ></script>
>>> <script>
>>> $(document).ready(function(){
>>> var CONFIG_ENTRY_controller_url="<?php echo base_url(); ?>" + 
>>> '/index.php/Ctrl_Menu/' ;
>>> $.ajax({
>>> type: "POST",
>>> url':CONFIG_ENTRY_controller_url+"getSessionUserstamp",
>>> success: function(data){
>>> $(".preloader").hide();
>>> var userstamp=(data);
>>> alert(userstamp)
>>>
>>> });
>>>
>>> });
>>> </script>
>>> <title>CI SESSION IN GAE FE</title>
>>> <meta charset="utf-8">
>>> </head>
>>> <body id="bodyMenuMsg">
>>> <form class="form-horizantal">
>>>
>>> </form>
>>> </body></html>
>>>
>>>
>>> From Ctrl_index.php redirect to vw_menu.php session got empty.Also 
>>> ci_sessions tables ip_address saved as empty.
>>>
>>>
>>> My sample script can see here [1] 
>>> <https://docs.google.com/spreadsheets/d/1hZ2ZUlz3LSm7sxJP6LCRtKBVHkgzQ6J2Nj3xwvsipXc/edit#gid=0>,
>>>  
>>> Download Codeigniter here [2] 
>>> <https://github.com/bcit-ci/CodeIgniter/releases/tag/3.0.0> replace my 
>>> sample script.
>>>
>>>
>>> Will ci-sessions using database work in GAE FE?.Is there any other 
>>> alternative to using ci-session in GAE FE?
>>>
>>>
>>> Maybe I missed configuring in GAE FE to work ci_session?
>>>
>>>
>>> Please help me.
>>>
>>>
>>> Thanks in advance
>>>
>>>
>>> SN
>>>
>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Google App Engine" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to [email protected] <javascript:>.
>>> To post to this group, send email to [email protected] 
>>> <javascript:>.
>>> Visit this group at https://groups.google.com/group/google-appengine.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/google-appengine/5220d656-7264-4d89-9841-075f6e1576fc%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/google-appengine/5220d656-7264-4d89-9841-075f6e1576fc%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> -- 
>>
>> Justin Beckwith | Google Cloud Platform | @justinbeckwith 
>> <http://twitter.com/JustinBeckwith> | http://jbeckwith.com
>>
> -- 
> -- Takashi
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/6c370c74-bf66-44d0-88cf-18faa63b0499%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to