PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Wednesday, February 16, 2022

[FIXED] How to Fix the ‘No Space Left on Device’ Error on CENTOS 7.6

 February 16, 2022     cakephp, centos, linux, php     No comments   

Issue

I am using cakephp 2 and getting this error many time

Warning (2): session_start(): open(/var/cpanel/php/sessions/ea-php71/sess_b6d87a5fe83ae3af3d27866faeabac35, O_RDWR) failed: No space left on device (28) [CORE/Cake/Model/Datasource/CakeSession.php, line 743]

But my server have too much space

Current Disk Usage Information

Device  Size    Used    Available   Percent Used    Mount Point
    /dev/loop0  3.9G    8.4M    3.7G    1%  /tmp
    /dev/sda1   1.8T    424G    1.3T    26% /

I restarted server but still getting same error

How to fix this issue ?


Solution

Solution

Set session path

ini_set('session.save_path',realpath(dirname($_SERVER['DOCUMENT_ROOT']) . '/tmp'));
ini_set('session.gc_probability', 1);
session_start();

http://php.net/manual/en/function.session-save-path.php

OR Update session path at php.ini

/opt/cpanel/ea-php71/root/etc/php.ini


Answered By - Yogesh Saroya
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing