status_command and php script
asked 2014-11-13 18:39:39 +0000
Anonymous
Hello. I have this php code to count the unread message from the mailbox
1 <?php
2
3 $conn = imap_open('{imap.gmail.com:993/imap/ssl}INBOX', 'test@gmail.com', 'pass', OP_READONLY);
4
5 $msgnos = imap_search($conn, 'UNSEEN');
6
7 $unread = count($msgnos);
8
9 $return = array("full_text"=>$unread, 'name'=>'newmail','color'=>'#FF0000');
10
11 echo json_encode($return);
12
13
14 ?>
the status command in .i3/config file
165 bar {
166 status_command i3status | php /home/trap/bin/mailcheck/mailck.php
167 }
The problem is that Error: status_command process exited unexpectedly (exit 0)
Why that's happening ?