'PHP Notice: fwrite(): send failed with errno=32 Broken pipe
I was trying to execute the php script through shell given Here by :-
php whatsapp.php -s MobileNo Message
and i got the following error :-
PHP Notice: fwrite(): send of 111 bytes failed with errno=32 Broken pipe in
whatsprot.class.php on line 1923
and line 1923 in whatsprot.class.php corresponds to :-
fwrite($this->socket, $data, strlen($data));
whatsprot.class.php is Here
Is there any fix to this problem?
Solution 1:[1]
It may be because your data contains 'utf-8' characters. I had the similar issue is caused by it.
Exception: mysql_query(): send of 1462592 bytes failed with errno=32 Broken pipe
I used
mysql -u username -p database < dump_file # this is bad
to import the sql file contains lot of UTF8 characters (Thai language), but I didn't set default-character-set=utf8 for [mysql]. So the wrong coded data in the database caused that issue.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Lei Cao |
