Q:

phpldapadmin not loading php

For some reason my phpldapadmin doesn't want to work with my website and it says "If you are seeing this in your browser, PHP is not installed on your web server!!!" Which is not true as if the info.php file is navigated to like here it says php is enabled along with the ldap extension. The apache error log doesn't say anything about the error though.
Every other php page on my website works except phpldapadmin. I am really confused.
This is what I get when I run php -v
PHP 7.1.1-1+deb.sury.org~xenial+1 (cli) (built: Jan 20 2017 09:20:20) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies
with Zend OPcache v7.1.1-1+deb.sury.org~xenial+1, Copyright (c) 1999-2017, by Zend Technologies
with Xdebug v2.5.0, Copyright (c) 2002-2016, by Derick Rethans

A:

Your webserver's document root is /var/www/html and you have to place everything within this folder (may use subfolders /var/www/html/phpmyadmin, /var/www/html/phpldapadmin, etc.). Or you can define alias for certain purposes which can point to a folder outside document root. How to config an alias: https://httpd.apache.org/docs/2.4/mod/mod_alias.html#alias
Everything else what's outside isn't accessible by webserver itself and neither can be processed by PHP.

