This may look like a duplicate to this question, but i followed the solution from the answer yet it still doesn't work. I'm using XAMPP by the way. This is how I do it.
mysql -u root -p
mysql> SET GLOBAL max_allowed_packet=33554432;
Query OK, 0 rows affected (0.00 secs)
mysql> SHOW VARIABLES LIKE 'max_allowed_packet';
After that I restart mysql then go back and the result is still max_allowed_packet = 1048576 .
Then I added, not edited, this lines of code into php.ini at the very bottom of the code because those lines does not exist in the php.ini file.
[mysqld]
max_allowed_packet = 32M
[mysqldump]
max_allowed_packet = 32M
Restart again. Check the max_allowed_packet and it still the same 1048576 bytes. Are they any more solutions to fix it so I can upload files larger than 1MB? Or did i do something wrong here?