It seems that your PHP disagrees with your statement.
To install php-ldap in Ubuntu you would open a command prompt and run:
apt-get install php7.0-ldap
note: if you are using PHP 7.1, 7.2, or 7.3 you would likely have to change the command and change the 0 in the above to the correct subversion that you are running.
Then you would restart Apache.
service apache2 restart
You can check if PHP thinks ldap is enabled by creating a testldap.php file in your webserver site and put this in it
<?php phpinfo(); ?>
Then browse to the site\testldap.php. It will output all your PHP configuration to the screen.
Make sure that you delete this file after.