• Resolved Tobys

    (@tobys)


    Hi

    I’ve disabled the default WordPress cron and setup a cronjob once a day with cPanel.

    Everytime it runs it sends me an email with the following error:
    Notice: Undefined index: SCRIPT_FILENAME in wp-content/plugins/wordfence/lib/wordfenceClass.php on line 1059

Viewing 4 replies - 1 through 4 (of 4 total)
  • It may be the way you invoke PHP in your cron command. Have a look at this article for more information. I suspect SCRIPT_FILENAME is available on your server, so you may just need to change the command in cron.

    Hi @tobys

    I second what @linux4me2 mentioned (thanks for helping out!), I also wanted to know which hosting provider your website is hosted at and which PHP version is installed on the server?

    Thanks.

    Thread Starter Tobys

    (@tobys)

    Sorry for late answer, replys went to my spam mail.

    I am using a dedicated VPS hosting, I have other WordPress sites that are working fine. Latest version of PHP 7.2

    Hi @tobys,
    SCRIPT_FILENAME is a PHP variable that should always be present on the server. I agree with previous comments that this is probably related to how you are invoking the cron.

    I am presuming you’ve resolved the issue by reading the linked article above so resolving this thread for now but don’t hesitate to create a new one if you have other questions or concerns.

    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Undefined index: SCRIPT_FILENAME in wordfenceClass.ph’ is closed to new replies.