I uploaded my own php file to '/usr/share/apache2/default-site/htdocs'.
// /usr/share/apache2/default-site/htdocs/info.php
<?php
phpinfo();
?>
When I try to access it, browser returns 'File not found.' index.html and plain text .txt files work, so I can confirm apache is server files from the folder.
root@imx8mpevk:/var/files# ls /usr/lib/php7/build/run-tests.php
ls: cannot access '/usr/lib/php7/build/run-tests.php': No such file or directory
Found the file in '/usr/lib/php8/build' and ran it. Below is the output.
root@imx8mpevk:/usr/lib/php8/build# php run-tests.php
=====================================================================
PHP : /usr/bin/php
PHP_SAPI : cli
PHP_VERSION : 8.2.20
ZEND_VERSION: 4.2.20
PHP_OS : Linux - Linux imx8mpevk 6.6.52-lts-next-ge0f9e2afd4cf #1 SMP PREEMPT Tue Nov 19 23:01:49 UTC 2024 aarch64
INI actual : /etc/php/apache2-php8/php.ini
More .INIs :
---------------------------------------------------------------------
PHP : /usr/bin/php-cgi
PHP_SAPI : cgi-fcgi
PHP_VERSION : 8.2.20
ZEND_VERSION: 4.2.20
PHP_OS : Linux - Linux imx8mpevk 6.6.52-lts-next-ge0f9e2afd4cf #1 SMP PREEMPT Tue Nov 19 23:01:49 UTC 2024 aarch64
INI actual : /etc/php/apache2-php8/php.ini
More .INIs :
---------------------------------------------------------------------
CWD : /usr/lib/php8/build
Extra dirs :
VALGRIND : Not used
=====================================================================
TIME START 2025-03-13 05:46:32
=====================================================================
No tests were run.