It sounds like your application is not using the php.ini file provided by Herd, but rather a different one. To ensure that your application uses the correct php.ini file, you can follow these steps:
-
Locate the Correct php.ini File: First, you need to confirm the location of the
php.inifile that Herd is using. You can do this by creating a simple PHP file with the following content and navigating to it in your browser:<?php phpinfo(); ?>Look for the "Loaded Configuration File" in the output. This will tell you which
php.inifile is being used by Herd. -
Update the Correct php.ini File: Once you've located the correct
php.inifile, you need to update the following directives to allow for larger uploads:upload_max_filesize = 24M post_max_size = 24MMake sure to set
post_max_sizeto a value equal to or larger thanupload_max_filesize. -
Restart the Web Server: After making changes to the
php.inifile, you will need to restart your web server for the changes to take effect. The command to restart the server depends on the server you are using (e.g., Apache, Nginx, etc.).For example, if you are using Apache, you might use:
sudo service apache2 restartOr if you are using Nginx:
sudo service nginx restart -
Verify the Changes: After restarting the server, revisit the PHP file with
phpinfo();and check if the "Loaded Configuration File" is now pointing to the correctphp.inifile and that theupload_max_filesizeandpost_max_sizevalues have been updated.
If after following these steps your application is still not using the correct php.ini file, you may need to specify the path to the php.ini file directly in your web server's configuration or use a .user.ini file in your project directory with the necessary configurations.
Remember that the exact steps may vary depending on your specific server setup and how Herd is configured on your machine. If you continue to have issues, you may want to consult the Herd documentation or reach out to their support for more detailed guidance.