I am using HMVC, I received below warnings, not getting why
Code:
Severity: Warning --> ini_set(): A session is active. You cannot change the session module's ini settings at this time /var/www/html/somefolder/system/codeigniter/libraries/Session/Session.php 318
This is my loader
PHP Code:
<?php (defined('BASEPATH')) OR exit('No direct script access allowed');
require APPPATH."libraries/MX/Loader.php";
class MY_Loader extends MX_Loader
{
// Load only if not loaded before
function library($library, $params = NULL, $object_name = NULL){
if(is_array($library) || (!is_array($library) && !$this->is_loaded($library))){
parent::library($library, $params , $object_name);
return $this;
}
}
}
When I checked
Code:
system/codeigniter/libraries/Session/Session.php
I found below lines
PHP Code:
// Security is king
ini_set('session.use_trans_sid', 0);
ini_set('session.use_strict_mode', 1);
ini_set('session.use_cookies', 1);
ini_set('session.use_only_cookies', 1);
I can avoid above warning by editing
index.php, but why this warnings are coming ?
PHP Code:
define('ENVIRONMENT', 'production');
Also I have problem with main home page without 'index.php', where I receive below status code even though I have set
Code:
$config['base_url'] = 'http://test.myserver.com'
Code:
307 Temporary Redirect
Below one is contents of my .htaccess
Code:
<IfModule mod_rewrite.c>
Options +FollowSymLinks -Indexes
Options -MultiViews
RewriteEngine on
RedirectMatch 403 ^/.*/(system/cms/cache|system/codeigniter|system/cms/config|system/cms/logs|\.git|\.hg).*$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
<IfModule mod_php5.c>
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
<IfModule !mod_php5.c>
RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>
</IfModule>
And my virtual host configuration is as follows
PHP Code:
<VirtualHost *:80>
ServerName test.myserver.com
ServerAlias test.myserver.com
DocumentRoot /var/www/html/somefolder
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
<Directory /var/www/html/somefolder/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
And my hosts file
Code:
$ cat /etc/hosts
127.0.0.1 localhost test.myserver.com