Magento – How to solve 500 internal server error in custom module in magento 2

http-error-500magento-2.0.7magento-2.1magento2PHP

My php version is 5.6

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20131226/php_curl.dll' – /usr/lib/php/20131226/php_curl.dll: cannot open shared object file: No such file or directory in Unknown on line 0

After each magento2 command i am getting above warning, and in my custom module i am getting 500 internal server error while connecting to controller. But at other system with php version 7, my module is working fine. Is this error and warning is related to each other? What is the exactly solution of this? Please explain anybody

Best Answer

In your php.ini you need to do the following as you don't have that extension installed. You can also download the extension with most versions of PHP

Find

extension=php_curl.dll

Change to

;extension=php_curl.dll