skip to Main Content

I entered the following command through plesk (control panel) crontab, to run a php file once an hour:

php httpdocs/cron/script.php

And I am getting the following 2 error messages (once an hour, to my email):

PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/' -
/usr/lib/php/modules/ cannot open shared object file: No such file or directory in
Unknown on line 0
PHP Warning:  require_once(): open_basedir restriction in effect.
File(../include/functions.php) is not within the allowed path(s):
(/var/www/vhosts/ in /var/www/vhosts/
on line 2
PHP Warning:  require_once(../include/functions.php): failed to open stream: Operation not
permitted in /var/www/vhosts/ on line 2
PHP Fatal error:  require_once(): Failed opening required '../include/functions.php'
(include_path='.:') in /var/www/vhosts/ on line 2

Note: Line 2 has require_once(../include/functions.php);

I realized these are 2 different issues. I tried solving each separately and they are both still with me. Any help would be appreciated. Thanks



  1. Please check below, maybe it will help you.

    Login or Signup to reply.
  2. When you run PHP like this, configuration set in Plesk-specific and Apache-specific places like vhost.conf doesn’t apply.

    Since your script is already inside httpdocs, why don’t you just use wget/curl to invoke the script through HTTP? Something like /usr/bin/curl 2>&1. Might want to consider some additional validation (IP limiting, htpasswd auth) to make sure random visitors (script kiddies) can’t run it.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top