Press "Enter" to skip to content

Codeigniter: Session Does not Work on Server but works on Localhost – Cannot Login

Sometimes, codeigniter does not support session on server but everything fine on localhost using wampserver or Xamp or etc.

So you cannot login on server, because most of login techniques uses session on PHP.

Here let’s solve the issue:

You may use use codeigniter older version, so you need to upgrade without losing your programs codes.

So just download new codeigniter file and replace ‘system‘ folder on your project and upload again to server.

Codeigniter: Session Does not Work on Server but works on Localhost - Cannot Login

You don’t need to specify ‘base_url’ on your project configuration.

Your .htaccess file may be like this:

RewriteEngine on
RewriteCond $1 !^(index.php|assets|images|css|js|icon|uploads|build|robots.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

No need to specify project name on server.

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *