Welcome Guest, Not a member yet? Register   Sign In
Message: unlink(/tmp/ci_sessionaa51644b4360c8f6957d2c733): Operation not permitted
#1

(This post was last modified: 07-27-2016, 11:07 PM by MasoodRehman.)

Server Throw this Error Periodically on localhost everything seems ok, I don't know why?

A PHP Error was encountered

Severity: Warning
Message: unlink(/tmp/ci_sessionaa51644b4360c8f6957d2c73286368e57f29f403): Operation not permitted
Filename: drivers/Session_files_driver.php
Line Number: 371
Backtrace:
File: /home/sandbox/public_html/dev/project-x/application/client/core/MY_Controller.php
Line: 15
Function: __construct

File: /home/sandbox/public_html/dev/project-x/application/client/controllers/Homepage.php
Line: 18
Function: __construct

File: /home/sandbox/public_html/dev/project-x/index.php
Line: 358
Function: require_once
Reply
#2

Your url paths do not look correct for CodeIgniter

./application
-- /core
-- /controllers

were are you get the client from?
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#3

(This post was last modified: 07-27-2016, 08:53 AM by arma7x.)

set permission folder 777 for $config['sess_save_path'] folder(config.php). If you don't define, fallback to default value in php.ini. Alternative, create folder to store session in your client folder and set $config['sess_save_path'] = APPPATH.'sessionfoldername'.

@InsiteFX, you can set $application_folder = 'path/to/application/folder' in index.php
Keep calm.
Reply
#4

You should never set the permissions for anything to 777 on a web server. There's a detailed answer to why this is the case (and what you should do instead) here: http://serverfault.com/questions/357108/...-webserver

Generally, your server should already have a session path to which the web server has appropriate permissions, so it's just a matter of setting the sess_save_path value to the correct absolute path for your server. If you don't wish to use the default path for your OS, then you should follow the instructions above to configure a directory with the appropriate permissions.
Reply
#5

@InsiteFX: I have to folder in application
- application
- client
- cpanel

And index.php deiced which application have to call by changing the $application_folder path at run time.
This is the way i manage more then one app in a single conditioner installation (if you have any better approach please mention).

Thank you.
Reply
#6

(This post was last modified: 07-27-2016, 11:02 PM by MasoodRehman.)

@arma7x here is my config.php Session Variables section

$config['sess_driver'] = 'files';
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 7200;
$config['sess_save_path'] = NULL;
$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 300;
$config['sess_regenerate_destroy'] = FALSE;

I think i have to use database driver then no path will be defined and give permission to any folder, am i correct?
Reply
#7

(This post was last modified: 07-27-2016, 11:05 PM by MasoodRehman.)

@mwhitney Thank you for your reply.
Reply
#8

(07-27-2016, 11:01 PM)MasoodRehman Wrote: @arma7x here is my config.php Session Variables section

$config['sess_driver'] = 'files';
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 7200;
$config['sess_save_path'] = NULL;
$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 300;
$config['sess_regenerate_destroy'] = FALSE;

I think i have to use database driver then no path will be defined and give permission to any folder, am i correct?

$config['sess_save_path'] must be defined according to the driver you are using. In the case of the files driver, it must be an absolute path to a writable directory. In the case of the database driver, it must be the name of a table in your database which has been created with the structure outlined in the user guide.

You will almost always run into errors if sess_save_path is NULL.
Reply
#9

(07-28-2016, 09:41 AM)mwhitney Wrote:
(07-27-2016, 11:01 PM)MasoodRehman Wrote: @arma7x here is my config.php Session Variables section

$config['sess_driver'] = 'files';
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 7200;
$config['sess_save_path'] = NULL;
$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 300;
$config['sess_regenerate_destroy'] = FALSE;

I think i have to use database driver then no path will be defined and give permission to any folder, am i correct?

$config['sess_save_path'] must be defined according to the driver you are using. In the case of the files driver, it must be an absolute path to a writable directory. In the case of the database driver, it must be the name of a table in your database which has been created with the structure outlined in the user guide.

You will almost always run into errors if sess_save_path is NULL.

Ooops got it thank so much thats why i face this issue.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB