Florian Wald | 29 Sep 15:22 2011
Picon

Exception <at> session_start(): ps_files_cleanup_dir: opendir(/var/lib/php5)

Hi,
i am doing many ajax-requests at one time on my dev environment and was wondering why i am getting sometimes at only one request the following 500 internal server error (logged with firebug from the Answer of the request)

Notice: session_start(): ps_files_cleanup_dir: opendir(/var/lib/php5) failed: Permission denied (13) in /var/www/Symfony/app/cache/dev/classes.php line 398
The stacktrace:

Stack Trace

  1. in /var/www/Symfony/vendor/symfony/src/Symfony/Component/HttpKernel/Debug/ErrorHandler.php at line 65 
    1.         }

    2.         if (error_reporting() & $level && $this->level $level) {
    3.             throw new \ErrorException(sprintf('%s: %s in %s line %d', isset($this->levels[$level]) ? $this->levels[$level] : $level$message$file$line));
    4.         }

    5.         return false;
  2. at ErrorHandler ->handle ('8', 'session_start(): ps_files_cleanup_dir: opendir(/var/lib/php5) failed: Permission denied (13)', '/var/www/Symfony/app/cache/dev/classes.php', '398', array())
    in at line  
  3. at session_start ()
    in kernel.root_dir/cache/dev/classes.php at line 398 
  4. at NativeSessionStorage ->start ()
    in kernel.root_dir/cache/dev/classes.php at line 117 
  5. at Session ->start ()
    in kernel.root_dir/cache/dev/classes.php at line 43 
  6. at SessionListener ->onKernelRequest (object(GetResponseEvent))
    in at line  
  7. at call_user_func (array(object(SessionListener), 'onKernelRequest'), object(GetResponseEvent))
    in /var/www/Symfony/vendor/symfony/src/Symfony/Bundle/FrameworkBundle/Debug/TraceableEventDispatcher.php at line 82 
  8. at TraceableEventDispatcher ->doDispatch (array(array(object(RouterListener), 'onEarlyKernelRequest'), array(object(SessionListener), 'onKernelRequest'), array(object(Firewall), 'onKernelRequest'), array(object(RouterListener), 'onKernelRequest'), array(object(RequestListener), 'onKernelRequest')), 'kernel.request', object(GetResponseEvent))
    in kernel.root_dir/cache/dev/classes.php at line 3678 
  9. at EventDispatcher ->dispatch ('kernel.request', object(GetResponseEvent))
    in kernel.root_dir/cache/dev/classes.php at line 4748 
  10. at ContainerAwareEventDispatcher ->dispatch ('kernel.request', object(GetResponseEvent))
    in kernel.root_dir/cache/dev/classes.php at line 3864 
  11. at HttpKernel ->handleRaw (object(Request), '1')
    in kernel.root_dir/cache/dev/classes.php at line 3850 
  12. at HttpKernel ->handle (object(Request), '1', true)
    in kernel.root_dir/cache/dev/classes.php at line 4785 
  13. at HttpKernel ->handle (object(Request), '1', true)
    in kernel.root_dir/bootstrap.php.cache at line 547 
  14. at Kernel ->handle (object(Request))
    in /var/www/Symfony/web/app_dev.php at line 22 


Any suggestions here? I am a total noob when getting into symfony kernel details. Maybe i am doing something wrong, or perhabs this won't ever happen on the production environment. I don't know.

king regards,
Flo

--
If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com
 
You received this message because you are subscribed to the Google
Groups "Symfony2" group.
To post to this group, send email to symfony2-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
symfony2+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/symfony2?hl=en
Luis Cordova | 29 Sep 16:43 2011
Picon

Re: Exception <at> session_start(): ps_files_cleanup_dir: opendir(/var/lib/php5)

known issue check the issues

On Thu, Sep 29, 2011 at 8:22 AM, Florian Wald <flo.wald-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
Hi,
i am doing many ajax-requests at one time on my dev environment and was wondering why i am getting sometimes at only one request the following 500 internal server error (logged with firebug from the Answer of the request)

Notice: session_start(): ps_files_cleanup_dir: opendir(/var/lib/php5) failed: Permission denied (13) in /var/www/Symfony/app/cache/dev/classes.php line 398
The stacktrace:

Stack Trace

  1. in /var/www/Symfony/vendor/symfony/src/Symfony/Component/HttpKernel/Debug/ErrorHandler.php at line 65 
    1.         }

    2.         if (error_reporting() & $level && $this->level $level) {
    3.             throw new \ErrorException(sprintf('%s: %s in %s line %d', isset($this->levels[$level]) ? $this->levels[$level] : $level$message$file$line));
    4.         }

    5.         return false;
  2. at ErrorHandler ->handle ('8', 'session_start(): ps_files_cleanup_dir: opendir(/var/lib/php5) failed: Permission denied (13)', '/var/www/Symfony/app/cache/dev/classes.php', '398', array())
    in at line  
  3. at session_start ()
    in kernel.root_dir/cache/dev/classes.php at line 398 
  4. at NativeSessionStorage ->start ()
    in kernel.root_dir/cache/dev/classes.php at line 117 
  5. at Session ->start ()
    in kernel.root_dir/cache/dev/classes.php at line 43 
  6. at SessionListener ->onKernelRequest (object(GetResponseEvent))
    in at line  
  7. at call_user_func (array(object(SessionListener), 'onKernelRequest'), object(GetResponseEvent))
    in /var/www/Symfony/vendor/symfony/src/Symfony/Bundle/FrameworkBundle/Debug/TraceableEventDispatcher.php at line 82 
  8. at TraceableEventDispatcher ->doDispatch (array(array(object(RouterListener), 'onEarlyKernelRequest'), array(object(SessionListener), 'onKernelRequest'), array(object(Firewall), 'onKernelRequest'), array(object(RouterListener), 'onKernelRequest'), array(object(RequestListener), 'onKernelRequest')), 'kernel.request', object(GetResponseEvent))
    in kernel.root_dir/cache/dev/classes.php at line 3678 
  9. at EventDispatcher ->dispatch ('kernel.request', object(GetResponseEvent))
    in kernel.root_dir/cache/dev/classes.php at line 4748 
  10. at ContainerAwareEventDispatcher ->dispatch ('kernel.request', object(GetResponseEvent))
    in kernel.root_dir/cache/dev/classes.php at line 3864 
  11. at HttpKernel ->handleRaw (object(Request), '1')
    in kernel.root_dir/cache/dev/classes.php at line 3850 
  12. at HttpKernel ->handle (object(Request), '1', true)
    in kernel.root_dir/cache/dev/classes.php at line 4785 
  13. at HttpKernel ->handle (object(Request), '1', true)
    in kernel.root_dir/bootstrap.php.cache at line 547 
  14. at Kernel ->handle (object(Request))
    in /var/www/Symfony/web/app_dev.php at line 22 


Any suggestions here? I am a total noob when getting into symfony kernel details. Maybe i am doing something wrong, or perhabs this won't ever happen on the production environment. I don't know.

king regards,
Flo

--
If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com
 
You received this message because you are subscribed to the Google
Groups "Symfony2" group.
To post to this group, send email to symfony2-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
symfony2+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/symfony2?hl=en

--
If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com
 
You received this message because you are subscribed to the Google
Groups "Symfony2" group.
To post to this group, send email to symfony2-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
symfony2+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/symfony2?hl=en
Florian Wald | 29 Sep 20:41 2011
Picon

Re: Exception <at> session_start(): ps_files_cleanup_dir: opendir(/var/lib/php5)

Thank you for your reply. Unfortunately it seems i cannot find the issue.

--
If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com
 
You received this message because you are subscribed to the Google
Groups "Symfony2" group.
To post to this group, send email to symfony2-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
symfony2+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/symfony2?hl=en
Luis Cordova | 29 Sep 20:44 2011
Picon

Re: Exception <at> session_start(): ps_files_cleanup_dir: opendir(/var/lib/php5)

this I remember happened when you were using entities without
annotations or the such, if you annotate all then it will not happen,
but it could be due to other causes.

On Thu, Sep 29, 2011 at 1:41 PM, Florian Wald <flo.wald@...> wrote:
> Thank you for your reply. Unfortunately it seems i cannot find the issue.
>

--

-- 
If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "Symfony2" group.
To post to this group, send email to symfony2@...
To unsubscribe from this group, send email to
symfony2+unsubscribe@...
For more options, visit this group at
http://groups.google.com/group/symfony2?hl=en

Gustavo Falco | 29 Sep 20:52 2011
Picon

Re: Exception <at> session_start(): ps_files_cleanup_dir: opendir(/var/lib/php5)

I remember that I had similar issues working on linux, specifically with debian/ubuntu. What I don't remember is how I fixed it. Googling a little I've found this:


Look at the last comments. Yes, they're old, but I think I had to change the configuration of the garbage collection of the session. So far, I have no problems anymore.

If anyone knows if this is the exact reason of the issue, or if there's another one, please, share it with us.



Cheers.

2011/9/29 Luis Cordova <cordoval-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
this I remember happened when you were using entities without
annotations or the such, if you annotate all then it will not happen,
but it could be due to other causes.

On Thu, Sep 29, 2011 at 1:41 PM, Florian Wald <flo.wald-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> Thank you for your reply. Unfortunately it seems i cannot find the issue.
>

--
If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "Symfony2" group.
To post to this group, send email to symfony2-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
symfony2+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/symfony2?hl=en

--
If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com
 
You received this message because you are subscribed to the Google
Groups "Symfony2" group.
To post to this group, send email to symfony2-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
symfony2+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/symfony2?hl=en
Florian Wald | 30 Sep 09:49 2011
Picon

Re: Exception <at> session_start(): ps_files_cleanup_dir: opendir(/var/lib/php5)

Thank you very much!
I wrote my own garbage collector with cron, as someone stated to do this, following the link Gustavo Adrian provided.
i set up the session save path to use subdirectories (set up with php's mod_files.sh within ext/sessions). [session.save_path].
cron job "cd /path/to/sessions; find -cmin +24 | xargs rm"

--
If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com
 
You received this message because you are subscribed to the Google
Groups "Symfony2" group.
To post to this group, send email to symfony2-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
symfony2+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/symfony2?hl=en

Gmane