LINUXOR.SK ... open source notes ...

Email - php.ini, webmail

category: solutionz · date: 2019-12-31 · updated: 2026-10-02 · author: LALA

Email Solution · Config document · referenced from Webmail

note<TIMEZONE> is a placeholder. The real value names a city and was taken out with the rest of the location.

The PHP configuration of the webmail server. The file has close to 1,800 lines and the install notes changed one of them, so only that directive is shown; the rest is what the php package of RHEL 7 installed.

ItemValue
Path on the server/etc/php.ini
Shown hereDC2-A-VCMSX002, only the directive the install notes changed
SoftwarePHP 5 from RHEL 7, loaded into Apache as php5_module (conf.modules.d/10-php.conf)
Activated witha restart of httpd; PHP runs inside the Apache processes

The file

ini
[Date]
; Defines the default timezone used by the date functions
date.timezone = <TIMEZONE>

Values that were left as they were

Not changed, but they decide how Roundcube behaves, so here is what the archived file holds.

DirectiveValue in the archived file
expose_phpOn; the X-Powered-By header it produces is removed by Apache (Header unset X-Powered-By)
display_errorsOff
memory_limit128M
post_max_size8M
upload_max_filesize2M
session.save_handlerfiles; Roundcube is set to session_storage = php, so its sessions are files under /var/lib/php/session
session.cookie_httponlyempty; the flag is added by Apache (Header edit Set-Cookie)

The upload limits of PHP are not what limits an attachment. The virtual host has LimitRequestBody 1048576, so Apache refuses a request body over 1 MiB before PHP sees it.

Checked against PHP 8.5.11

As builtToday
PHP 5.4 of RHEL 7PHP 5 ended with 5.6.40 in January 2019. Supported branches are 8.2 to 8.5; RHEL 10 ships 8.3
date.timezoneStill valid; the default is UTC
expose_php = OnThe directive still exists, with the same default
session.cookie_httponly emptyStill exists; the default is "0" since PHP 7.2, so the flag is still not set by PHP on its own
session.hash_function, session.hash_bits_per_character in the packaged fileRemoved as of PHP 7.1.0
PHP inside Apache (mod_php)No longer available in RHEL 9; php-fpm is the default since RHEL 8
php-imap in the package listThe IMAP extension is no longer bundled with PHP as of 8.4.0 and moved to PECL
← solutionz