Not being able to get mysqli to load using packages, I finally said buggrit and built apache24 and php72 from ports with zero special sauce. Httpd.conf shows that the prefork module is being loaded, not either of the threaded ones, yet apache looks for the nominally-optional php modules in /usr/local/lib/php/20170718-zts anyway. If there's some switch I missed seeing, I hope someone will tell me where to find it because I deliberately did NOT set the "force zend thread-safe" switch when building php72, so it should be looking in the vanilla .../20170718 subtree not in the ...-zts one.
Aren't you looking at the www/mod_php72 port in this case? The Apache ports don't build the module from www/mod_php72 pkg-plist: > libexec/apache24/libphp7.so That's also where the ZTS option is located.
*** This bug has been marked as a duplicate of bug 201193 ***