Hi Bastian,
strip the << -d "error_reporting='~E_ALL'" >>
from the php command line and re-run the php, e.g.:
php5 -c /etc/php5/apache2/php.ini -r 'print
ini_get("session.gc_maxlifetime"); print "\n";'
The script probably should be more fool-proof, I'll prepare something
for next security update.
Cheers,
Ondrej
On Fri, Aug 29, 2014, at 11:18, Bastian wrote:
> Hi,
>
> I hit this bug after upgrading to 5.4.4-14+deb7u14
> I get error report from cron via mail.
> While the maxlifetime script inspects all php.ini files, it first
> iterates over the apache2/php.ini file. In this case the script does not
> print out any value and just exits with 1, which in turn ends the entire
> maxlifetime script, because it is executed via sh -e.
>
> In my case, the proposed patch does not work.
>
> To describe the symptom on my host, i'll demonstrate the output::
>
> {{{
> # for sapi in apache2 apache2filter cgi fpm; do echo $sapi; php5 -c
> /etc/php5/${sapi}/php.ini -d "error_reporting='~E_ALL'" -r 'pr int
> ini_get("session.gc_maxlifetime"); print "\n";'; echo ret=$?; done
> apache2
> ret=1
> apache2filter
> 1440
> ret=0
> cgi
> 1440
> ret=0
> fpm
> 1440
> ret=0
> }}}
>
> You easily see, that this error just happens with the apache2/php.ini.
> Digging a bit further into the problem with the apache2/php.ini file, I
> realized that php5 behaves cumbersome. It does not write out any error
> messages and does not run the script and print the maxlifetime.
> It just exits with error code 1.
> Just look at the following run:
> {{{
> # php5 -c /etc/php5/apache2/php.ini
> # echo $0
> 1
> }}}
>
> php5 does not show any information that something obvious is wrong.
> It just exits with error code 1.
>
>
> According to the for-loop above this faulty behaviour looks to be
> triggered by the apache2 configuration file.
> Alhtough, I do not know anything profound about php.ini files, I assumed
> that in case of an error in the ini file, I should get some error
> message, right?
> Or are there configuration options to silently exit a programm on error?
>
>
> Cheers,
>
> --
> Bastian
>
> _______________________________________________
> pkg-php-maint mailing list
> [email protected]
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-php-maint
--
Ondřej Surý <[email protected]>
Knot DNS (https://www.knot-dns.cz/) – a high-performance DNS server
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]