Hi all, I've read through several threads about this, but so far haven't seen anything that has helped me solve this. I have a machine running freeBSD 12.4 with Apache24 and PHP8.1. Sort of. A couple of days ago I updated from PHP74 to PHP81, and since then I've been unable to get Apache running with PHP. The logs aren't particularly helpful as from what I can tell Apache is crashing before the log is written. Here's some information that hopefully someone can help with. I'm pretty much an idiot with this - I run the server as a development platform.
Starting Apache:
However, Apache doesn't start and worse nothing is written to httpd-error.log
messages.log tells me
Here's my loaded Apache modules:
My PHP
I disabled all php extensions for testing:
finally here's my http.conf
I've reached the extent of my limited knowledge so if there's anyone who might have an idea what's breaking I would be extremely grateful for the advice!
Code:
# uname -a
FreeBSD hmgdev.com 12.4-RELEASE FreeBSD 12.4-RELEASE r372781 GENERIC i386
Starting Apache:
Code:
# service apache24 start
Performing sanity check on apache24 configuration:
Syntax OK
Starting apache24.
However, Apache doesn't start and worse nothing is written to httpd-error.log
messages.log tells me
Code:
May 2 10:08:39 xxxx kernel: pid 14992 (httpd), jid 0, uid 0: exited on signal 11 (core dumped)
Here's my loaded Apache modules:
Code:
# httpd -M
Loaded Modules:
core_module (static)
so_module (static)
http_module (static)
authn_file_module (shared)
authn_core_module (shared)
authz_host_module (shared)
authz_groupfile_module (shared)
authz_user_module (shared)
authz_core_module (shared)
access_compat_module (shared)
auth_basic_module (shared)
socache_shmcb_module (shared)
reqtimeout_module (shared)
filter_module (shared)
deflate_module (shared)
mime_module (shared)
log_config_module (shared)
env_module (shared)
headers_module (shared)
session_module (shared)
setenvif_module (shared)
version_module (shared)
ssl_module (shared)
mpm_prefork_module (shared)
unixd_module (shared)
status_module (shared)
autoindex_module (shared)
dir_module (shared)
alias_module (shared)
rewrite_module (shared)
php_module (shared)
My PHP
Code:
php -v
PHP 8.1.17 (cli) (built: Apr 2 2023 01:32:18) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.17, Copyright (c) Zend Technologies
with Zend OPcache v8.1.17, Copyright (c), by Zend Technologies
with Xdebug v3.2.1, Copyright (c) 2002-2023, by Derick Rethans
#
I disabled all php extensions for testing:
Code:
# php -m
[PHP Modules]
Core
date
hash
json
libxml
mysqlnd
openssl
pcre
Phar
Reflection
SPL
standard
[Zend Modules]
finally here's my http.conf
Code:
cat /usr/local/etc/apache24/httpd.conf
ServerRoot "/usr/local"
Listen *:80
LoadModule mpm_prefork_module libexec/apache24/mod_mpm_prefork.so
LoadModule authn_file_module libexec/apache24/mod_authn_file.so
LoadModule authn_core_module libexec/apache24/mod_authn_core.so
LoadModule authz_host_module libexec/apache24/mod_authz_host.so
LoadModule authz_groupfile_module libexec/apache24/mod_authz_groupfile.so
LoadModule authz_user_module libexec/apache24/mod_authz_user.so
LoadModule authz_core_module libexec/apache24/mod_authz_core.so
LoadModule access_compat_module libexec/apache24/mod_access_compat.so
LoadModule auth_basic_module libexec/apache24/mod_auth_basic.so
LoadModule socache_shmcb_module libexec/apache24/mod_socache_shmcb.so
LoadModule reqtimeout_module libexec/apache24/mod_reqtimeout.so
LoadModule filter_module libexec/apache24/mod_filter.so
LoadModule deflate_module libexec/apache24/mod_deflate.so
LoadModule mime_module libexec/apache24/mod_mime.so
LoadModule log_config_module libexec/apache24/mod_log_config.so
LoadModule env_module libexec/apache24/mod_env.so
LoadModule headers_module libexec/apache24/mod_headers.so
LoadModule session_module libexec/apache24/mod_session.so
LoadModule setenvif_module libexec/apache24/mod_setenvif.so
LoadModule version_module libexec/apache24/mod_version.so
LoadModule ssl_module libexec/apache24/mod_ssl.so
LoadModule unixd_module libexec/apache24/mod_unixd.so
LoadModule status_module libexec/apache24/mod_status.so
LoadModule autoindex_module libexec/apache24/mod_autoindex.so
LoadModule dir_module libexec/apache24/mod_dir.so
LoadModule alias_module libexec/apache24/mod_alias.so
LoadModule rewrite_module libexec/apache24/mod_rewrite.so
LoadModule php_module libexec/apache24/libphp.so
IncludeOptional etc/apache24/modules.d/[0-9][0-9][0-9]_*.conf
<IfModule unixd_module>
User www
Group www
</IfModule>
ServerAdmin admin@somedomain.com
<Directory />
AllowOverride none
Require all denied
</Directory>
DocumentRoot "/usr/local/www/apache24/data"
<Directory /usr/local/www/apache24/data>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
<IfModule dir_module>
DirectoryIndex index.html index.php
</IfModule>
<Files ".ht*">
Require all denied
</Files>
ErrorLog "/var/log/httpd-error.log"
LogLevel warn
<IfModule log_config_module>
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
<IfModule logio_module>
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
</IfModule>
CustomLog "/var/log/httpd-access.log" common
</IfModule>
<IfModule alias_module>
ScriptAlias /cgi-bin/ "/usr/local/www/apache24/cgi-bin/"
</IfModule>
<Directory "/usr/local/www/apache24/cgi-bin">
AllowOverride None
Options None
Require all granted
</Directory>
<IfModule headers_module>
RequestHeader unset Proxy early
</IfModule>
<IfModule mime_module>
TypesConfig etc/apache24/mime.types
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
</IfModule>
<IfModule proxy_html_module>
Include etc/apache24/extra/proxy-html.conf
</IfModule>
Include etc/apache24/extra/httpd-ssl.conf
<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>
Include etc/apache24/Includes/*.conf
ServerTokens ProductOnly
KeepAlive on