Skip to content
  • Solutions
    By Role
    • For Developers
    • For Content Managers
    • For Agencies
    • For IT Admins
    • For Web Hosters
    • For Developers
    • For Content Managers
    • For Agencies
    • For IT Admins
    • For Web Hosters
    By Infrastructure
    • Overview
    • AWS
    • Microsoft Azure
    • Alibaba Cloud
    • Google Cloud Platform
    • Vultr
    • Overview
    • AWS
    • Microsoft Azure
    • Alibaba Cloud
    • Google Cloud Platform
    • Vultr
    • Digital Ocean
    • Linode
    • Upcloud
    • Oracle
    • OVH
    • Digital Ocean
    • Linode
    • Upcloud
    • Oracle
    • OVH
  • Product
    • Plesk Features
    • Plesk Editions
    • What’s new
    • Pricing
    • Roadmap
    • Lifecycle Policy
    • Extensions Catalogue
  • Pricing
  • Extensions
    Featured Extensions
    • SocialBee
    • WP Toolkit
    • Sitejet Builder for Plesk
    • SEO Toolkit
    • Joomla! Toolkit
    • Premium Email
    • Email Security
    • SocialBee
    • WP Toolkit
    • Sitejet Builder for Plesk
    • SEO Toolkit
    • Joomla! Toolkit
    • Premium Email
    • Email Security
    Bundles and packs:
    • Business and Collaboration Edition
    • WP pack
    • Hosting pack
    • Power pack
    • Language pack
    • Business and Collaboration Edition
    • WP pack
    • Hosting pack
    • Power pack
    • Language pack

    See all Extensions

  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
  • Pricing
  • Solutions
    • By Role
      • For Developers
      • For Content Managers
      • For Agencies
      • For IT Admins
      • For Web Hosters
    • By Infrastructure
      • Overview
      • Plesk on Amazon Web Services (AWS & Lightsail)
      • Microsoft Azure
      • Alibaba Cloud
      • Google Cloud Platform
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
      • Oracle
      • OVH
  • Products
  • Pricing
  • Extensions
    • Featured Extensions
      • SocialBee
      • WP Toolkit
      • Sitejet Builder for Plesk
      • SEO Toolkit
      • Joomla! Toolkit
      • Premium Email
      • Email Security
    • Bundles and packs:
      • Business and Collaboration Edition
      • WP pack
      • Hosting pack
      • Power pack
      • Language pack
      • See all Extensions
  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate Program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
  • Pricing
  • Solutions
    • By Role
      • For Developers
      • For Content Managers
      • For Agencies
      • For IT Admins
      • For Web Hosters
    • By Infrastructure
      • Overview
      • Plesk on Amazon Web Services (AWS & Lightsail)
      • Microsoft Azure
      • Alibaba Cloud
      • Google Cloud Platform
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
      • Oracle
      • OVH
  • Products
  • Pricing
  • Extensions
    • Featured Extensions
      • SocialBee
      • WP Toolkit
      • Sitejet Builder for Plesk
      • SEO Toolkit
      • Joomla! Toolkit
      • Premium Email
      • Email Security
    • Bundles and packs:
      • Business and Collaboration Edition
      • WP pack
      • Hosting pack
      • Power pack
      • Language pack
      • See all Extensions
  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate Program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
Plesk 360 login
Free Trial

Knowledge Base

The PHP session cleaner cron task in Plesk fails: run-parts: /etc/cron.hourly/plesk-php-cleanuper exited with return code 1

 
cronemaillinuxphpplesk service interface

Applicable to:

  • Plesk for Linux

Symptoms

  • Plesk Administrator regularly receives email notifications about the failed plesk-php-cleanuper cron task:

    Subject: cd / && run-parts --report /etc/cron.daily
    Message text: run-parts: /etc/cron.hourly/plesk-php-cleanuper exited with return code 1

  • Manual execution of the /etc/cron.hourly/plesk-php-cleanuper task stops after an operation with the /var/lib/php/sessions/ directory:

    # sh -x /etc/cron.hourly/plesk-php-cleanuper
    + [ -e /etc/cron.d/php -a -x /usr/lib/php/sessionclean ]
    + pgrep -f .*/etc/cron.daily/plesk-php-cleanuper$
    + grep -qv 15249
    + renice 19 -p 15249
    + [ -x /usr/lib/plesk-9.0/maxlifetime ]
    + [ -d /var/lib/php/sessions ]

    The exit code of this command is 1:

    # echo $?
    1

Cause

The cron script fails to execute becase /var/lib/php/sessions and /var/lib/php directories are missing on the server:

# ls -la /var/lib/php
ls: cannot access '/var/lib/php': No such file or directory
# ls -la /var/lib/php/sessions
ls: cannot access '/var/lib/php/sessions': No such file or directory

Resolution

  1. Connect to the server via SSH.

  2. Create missing /var/lib/php and /var/lib/php/sessions directories:

    # mkdir /var/lib/php
    # mkdir /var/lib/php/sessions

  3. Set the correct permissions for these directories:

    # chmod 755 /var/lib/php
    # chmod 1733 /var/lib/php/sessions

To verify the execution of the `plesk-php-cleanuper` cron task
  • Execute the task manually:

    # sh -x /etc/cron.hourly/plesk-php-cleanuper

  • After the execution is finished, check the exit code. It should be 0 which means success:

    # echo $?
    0

Tweet
Share
Share
Email
0 Shares
Read the full article
Related Posts

How to Check Open Ports in Linux (Simple Commands & Tools)

Read More »

Linux Logs Explained

Read More »

Ruby on Rails vs PHP: Which one’s right for your needs?

Read More »
Knowledge Base

On Plesk for Linux server, curl command in chrooted shell or in scheduled task fails: curl: (77) error setting certificate verify locations

Read More »

Operations in Plesk fail: Allowed memory size of X bytes exhausted (tried to allocate Y bytes)

Read More »

Watchdog script “secur-check” fails in Plesk: Zend_Exception: No entry is registered for key ‘container’

Read More »

Unable to send email via PHP on a Plesk server: Rejecting message: system user uid=’XXXX’ is not allowed to send mail

Read More »

Hosting Wiki

  • Server Redundancy
  • Linux Containers
  • Bare Metal Server
  • PhpMyAdmin
  • phpPgAdmin
  • Oracle VM Server
  • Server Virtualization Software
  • Windows Server
  • Linux
  • PHP
  • Plesk
  • Web Server
  • DNS Server
  • SSH
  • Cron Jobs
  • Email Autoresponder
  • Email Alias
  • Email Virus Protection
  • Email Forwarding
X-twitter Linkedin Youtube Reddit Github
  • Product
  • Login
  • Pricing
  • Editions
  • For Partners
  • Partner Program
  • Contributor Program
  • Affiliate Program
  • Plesk University
  • Company
  • Blog
  • Careers
  • Events
  • About Plesk
  • Our Brand
  • Resources
  • User and Admin guides
  • Help Center
  • Migrate to Plesk
  • Contact Us
  • Hosting Wiki
  • Forum
  • Legal
  • Legal
  • Privacy Policy
  • Imprint

© 2025 WebPros International GmbH

Part of the WebPros®  Family