Re: updated to 13.1 (i386). Apache won't run if php80 enabled

From: Matthew Seaman <matthew_at_FreeBSD.org>
Date: Thu, 06 Apr 2023 07:08:50 UTC
On 06/04/2023 07:18, Odhiambo Washington wrote:
> On Thu, Apr 6, 2023 at 9:09 AM Steve O'Hara-Smith <steve@sohara.org> wrote:
> 
>> On Wed, 5 Apr 2023 11:09:37 -0400
>> William Dudley <wfdudley@gmail.com> wrote:
>>
>>> I have another machine running 13.1, but it's amd64.  It happily runs
>>> Apache with php80, so I downgraded the i386 machine to php80
>>> so the two machines would be "the same".
>>>
>>> Except this didn't fix the problem.  Apache won't run with either php80
>>> OR php81 enabled, using this stanza in httpd.conf:
>>
>>          Two possibilities spring to mind
>>
>>          - the two machines are not "the same", check all relevant package
>> versions right down the dependency tree.
>>
>>          - The code depends on a feature not in one CPU or something of that
>> order. Given that PHP and Apache work independently the glue is the prime
>> suspect, I'd try building mod-php from ports.
>>
> 
> He wants to keep things simple, so he prefers pkg install... no ports.

In that case, he needs to use mod_php from php81 which is the current 
default version of PHP used by the FreeBSD pkg system.  The way apache 
works by loading a binary module with an embedded php interpreter into 
the apache process itself is quite restrictive in that regard.

Personally, I'd configure a php web app to use a separate php-fpm daemon 
and front that with nginx proxying through to the fpm port: a similar 
approach is possible with apache which might prove useful.

	Cheers,

	Matthew