HOW TO FIX NGINX 413 REQUEST ENTITY TOO LARGE ERROR

Problem:
- You're getting "413 Request Entity Too Large nginx/1.25.4" error
- This occurs when uploading files that exceed nginx's default limit (usually 1MB)

Solution:

1. Locate your MAMP nginx configuration:
   - Navigate to your MAMP installation directory (usually C:\MAMP\)
   - Go to conf/nginx/ folder
   - Look for nginx.conf file

2. Edit the nginx.conf file:
   - Open nginx.conf with a text editor (as Administrator)
   - Find the `http` block (usually around line 20-30)
   - Add this line inside the http block:
   
     client_max_body_size 50M;

   - Or find an existing client_max_body_size directive and increase its value
   
3. Save the file and restart MAMP

Alternative method if using MAMP Pro:
1. Open MAMP Pro application
2. Go to Preferences > Nginx tab
3. Look for client_max_body_size setting or add it to the configuration
4. Restart the servers

Specific instructions for your Bidda school management system:
- Your PHP settings are already configured for 50M uploads (in php.ini)
- The error occurs specifically in nginx which sits in front of PHP
- For certificate logo uploads in /certificates/appreciation_certificate.php, the limit needs to be increased
- In /certificates/appreciation_certificate.php line 1148-1152, there's a 5MB client-side validation, but nginx stops requests before reaching this validation

Additional tips:
- Make sure the value is equal to or greater than your PHP upload_max_filesize (which is already set to 50M in your php.ini)
- The post_max_size in PHP should also be >= upload_max_filesize
- Both nginx and PHP limits need to be increased for large file uploads

After restarting MAMP, the 413 error should be resolved and you'll be able to upload larger files for certificates and other features.