Hi everyone,
for 2 hours now I am scratching my head and try to figure out why a new jail with Apache 2.4 and PHP 7.2 does not execute PHP scripts - it just echos the script's source code instead.
it should just replace an old jail I installed 3 years ago, so I followed the same recipe. It is FreeBSD 12.1, and I use compiled packages from the FreeBSD repositories.
First I installed apache24 and mod_php72, and wrote under /usr/local/etc/apache/24/Includes/php.conf
<FilesMatch "\.php$">
SetHandler application/x-httpd-php
</FilesMatch>
<FilesMatch "\.phps$">
SetHandler application/x-httpd-php-source
</FilesMatch>
I also saw, that there is a LoadModule line in httpd.conf, as expected.
Did not work, so I deinstalled mod_php72 and tried to use PHP-FPM instead.
service php-fpm start
and a php-fpm.conf:
<FilesMatch "\.php$">
SetHandler proxy:fcgi://127.0.0.1:9000
</FilesMatch>
FPM is listening on port 9000, i can telnet to it. Still - the web page shows the source code only (checked again the blank page with looking at the page source).
What am I missing here?
The old server is running fine with mod_php56, and the same php.conf as shown above.
What am I missing?
Please let me know.
Thank you
Peter
for 2 hours now I am scratching my head and try to figure out why a new jail with Apache 2.4 and PHP 7.2 does not execute PHP scripts - it just echos the script's source code instead.
it should just replace an old jail I installed 3 years ago, so I followed the same recipe. It is FreeBSD 12.1, and I use compiled packages from the FreeBSD repositories.
First I installed apache24 and mod_php72, and wrote under /usr/local/etc/apache/24/Includes/php.conf
<FilesMatch "\.php$">
SetHandler application/x-httpd-php
</FilesMatch>
<FilesMatch "\.phps$">
SetHandler application/x-httpd-php-source
</FilesMatch>
I also saw, that there is a LoadModule line in httpd.conf, as expected.
Did not work, so I deinstalled mod_php72 and tried to use PHP-FPM instead.
service php-fpm start
and a php-fpm.conf:
<FilesMatch "\.php$">
SetHandler proxy:fcgi://127.0.0.1:9000
</FilesMatch>
FPM is listening on port 9000, i can telnet to it. Still - the web page shows the source code only (checked again the blank page with looking at the page source).
What am I missing here?
The old server is running fine with mod_php56, and the same php.conf as shown above.
What am I missing?
Please let me know.
Thank you
Peter