4

This is a screenshot with the error dump: any idea what can be caused of this?

I occassionaly get this error while browsing a website i am developing. Obviously session can't be started but i have no idea how to prevent this error because it occurs randomly (as it seems to me). Any idea how can I prevent this error to occur?

t j
  • 7,026
  • 12
  • 46
  • 66
clime
  • 8,695
  • 10
  • 61
  • 82
  • 1
    Please post some bootstrap code and your `configs/application.ini`, at least the parts relevant to session handling. – David Weinraub Feb 24 '12 at 04:51
  • 8
    duplicate: http://stackoverflow.com/questions/2930870/zend-session-zend-auth-randomly-throws-error-message-ps-files-cleanup-dir-ope – Liyali Feb 24 '12 at 05:10
  • 5
    What is happening is that PHP is trying to do garbage collection on the session files, and for some reason the executing process doesn't have permission to manipulate the directory `/var/lib/php5`. If session GC is going to be initiated, it happens when you call session_start. See Liyali's link for a fix. – drew010 Feb 24 '12 at 05:52

1 Answers1

0

I faced the same error and found the root case that PHP application was developed using PHP 5.6. Later on, I installed PHP 7.2 & trying to run PHP 5.6 application using PHP 7.2. Disabling PHP 7.2 worked for me.

Sharing below commands for reference:

sudo a2dismod php7.2 
sudo a2enmod php5.6 
sudo service apache2 restart 
sudo update-alternatives --set php /usr/bin/php5.6 
sudo update-alternatives --set phar /usr/bin/phar5.6 
sudo update-alternatives --set phar.phar /usr/bin/phar.phar5.6
user2712873
  • 174
  • 1
  • 2