#1 2016-05-02 09:34:52

Registered: 2016-05-02
Posts: 1

Session problem behind nat

I use ionizecms for my little project. It uses codeigniter framework. The problem is:

Application works when I enter local server IP like 192.168.x.x
Application works when I enter from localhost from inside server
Server uses apache and 192.168.x.x:xx port for http on Windows Server OS
Server runs behind a firewall and it uses 212.xxx.xxx:xxxx ip with different port then redirects this ip:port to 192.168.x.x:xx
Problem: When you access page from 212.xxx.xxx:xxxx page loads once then if you refresh or login http request timeout. Sometimes it gives php timeout from a line session_start();

I don't know either this is a server side or application configuration problem. I googled it but there is no result.


#2 2016-05-27 21:42:05

Ionize Friend
From: Germany
Registered: 2010-09-20
Posts: 397

Re: Session problem behind nat

Hmm, for session CodeIgniter made a cookie and store the session contents in serialized way, check the cookies first.
Check the settings in config.php, because most of the time session stored server side in file but in ionize the session sould be stored in database:

$config['sess_cookie_name']		= 'ionize_session';
$config['sess_expiration']		= 7200;
$config['sess_expire_on_close']		= FALSE;
$config['sess_encrypt_cookie']		= FALSE;
$config['sess_use_database']		= TRUE;
$config['sess_table_name']		= 'ion_sessions';
$config['sess_match_ip']		= TRUE;
$config['sess_match_useragent']		= TRUE;
$config['sess_time_to_update']		= 7200;

Try disable the match_ip, if that solve the problem then each request get a different ip address from the server perspective and thats why dropping the session.

Webdeveloper, Programmer, Application developer, Ionize friend


What's Ionize ?

Ionize is an Open Source Content Management System created by webdesigners for webdesigners.

Created and maintained by Partikule and Toopixel, Ionize wants to be the easiest and most powerful CMS.

Can I help ?

Because talent is nothing without involvement, we are looking for motivated coders and webdesigners to join the project team.


Website : ionizecms.com
Documentation : doc.ionizecms.com

Development : Ionize on GitHub
Translations : Ionize Translations