#StackBounty: #php #cron #command-line-interface #require PHP require() or include() stops the script without errors

Bounty: 50

I have this code:

echo "1 - is_readable: " . is_readable("/mnt/persist/www/docroot/wp-load.php") . "rn";
echo "2 - file_exists: " . file_exists("/mnt/persist/www/docroot/wp-load.php") . "rn";
echo "3 - before requirern";
echo "4 - after requirern";

But the output is strange:

1 - is_readable: 1
2 - file_exists: 1
3 - before require

This situation appears when I start script from CLI or CRON, when I
start it directly in browser – all is fine.

What is happened echo 4 doesn’t display?
Also I’ve tried to require another file, result is the same.

Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.