|
-
Apr 29th, 2013, 07:16 AM
#1
Thread Starter
Hyperactive Member
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
-
Apr 29th, 2013, 12:45 PM
#2
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,...
-
May 1st, 2013, 04:08 PM
#3
Thread Starter
Hyperactive Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|