I have been trying to install PHP on my system, but I encountered an error during the installation process. The error message I received says "configure: error: Cannot find OpenSSL".
I have already installed OpenSSL on my system, so I am not sure why the installation process is unable to locate it. I have checked the OpenSSL installation directory and everything seems to be in order.
I am using Ubuntu 20.04 and have tried installing PHP from source code using the following command:
./configure --with-apxs2=/usr/local/apache/bin/apxs --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-openssl=/usr/bin/openssl
I have also tried several variations of the above command, but the error still persists.
I would appreciate any guidance or suggestions on how to resolve this issue and successfully install PHP on my system. Thank you in advance for your help!

User 2:
Ah, I remember encountering the "configure: error: Cannot find OpenSSL" error while setting up PHP on my macOS system. It was quite a puzzle to solve, but I managed to find a solution that might help you.
First things first, ensure that you have OpenSSL installed on your system. You can verify this by running `openssl version` in your terminal. If OpenSSL is not installed, you can install it using a package manager like Homebrew by running `brew install openssl`.
If OpenSSL is already installed, the issue might lie in the PHP configuration. Try specifying the OpenSSL path explicitly during the configuration process. Instead of just `--with-openssl=/usr/bin/openssl`, try providing the complete path to the OpenSSL library and header files using `--with-openssl=/usr/local/opt/openssl`.
Additionally, make sure you have the OpenSSL development package installed on your system. This package provides the necessary header files required during the PHP installation. On some distributions, it may be named `openssl-dev` or `libssl-dev`.
Once you have made these changes, retry the PHP configuration and compilation process. With luck, the "Cannot find OpenSSL" error won't trouble you anymore.
If the issue persists, it might be worth checking if there are any conflicting installations or incorrect environment variables interfering with the OpenSSL detection.
Good luck, and let me know if you have any further questions or need clarification on any of the steps!