CodeIgniter Forums
Message: unlink(/tmp/ci_sessionaa51644b4360c8f6957d2c733): Operation not permitted - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: Message: unlink(/tmp/ci_sessionaa51644b4360c8f6957d2c733): Operation not permitted (/showthread.php?tid=65811)



Message: unlink(/tmp/ci_sessionaa51644b4360c8f6957d2c733): Operation not permitted - MasoodRehman - 07-27-2016

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



RE: Message: unlink(/tmp/ci_sessionaa51644b4360c8f6957d2c733): Operation not permitted - InsiteFX - 07-27-2016

Your url paths do not look correct for CodeIgniter

./application
-- /core
-- /controllers

were are you get the client from?


RE: Message: unlink(/tmp/ci_sessionaa51644b4360c8f6957d2c733): Operation not permitted - arma7x - 07-27-2016

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


RE: Message: unlink(/tmp/ci_sessionaa51644b4360c8f6957d2c733): Operation not permitted - mwhitney - 07-27-2016

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/what-permissions-should-my-website-files-folders-have-on-a-linux-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.


RE: Message: unlink(/tmp/ci_sessionaa51644b4360c8f6957d2c733): Operation not permitted - MasoodRehman - 07-27-2016

@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.


RE: Message: unlink(/tmp/ci_sessionaa51644b4360c8f6957d2c733): Operation not permitted - MasoodRehman - 07-27-2016

@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?


RE: Message: unlink(/tmp/ci_sessionaa51644b4360c8f6957d2c733): Operation not permitted - MasoodRehman - 07-27-2016

@mwhitney Thank you for your reply.


RE: Message: unlink(/tmp/ci_sessionaa51644b4360c8f6957d2c733): Operation not permitted - mwhitney - 07-28-2016

(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.


RE: Message: unlink(/tmp/ci_sessionaa51644b4360c8f6957d2c733): Operation not permitted - MasoodRehman - 07-29-2016

(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.