What are the common locations where PHP searches for the php.ini file?

PHP searches for the php.ini file in several common locations, including the system default location (/etc/php.ini on Unix-like systems, and C:\Windows\php.ini on Windows), the PHP directory, the Windows directory, and the directory specified in the PHPRC environment variable. If you are having trouble locating or loading the php.ini file, you can specify its location explicitly in your PHP script using the `ini_set()` function.

// Specify the location of the php.ini file
ini_set('display_errors', 1); // Example setting to demonstrate usage
ini_set('error_reporting', E_ALL);
ini_set('log_errors', 1);
ini_set('error_log', '/path/to/your/php_error.log');