How to create a button on module configuration page that calls a custom php function?
You should use the Drupal Form API for it.

Please, check it: https://api.drupal.org/api/drupal/developer!topics!forms_api_reference.html/7#submit (it is about adding button).

And it: https://api.drupal.org/api/drupal/developer!topics!forms_api_reference.html/7#submit_property (it is about run custom function).