manca \n
Codice PHP:
$x$data.",".$ip."\n";
//o come hai fatto te
$x"$data,$ip\n"
ciao