From:             
Operating system: any
PHP version:      5.4.0RC3
Package:          *General Issues
Bug Type:         Feature/Change Request
Bug description:ADD DATE TIME FOR CONSOLE WARNINGS

Description:
------------
hi guys, i´m running a console program, it never ends just when computer
is restarted
my problem is...
some times php show a error (warning) like this:
Warning: mysql_ping(): MySQL server has gone away in
/home/apache/172.16.0.254/rdm-business/system/db/database.types.spadim on
line 982

the problem is... when it happened?
a good help could be a function like this:
error_messages_show_date_time($date_time_yes_no,$program_uptime)
to select if add or not date time, for example..

error_messages_show_date_time(1,0)
Warning: [2011-12-23 03:55:00 BRST] mysql_ping(): MySQL server has gone
away in
/home/apache/172.16.0.254/rdm-business/system/db/database.types.spadim on
line 982

error_messages_show_date_time(0,0)
Warning: mysql_ping(): MySQL server has gone away in
/home/apache/172.16.0.254/rdm-business/system/db/database.types.spadim on
line 982

AND the second option could be:
error_messages_show_date_time(0,1)
Warning: [123455 seconds uptime] mysql_ping(): MySQL server has gone away
in /home/apache/172.16.0.254/rdm-business/system/db/database.types.spadim
on line 982

error_messages_show_date_time(1,1)
Warning: [2011-12-23 03:55:00 BRST, 123455 seconds uptime] mysql_ping():
MySQL server has gone away in
/home/apache/172.16.0.254/rdm-business/system/db/database.types.spadim on
line 982


:) this help a lot!! for web pages it´s not a big diference... just for
console based programs

Test script:
---------------
any program with erros or warnings some thing like this could work:
<?php
error_messages_show_date_time(0,0);
file_get_contents("http://some_ip_that_dont_exists/some_file.txt";);
sleep(10);
error_messages_show_date_time(0,1);
file_get_contents("http://some_ip_that_dont_exists/some_file.txt";);
sleep(10);
error_messages_show_date_time(1,0);
file_get_contents("http://some_ip_that_dont_exists/some_file.txt";);
sleep(10);
error_messages_show_date_time(1,1);
file_get_contents("http://some_ip_that_dont_exists/some_file.txt";);
?>

Expected result:
----------------
at request descrition...

Actual result:
--------------
just warning without date time and program uptime

-- 
Edit bug report at https://bugs.php.net/bug.php?id=60599&edit=1
-- 
Try a snapshot (PHP 5.4):            
https://bugs.php.net/fix.php?id=60599&r=trysnapshot54
Try a snapshot (PHP 5.3):            
https://bugs.php.net/fix.php?id=60599&r=trysnapshot53
Try a snapshot (trunk):              
https://bugs.php.net/fix.php?id=60599&r=trysnapshottrunk
Fixed in SVN:                        
https://bugs.php.net/fix.php?id=60599&r=fixed
Fixed in SVN and need be documented: 
https://bugs.php.net/fix.php?id=60599&r=needdocs
Fixed in release:                    
https://bugs.php.net/fix.php?id=60599&r=alreadyfixed
Need backtrace:                      
https://bugs.php.net/fix.php?id=60599&r=needtrace
Need Reproduce Script:               
https://bugs.php.net/fix.php?id=60599&r=needscript
Try newer version:                   
https://bugs.php.net/fix.php?id=60599&r=oldversion
Not developer issue:                 
https://bugs.php.net/fix.php?id=60599&r=support
Expected behavior:                   
https://bugs.php.net/fix.php?id=60599&r=notwrong
Not enough info:                     
https://bugs.php.net/fix.php?id=60599&r=notenoughinfo
Submitted twice:                     
https://bugs.php.net/fix.php?id=60599&r=submittedtwice
register_globals:                    
https://bugs.php.net/fix.php?id=60599&r=globals
PHP 4 support discontinued:          
https://bugs.php.net/fix.php?id=60599&r=php4
Daylight Savings:                    https://bugs.php.net/fix.php?id=60599&r=dst
IIS Stability:                       
https://bugs.php.net/fix.php?id=60599&r=isapi
Install GNU Sed:                     
https://bugs.php.net/fix.php?id=60599&r=gnused
Floating point limitations:          
https://bugs.php.net/fix.php?id=60599&r=float
No Zend Extensions:                  
https://bugs.php.net/fix.php?id=60599&r=nozend
MySQL Configuration Error:           
https://bugs.php.net/fix.php?id=60599&r=mysqlcfg

Reply via email to