Results 1 to 3 of 3

Thread: cron php how to stop headers in append to file

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Oct 2004
    Posts
    259

    cron php how to stop headers in append to file

    cron command:

    Code:
      /user/bin/php "/path/Script.php" >> /path/LogFile.html
    when php outputs to my log file, it always starts off by saying

    Code:
      X-Powered-By: PHP/5.3.22 Content-type: text/html
    so with my output file, it looks something like:

    Code:
    X-Powered-By: PHP/5.3.22 Content-type: text/html X-Powered-By: PHP/5.3.22 Content-type: text/html X-Powered-By: PHP/5.3.22 Content-type: text/html X-Powered-By: PHP/5.3.22 Content-type: text/html
     NEW DAY MARKER | 29/04/2013 00:00:07
     Total Exchanges: 73294
     Total GMT references: 7
     Exchanges pending approval: 4
    the output is in a table format, causing the the repeated text/html header to flood the first 4 or 5 pages of my log file - because they are between

    Code:
       </tr> X-Powered-By: text/html <tr>
    tags.

    is there anyway i can tell it not to put out that kind of header information when running cron jobs? (i don't want to disable it globaly - need web interface to still work with other PHP scripts)

    linux host, cpanel, vps


    (THANK BINARY GOD THERE IS A PHP FORUM HERE! i hate stack exchange. way too pretentious. )
    ----------------------------------------------------

    Missing the days of GWBasic 1.1
    WaxyStudios.com

  2. #2
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,652

    Re: cron php how to stop headers in append to file

    Try adding -q to it.


    If my post was helpful to you, then express your gratitude using Rate this Post.
    And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
    My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet

    Social Group: VBForums - Developers from India


    Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Oct 2004
    Posts
    259

    Re: cron php how to stop headers in append to file

    Thanks
    ----------------------------------------------------

    Missing the days of GWBasic 1.1
    WaxyStudios.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width