MySQL import got a packet bigger than max_allowed_packet bytes

The reason is uploading packets receives bigger than max_allowed_packet bytes, So the best solution will be increasing max_allowed_packet size in mysql config. but not on php side,
This query shows you current values for allowed packet.