Am using CodeIgniter for my application, my application working fine, but after sometime, when I reload any page than am getting ci_session error.
Please any one help me to solve this issue...
A PHP Error was encountered
Severity: Warning
Message: unlink(/tmp/ci_session074b4d178c387273e3eee244a10cdbafce7e337e
[function.unlink]: Operation not permitted
Filename: drivers/Session_files_driver.php
Line Number: 371
Backtrace:
File: /home/applic/public_html/workshop/application/controllers/Reports.php
Line: 7
Function: __construct
File: /home/applic/public_html/workshop/index.php
Line: 292
Function: require_once
In the config.php file you MUST set sess_save_path to a valid path. It was initially set to NULL.
$config['sess_save_path'] = BASEPATH . 'cache/';
if you create a folder 'sessions' and put it in your application folder you can use this:
$config['sess_save_path'] = APPPATH.'/sessions'
Related
I am trying to host a codeigniter project on IIS Server but I can't get even the default controller to show instead what I receive is this below
A PHP Error was encountered
Severity: 8192
Message: Creation of dynamic property CI_URI::$config is deprecated
Filename: core/URI.php
Line Number: 101
Backtrace:
File: C:\inetpub\wwwroot\app\index.php
Line: 315
Function: require_once
I have web.config file, HTTP mappings, ISAPI, URL rewrite module and FastCGI all set but still the problem persist.
I will be very grateful if you guys can help me, am stranded.
I am trying to run a codeIgniter project downloaded from 1and1.co.uk ....
But when I am browsing it showing this message:
An uncaught Exception was encountered
Type: Error
Message: Class 'CI_Config' not found
Filename: C:\xampp\htdocs\projectname\system\core\Common.php
Line Number: 196
Backtrace:
File: C:\xampp\htdocs\projectname\index.php
Line: 315
Function: require_once
I dont know why?
The class is ok in system/core/config.
Its version in system/core/codeigniter is 3.1.8.
can anyone tell me the reason pls?
Atleast some clue!
never ever faced anything like this before !
You have duplicate config file also in application/core folder which was causing this issue, there should be only one config in application/config folder.
I have issue with From_Validation in Codeigniter.
Everything work fine in localhost, but when I upload the script in the server (online) I get error.
Severity: Notice
Message: Undefined offset: 0
Filename: libraries/Form_validation.php
Line Number: 226
Line: 238 Function: set_rules
Line: 315 Function: require_once
could you please help me with this?
Thank you
I think you need to Rename First letter of your Filename and Controller to Uppercase. because codeigniter controller name work are case sensitive on server.
I'm using CodeIgniter 3 to develop a web app and Ion Auth to manage users' login and logout, I'm using it on localhost on Windows. On logout I got this warning:
Severity: Warning
Message: unlink(
my_path_to_sessions\ci_session04c5acf96846fedf1fa448278e16a4006f6a10a0): Permission denied Filename: drivers/Session_files_driver.php Line
Number: 303
My Session_files_driver at line numbers 302-304:
return file_exists($this->_file_path.$session_id)
? (unlink($this->_file_path.$session_id) && $this->_cookie_destroy())
: TRUE;
In my config file I've set:
$config['sess_save_path'] = APPPATH.'sessions/';
I've also changed permissions for sessions folder.
What's the problem?
I have added the constructor in controller
public function __construct()
{
parent::__construct();
}
which causing this issue so I have removed it and now it's working like charm.
I'm trying to integrate appunto system to my application so I followed the full installation structure from the documentation but all time I got the next message :
An uncaught Exception was encountered
Type: RuntimeException
Message: Unable to locate the model you have specified: Pathmodel
Filename: /var/zpanel/hostdata/zadmin/public_html/git-backup_releasecandidate_net/system/core/Loader.php
Line Number: 344
Backtrace:
File: /var/zpanel/hostdata/zadmin/public_html/git-backup_releasecandidate_net/application/libraries/appunto-auth/Appunto_auth.php
Line: 24
Function: model
File: /var/zpanel/hostdata/zadmin/public_html/git-backup_releasecandidate_net/index.php
Line: 315
Function: require_once
If you are following this guide. You may need to change these lines in Appunto_auth library class.
$this->CI->load->model('appunto-auth/pathmodel');
$this->CI->load->model('appunto-auth/usermodel');
You may remove the appunto-auth folder from the path to the models since they will no longer be in that directory as we have moved it according to the guide.
$this->CI->load->model('pathmodel');
$this->CI->load->model('usermodel');
You may do the same if your app screams about the helper and config files on lines 22 and 15.