We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 5689
    • 289 Posts
    For about two or three weeks now, I’ve had a cron job that runs every 5 minutes as part of an email subscription system I set up for my church. Yesterday something changed with our hosting server (it’s shared hosting with Hostmonster) and now I’m getting an email every time the cron job runs because these headers are being outputted:

    X-Powered-By: PHP/5.2.13
    P3P: CP="NOI NID ADMa OUR IND UNI COM NAV"
    Cache-Control: private, must-revalidate
    Set-Cookie: SN4b2c59593456c=4ql5n8rl157cj8tmb7o67bjh95; path=/
    Set-Cookie: SN4b2c59593456c=4ql5n8rl157cj8tmb7o67bjh95; path=/
    Content-type: text/html


    The Set-Cookie values change every time, but otherwise it’s the same thing every time it runs.

    I did some Googling and read that I should set "expose_php = Off" in my php.ini, but I did so and it didn’t change anything. I’m not completely sure the php.ini file is being read by the server, but I told it to in cPanel and I believe I did it correctly.

    I might submit a support ticket with Hostmonster, but they haven’t been too helpful lately. What else can I do to get rid of the headers so I stop getting the status emails from the cron job? Also, I do want to get the emails when something goes wrong, so I can’t just disable the emails for the cron job.

    Thanks!
      I'm learning more about MODx all the time and loving it.
      • 5689
      • 289 Posts
      I used phpinfo() to make sure Apache is loading my custom php.ini file. It is, and the expose_php setting is listed as Off. So that’s not the problem.
        I'm learning more about MODx all the time and loving it.
        • 5689
        • 289 Posts
        That looks interesting and it might be what I need. The only thing is that sometimes I get a database error, which causes MODx to output some HTML with SQL errors and info. If I use Chronic, is it going to ignore that?
          I'm learning more about MODx all the time and loving it.
          • 32699 ☆ A M B ☆
          • 427 Posts
          Take another look at the actual cron script. You mat simply be able to comment out these headers, while leaving legitimate errors forwarding.

          You may also want to send an e-mail to the host and / or developer of the software you are using to let them fix it.
            Get your copy of MODX Revolution Building the Web Your Way http://www.sanitypress.com/books/modx-revolution-building-the-web-your-way.html

            Check out my MODX || xPDO resources here: http://www.shawnwilkerson.com
            • 5689
            • 289 Posts
            I wrote the cron script and I’m sure that the headers are not being set by me. I did find that at least two of the headers were being set by MODx, but the others are definitely not.

            The strangest thing about it is that this just suddenly started happening, so the host must have changed something. I’ll send Hostmonster and email and see what they have to say.
              I'm learning more about MODx all the time and loving it.