Issue      

This error is seen in the php.log file:

PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/zendsvr6/lib/php_extensions/curl.so' -
0509-022 Cannot load module /usr/local/zendsvr6/lib/php_extensions/curl.so.
    0509-021 Additional errors occurred but are not reported. in Unknown on line 0

Environment

Zend Server for IBM i version 7 running on any version of IBM i

Resolution

This is just a warning error and may safely be ignored. It is easy to fix, though.

From a 5250 command line:


edtf '/usr/local/zendsvr6/etc/conf.d/curl.ini'


Find the first line in the file (usually the only line in the file):

extension=curl.so

Insert a semicolon in the first position and press enter to comment out the line:

;extension=curl.so

Use F3 twice to save and exit.

Details

Starting with version 7, the curl extension is compiled into the core rather than loaded as a dynamic extension.  However, the curl.ini file still has the line to load the curl.so module dynamically.  This external module is no longer needed, so it does not exist.  This causes the warning.