ifm1989 Posted November 30, 2007 Share Posted November 30, 2007 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 More sharing options...
hannibal Posted March 10, 2008 Share Posted March 10, 2008 Does anyone have a reply for this as I am in the same boat? Thanks, H. Link to comment https://forums.phpfreaks.com/topic/79618-secure-cron-jobs/#findComment-488406 Share on other sites More sharing options...
trq Posted March 10, 2008 Share Posted March 10, 2008 How about... include '/home/my_site/public_html/core.php'; Link to comment https://forums.phpfreaks.com/topic/79618-secure-cron-jobs/#findComment-488409 Share on other sites More sharing options...
hannibal Posted March 10, 2008 Share Posted March 10, 2008 I will give that a try and post whether it solved my issue. Mega thanks for the instant reply Thorpe! H. Link to comment https://forums.phpfreaks.com/topic/79618-secure-cron-jobs/#findComment-488411 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.