Re: [google-appengine] Codeigniter session using database not working in Google App Engine Flexible Environment

2017-05-05 Thread Dhandapani Sattanathan
Thanks, Takashi,

I tried with CI 3.1.4 with sessions. I changed base URL for GAE. Previous 
versions can work without changing BASE URL.

I added  mysqli.default_socket= '/cloudsql/CONNECTION_NAME', As per reply.

*In the view I got issues, I fixed, Now working fine CI SESSIONS IN FE.*

*thanks for all Support. If I get any other issues Will contact you*


On Thursday, May 4, 2017 at 11:03:51 AM UTC+5:30, Dhandapani Sattanathan 
wrote:
>
> Hi Takashi,
>
> I enabled Cloud SQL API & added beta_settings in my app.yaml.
>
> I m using mysqli. I didn't used mysqli.default_socket= 
> '/cloudsql/CONNECTION_NAME in php.ini.
>
> Also, I used CodeIgniter 3.0.0. I 'll try with CodeIgniter 3.1.4 with 
> session & mysqli.default_socket in php.ini and Let you know the status.
>
> Thanks for immediate reply 
>
> -SN
>
> On Thursday, May 4, 2017 at 1:52:46 AM UTC+5:30, Takashi Matsuo (Google) 
> wrote:
>>
>>
>> Hi Dhandapani,
>>
>> Just a quick note, I downloaded CodeIgniter 3.1.4 and the session with 
>> the database backed by CloudSQL v2 works.
>>
>> Potential pitfalls are:
>>
>>- You have to enable Cloud SQL API 
>>
>> 
>>- You have to add beta_settings in your app.yaml
>>```
>>beta_settings:
>>  cloud_sql_instances: "CONNECTION_NAME"
>>```
>>- If you're using mysqli, put the default socket in php.ini
>>```
>>mysqli.default_socket= '/cloudsql/CONNECTION_NAME'
>>```
>>
>> Hope it helps!
>>
>> On Wed, May 3, 2017 at 10:32 AM Takashi Matsuo  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  
>>> wrote:
>>>
 + a few folks

 On Wed, May 3, 2017 at 2:51 AM, Dhandapani Sattanathan <
 dhandapani@ssomens.com> 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 
> .
>
> 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
>  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
>  ?>
> 
> 
> https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js";
> >
> 
> $(document).ready(function(){
> var CONFIG_ENTRY_controller_url="" + 
> '/index.php/Ctrl_Menu/' ;
> $.ajax({
> type: "POST",
> url':CONFIG_ENTRY_controller_url+"getSessionUserstamp",
> success: function(data){
> $(".preloader").hide();
> var userstamp=(data);
> alert(userstamp)
>
> });
>
> });
> 
> CI SESSION IN GAE FE
> 
> 
> 
> 
>
> 
> 
>
>
> 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] 
> ,
>  
> Download Codeigniter here [2] 
>  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?
>
>
> 

Re: [google-appengine] Codeigniter session using database not working in Google App Engine Flexible Environment

2017-05-03 Thread Dhandapani Sattanathan
Hi Takashi,

I enabled Cloud SQL API & added beta_settings in my app.yaml.

I m using mysqli. I didn't used mysqli.default_socket= 
'/cloudsql/CONNECTION_NAME in php.ini.

Also, I used CodeIgniter 3.0.0. I 'll try with CodeIgniter 3.1.4 with 
session & mysqli.default_socket in php.ini and Let you know the status.

Thanks for immediate reply 

-SN

On Thursday, May 4, 2017 at 1:52:46 AM UTC+5:30, Takashi Matsuo (Google) 
wrote:
>
>
> Hi Dhandapani,
>
> Just a quick note, I downloaded CodeIgniter 3.1.4 and the session with the 
> database backed by CloudSQL v2 works.
>
> Potential pitfalls are:
>
>- You have to enable Cloud SQL API 
>
> 
>- You have to add beta_settings in your app.yaml
>```
>beta_settings:
>  cloud_sql_instances: "CONNECTION_NAME"
>```
>- If you're using mysqli, put the default socket in php.ini
>```
>mysqli.default_socket= '/cloudsql/CONNECTION_NAME'
>```
>
> Hope it helps!
>
> On Wed, May 3, 2017 at 10:32 AM Takashi Matsuo  > 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 > > wrote:
>>
>>> + a few folks
>>>
>>> On Wed, May 3, 2017 at 2:51 AM, Dhandapani Sattanathan <
>>> dhandapani@ssomens.com > 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 
 .

 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
 >>> 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
 >>> ?>
 
 
 https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js";
 >
 
 $(document).ready(function(){
 var CONFIG_ENTRY_controller_url="" + 
 '/index.php/Ctrl_Menu/' ;
 $.ajax({
 type: "POST",
 url':CONFIG_ENTRY_controller_url+"getSessionUserstamp",
 success: function(data){
 $(".preloader").hide();
 var userstamp=(data);
 alert(userstamp)

 });

 });
 
 CI SESSION IN GAE FE
 
 
 
 

 
 


 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] 
 ,
  
 Download Codeigniter here [2] 
  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 google-appengi...@googlegroups.com .
 To post to this group, send email to google-a...@googlegroups.com 
 .
 Visit this group at https://groups.google.com/group/google-appengine.
 To view this discussion on the web visit 
 

Re: [google-appengine] Codeigniter session using database not working in Google App Engine Flexible Environment

2017-05-03 Thread Dhandapani Sattanathan
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  > wrote:
>
>> + a few folks
>>
>> On Wed, May 3, 2017 at 2:51 AM, Dhandapani Sattanathan <
>> dhandapani@ssomens.com > 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 
>>> .
>>>
>>> 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
>>> >> 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
>>> >> ?>
>>> 
>>> 
>>> https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js";
>>> >
>>> 
>>> $(document).ready(function(){
>>> var CONFIG_ENTRY_controller_url="" + 
>>> '/index.php/Ctrl_Menu/' ;
>>> $.ajax({
>>> type: "POST",
>>> url':CONFIG_ENTRY_controller_url+"getSessionUserstamp",
>>> success: function(data){
>>> $(".preloader").hide();
>>> var userstamp=(data);
>>> alert(userstamp)
>>>
>>> });
>>>
>>> });
>>> 
>>> CI SESSION IN GAE FE
>>> 
>>> 
>>> 
>>> 
>>>
>>> 
>>> 
>>>
>>>
>>> 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] 
>>> ,
>>>  
>>> Download Codeigniter here [2] 
>>>  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 google-appengi...@googlegroups.com .
>>> To post to this group, send email to google-a...@googlegroups.com 
>>> .
>>> 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
>>>  
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> -- 
>>
>> Justin Beckwith | Google Cloud Platform | @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 google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
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.


Re: [google-appengine] Codeigniter session using database not working in Google App Engine Flexible Environment

2017-05-03 Thread 'Takashi Matsuo' via Google App Engine
Hi Dhandapani,

Just a quick note, I downloaded CodeIgniter 3.1.4 and the session with the
database backed by CloudSQL v2 works.

Potential pitfalls are:

   - You have to enable Cloud SQL API
   
   - You have to add beta_settings in your app.yaml
   ```
   beta_settings:
 cloud_sql_instances: "CONNECTION_NAME"
   ```
   - If you're using mysqli, put the default socket in php.ini
   ```
   mysqli.default_socket= '/cloudsql/CONNECTION_NAME'
   ```

Hope it helps!

On Wed, May 3, 2017 at 10:32 AM Takashi Matsuo  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 
> wrote:
>
>> + a few folks
>>
>> On Wed, May 3, 2017 at 2:51 AM, Dhandapani Sattanathan <
>> dhandapani.sattanat...@ssomens.com> 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
>>> .
>>>
>>> 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
>>> >> 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
>>> >> ?>
>>> 
>>> 
>>> https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js";
>>> >
>>> 
>>> $(document).ready(function(){
>>> var CONFIG_ENTRY_controller_url="" +
>>> '/index.php/Ctrl_Menu/' ;
>>> $.ajax({
>>> type: "POST",
>>> url':CONFIG_ENTRY_controller_url+"getSessionUserstamp",
>>> success: function(data){
>>> $(".preloader").hide();
>>> var userstamp=(data);
>>> alert(userstamp)
>>>
>>> });
>>>
>>> });
>>> 
>>> CI SESSION IN GAE FE
>>> 
>>> 
>>> 
>>> 
>>>
>>> 
>>> 
>>>
>>>
>>> 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]
>>> ,
>>> Download Codeigniter here [2]
>>>  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 google-appengine+unsubscr...@googlegroups.com.
>>> To post to this group, send email to google-appengine@googlegroups.com.
>>> 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
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> --
>>
>> Justin Beckwith | Google Cloud Platform | @justinbeckwith
>>  | http://jbeckwith.com
>>
> --
> -- Takashi
>
-- 
-- 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 

Re: [google-appengine] Codeigniter session using database not working in Google App Engine Flexible Environment

2017-05-03 Thread 'Takashi Matsuo' via Google App Engine
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  wrote:

> + a few folks
>
> On Wed, May 3, 2017 at 2:51 AM, Dhandapani Sattanathan <
> dhandapani.sattanat...@ssomens.com> 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
>> .
>>
>> 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
>> > 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
>> > ?>
>> 
>> 
>> https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js";
>> >
>> 
>> $(document).ready(function(){
>> var CONFIG_ENTRY_controller_url="" +
>> '/index.php/Ctrl_Menu/' ;
>> $.ajax({
>> type: "POST",
>> url':CONFIG_ENTRY_controller_url+"getSessionUserstamp",
>> success: function(data){
>> $(".preloader").hide();
>> var userstamp=(data);
>> alert(userstamp)
>>
>> });
>>
>> });
>> 
>> CI SESSION IN GAE FE
>> 
>> 
>> 
>> 
>>
>> 
>> 
>>
>>
>> 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]
>> ,
>> Download Codeigniter here [2]
>>  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 google-appengine+unsubscr...@googlegroups.com.
>> To post to this group, send email to google-appengine@googlegroups.com.
>> 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
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
>
> Justin Beckwith | Google Cloud Platform | @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 google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
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/CADWEYXgcHPvUQtRV%3D2-Mn4cncEdvs0ZiQVT%2BnchWN6knXfGaQQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [google-appengine] Codeigniter session using database not working in Google App Engine Flexible Environment

2017-05-03 Thread 'Justin Beckwith' via Google App Engine
+ a few folks

On Wed, May 3, 2017 at 2:51 AM, Dhandapani Sattanathan <
dhandapani.sattanat...@ssomens.com> 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
> .
>
> 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
>  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
>  ?>
> 
> 
> https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/
> jquery.min.js">
> 
> $(document).ready(function(){
> var CONFIG_ENTRY_controller_url="" +
> '/index.php/Ctrl_Menu/' ;
> $.ajax({
> type: "POST",
> url':CONFIG_ENTRY_controller_url+"getSessionUserstamp",
> success: function(data){
> $(".preloader").hide();
> var userstamp=(data);
> alert(userstamp)
>
> });
>
> });
> 
> CI SESSION IN GAE FE
> 
> 
> 
> 
>
> 
> 
>
>
> 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]
> ,
> Download Codeigniter here [2]
>  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 google-appengine+unsubscr...@googlegroups.com.
> To post to this group, send email to google-appengine@googlegroups.com.
> 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
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 

Justin Beckwith | Google Cloud Platform | @justinbeckwith
 | http://jbeckwith.com

-- 
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 google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
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/CADd%3D1Q34EMfbzuePGw2n-csY2X_QTT2oNvTTgGasL4_H_ur5-Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.