Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Remenber the command "PHP -v" shows 7.2.24, so PHP is installed but the apache config is still not right so it never recognizes it, That is where I'm at in this problem.
In your /etc/apache2 configuration files there should be a LoadModule directive i.e.
LoadModule php7_module /path/to/libphp7.so
In the php7x.conf file there should be something like below which tells apache to parse php files.
<FilesMatch \.php$>
SetHandler application/x-httpd-php
</FilesMatch>
OK! In dir /etc/apache2/mods-enabled/ there is a php7.2.conf and php7.2.load. The <FilesMatch \.php$> is in php7.2.conf file and the <LoadModule php7_module /path/to/libphp7.so> is in the php7.2.load file.
The /etc/apache2/apache2 conf file has include statements for both of these, so should be loading correctly.
If a .php won't render (I only include phpinfo for testing instead of trying to get phpmyadmin to work, because it is small and easily checked. If it doesn't work, you don't have either the right packages installed or not enabled apache using php via the module. Go over the phpmyadmin install to apache and check that you have installed all software and enabled php in apache.
You've missed something very basic.
Again, if phpinfo.php does not work, there is NO way that apache/php is installed right.
If a .php won't render (I only include phpinfo for testing instead of trying to get phpmyadmin to work, because it is small and easily checked. If it doesn't work, you don't have either the right packages installed or not enabled apache using php via the module. Go over the phpmyadmin install to apache and check that you have installed all software and enabled php in apache.
You've missed something very basic.
Again, if phpinfo.php does not work, there is NO way that apache/php is installed right.
I even tested several.php files in the command line and they also do not render, they only print out the code like an echo statement, which should be independent of apache, so yes guessing something wrong in the basic PHP config.
Since ports.conf was erroring, will put that in a paste bin, cause it only had 80 and 443 as ports defined and I saw nothing standing out that should cause errors.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.