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)
      • Plesk on Amazon Web Services (AWS)
      • Plesk on Amazon Web Services (AWS)
      • 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)
      • Plesk on Amazon Web Services (AWS)
      • Plesk on Amazon Web Services (AWS)
      • 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

Plesk scheduled tasks fail due to domain PHP settings not taking effect

 
crondomainsgophpphp settings

Symptoms

  1. Cannot run PHP script via Domains > example.com > Scheduled Tasks:

    PHP Warning: file_get_contents(): http:// wrapper is disabled in the server configuration by allow_url_fopen=0 in /var/www/vhosts/example.com/cron/task.php on line

  2. 'allow_url_fopen' directive is set to 'Off' in the server-wide PHP handler configuration:

    # grep -i 'allow_url_fopen'
    /opt/plesk/php/7.0/etc/php.ini allow_url_fopen=Off

  3. Domain example.com has the same PHP handler selected in Domains > example.com > PHP Settings and allow_url_fopen directive is set to 'On'

OR

  • 'memory_limit' parameter in Domains > example.com > PHP Settings does not take effect for scheduled task:

    PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 4096 bytes) in /var/www/vhosts/example.com/httpdocs/script.php on line 287 

Cause

Custom PHP settings of the domain are not applicable for scheduled task, only directives from global php.ini take effect.

Resolution

Using domain PHP settings for PHP script run by scheduled task is yet to be implemented in Plesk.

Vote for this feature at Plesk UserVoice portal.

The top-ranked suggestions are likely to be included in the next versions of Plesk.

Use either of the following workarounds:

Workaround I

Use Run a command option instead of Run a PHP script in Domains > example.com > Scheduled Tasks. For example, to run
/var/www/vhosts/example.com/cron/task.php
:

/opt/plesk/php/7.0/bin/php -c /var/www/vhosts/system/example.com/etc/php.ini -f '/var/www/vhosts/example.com/cron/task.php'

Pay attention, that 'Access to the server over SSH' should be set as /bin/bash. In order to make it available via /bin/bash (chrooted), refer to this article.

Workaround II

  1. Go to Domains > example.com > PHP Settings and identify PHP handler assigned to the domain
  2. Go to Tools & Settings > PHP Settings, click the handler identified on the previous step and change the required setting there.
Tweet
Share
Share
Email
0 Shares
Read the full article
Related Posts

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

Read More »

How to Host a Go App on Plesk

Read More »

Cron Jobs: All You Need To Know

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 »

Operation in Plesk fail with “Error: no secure shell available”: chroot: failed to run command ‘/bin/bash’: Permission denied

Read More »

Unable to install WordPress using Plesk WordPress Toolkit on CloudLinux : Call to undefined function json_encode()

Read More »

Nextcloud update fails on a domain in Plesk: Step 5 is currently in process. Please call this command later.

Read More »

Hosting Wiki

  • Django
  • Server Redundancy
  • Google Cloud CDN
  • Bare Metal Server
  • PhpMyAdmin
  • phpPgAdmin
  • Oracle VM Server
  • Server Virtualization Software
  • Windows Server
  • Linux
  • PHP
  • MongoDB
  • Domain
  • Plesk
  • Web Server
  • DNS Server
  • SSH
  • Cron Jobs
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