I've just finished compiling PHP and wanted to take it for a test drive but php index.php is not working, however, ./php index.php does work.
For what it's worth I am able to do httpd -t with no problem from Apache's httpd/bin directory.
# pwd
/usr/local/php/x64/7.2.2/bin
# ls -la
total 100620
drwxr-xr-x. 2 root root 163 Feb 19 12:58 .
drwxr-xr-x. 8 root root 76 Feb 19 12:52 ..
-rw-r--r--. 1 root root 19 Feb 19 12:58 index.php
-rwxr-xr-x. 1 root root 887 Feb 19 12:52 pear
-rwxr-xr-x. 1 root root 908 Feb 19 12:52 peardev
-rwxr-xr-x. 1 root root 824 Feb 19 12:52 pecl
lrwxrwxrwx. 1 root root 9 Feb 19 12:52 phar -> phar.phar
-rwxr-xr-x. 1 root root 53504 Feb 19 12:52 phar.phar
-rwxr-xr-x. 1 root root 34058464 Feb 19 12:52 php
-rwxr-xr-x. 1 root root 33900816 Feb 19 12:52 php-cgi
-rwxr-xr-x. 1 root root 2309 Feb 19 12:52 php-config
-rwxr-xr-x. 1 root root 34980264 Feb 19 12:52 phpdbg
-rwxr-xr-x. 1 root root 4593 Feb 19 12:52 phpize
# php index.php
-bash: php: command not found
# ./php index.php
hi
# /usr/local/php/x64/7.2.2/bin/php index.php
hi
Is there something that I am missing? If I could just be pointed to a question which answers something similar then that would be a huge help. As of now, I don't even know how to Google this issue properly.
If it matters I am using SSH from my Windows host to my VirtualBoxed CentOS 7.