Jump to content

secure cron jobs


ifm1989

Recommended Posts

I have a server with apache/cpanel 10.

 

I started a new cron command which succeeds in calling a file:

 

php /home/my_site/public_html/cron/messages_cron.php

 

Problem: I don't want some random user trying to access the script. Therefore, I tried moving it into a different folder than public_html

 

Example:

 

php /home/my_site/cron/messages_cron.php

 

Problem: I needed to include a file called core.php which was located in public_html, and I couldn't figure out a way to do so. Any ideas? I tried:

 

require_once "../public_html/filename.php";

 

That didn't seem to work.

Link to comment
https://forums.phpfreaks.com/topic/79618-secure-cron-jobs/
Share on other sites

  • 3 months later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.