Upload limit does not change

I increased the upload_max_filesize limits and right after saving it continues to show only 2M of maximum upload size. This is happening in all versions. I set it to 1024M but when entering the WP server diagnostics it still continues as 2M. I saved it and then I reset PHP