A little quick history:
All was working flawlessly until one day in early Dec 2016 it became apparent someone had gotten into my web server and hacked the blazes out of it using Joomla (?) after “fighting” with the web host personnel and their insistence that no one had access to my site unless I gave out the passwords (which I would never do even at gun point or threat of anything) they finally admitted someone had hacked their system and was messing with all the site… hacking them.
Also of note, every one of my scheduled CRON jobs were deleted and removed. The php.ini and htaccess files were edited/modified once per day at exactly 01:30 like clockwork. This is what saved my rear with the hosting service after they checked for MalWare on my site (reporting clean) and finally realizing the site was being redirected off site to another server.
In my attempt to circumvent the consistent re-directing and re-writing of my php.ini and htaccess files I literally deleted the entire site including every directory and sub directory and left it to sit idle over Christmas. 26 Dec I re-uploaded my entire website. All went well with a few minor bumps.
Now all is well save my CRON jobs. I have re-entered them and they appear to be working yet the nws-alerts header on the index page is NOT updating… however, if I manually run the script NWS-ALERTS.PHP it works exactly as it is supposed to and updates the index page as is expected.
My CRON is currently set up as follows:
*/3 * * * * php -q /root/personal/public_html/nws-alerts.php > nws-alerts-status.txt 2>&1 (the nws-alerts-status.txt is so I can see if there are any errors encountered). Once the script is working properly I shall remove the writing of the nws-alerts-status.txt. NOTE: The directory structure: /root/personal/public_html is NOT a true representation of the actual path as they were changed for security purposes… PHP version running is 5.6.1
The result of the nws-alerts-status.txt is as follows:
In the error_Log.txt in my root I have the following error:
PHP Notice: Undefined index: SERVER_NAME in /root/personal/public_html/nws-alerts.php
When checking the proper directories (cache) all the files show that have been updated with the last 3 minutes depending on time elapsed since last run.
So my question is simply… if I am getting no apparent errors, the script is presumably operating properly, why is it not updating on the index page unless I actually and MANUALLY type it in the web browser (http://www.k3jae.com/nws-alerts.php) … then it works EXACTLY as it is supposed to?
I can let the script run over an hour in the CRON and nothing changes on the webpage… run it via the browser and it immediately updates the index page with current info. :?