Hi all,
I am trying to move my site from a VPS with cpanel to my own server with Plesk on linux. Everything is running fine apart from some php scripts which I have to email contact forms, tidy databases etc.
I have a domain my-domain.com and a subdomain tools.my-domain.com
If I run tools/my-domain.com/email-enquiries.php then it executes no problem.
If I setup a scheduled task (under the subdomain tools.my-domain.com and tell it to run the php file /tools.my-domain.com/email-enquiries.php then click "run now" it says completed with error and which I got to look at the details it says:
A previous post with a similar topic suggested something to do with permissions - but the file email-enquiries.php and the file it is trying to INCLUDE are both owned by the same user (who is the only user I have)
Can anyone suggest where I am going wrong? There's clearly nothing wrong with the php as it executes in the browser - and executes both in the browser and via cron on my current (albeit not plesk) server so it must be something to do with my configuration but I'm stumped...
Thanks
I am trying to move my site from a VPS with cpanel to my own server with Plesk on linux. Everything is running fine apart from some php scripts which I have to email contact forms, tidy databases etc.
I have a domain my-domain.com and a subdomain tools.my-domain.com
If I run tools/my-domain.com/email-enquiries.php then it executes no problem.
If I setup a scheduled task (under the subdomain tools.my-domain.com and tell it to run the php file /tools.my-domain.com/email-enquiries.php then click "run now" it says completed with error and which I got to look at the details it says:
Code:
Task "tools.my-domain.com/email-enquiries.php" completed with error in 0 seconds, output:
PHP Warning: include(./header.php): failed to open stream: No such file or directory in /var/www/vhosts/my-domain.com/tools.my-domain.com/email-enquiries.php on line 9
PHP Warning: include(./header.php): failed to open stream: No such file or directory in /var/www/vhosts/my-domain.com/tools.my-domain.com/email-enquiries.php on line 9
PHP Warning: include(): Failed opening './header.php' for inclusion (include_path='.:/opt/plesk/php/7.4/share/pea...
A previous post with a similar topic suggested something to do with permissions - but the file email-enquiries.php and the file it is trying to INCLUDE are both owned by the same user (who is the only user I have)
Can anyone suggest where I am going wrong? There's clearly nothing wrong with the php as it executes in the browser - and executes both in the browser and via cron on my current (albeit not plesk) server so it must be something to do with my configuration but I'm stumped...
Thanks