Skip to content
This repository has been archived by the owner on Aug 29, 2018. It is now read-only.

Commit

Permalink
Fix bug 1173796
Browse files Browse the repository at this point in the history
  • Loading branch information
VojtechVitek committed Dec 13, 2014
1 parent cb70589 commit 480d3fe
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions cartridges/openshift-origin-cartridge-php/bin/control
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,20 @@ function start() {
return $?
}

# Explicitely stop and start instead of reload/restart, until the
# https://bugzilla.redhat.com/show_bug.cgi?id=1173796 is fixed (segfault)
function bug_1173796() {
# PHP 5.4 + Zend OPCache enabled?
if [[ "$OPENSHIFT_PHP_VERSION" == "5.4" && -n "$(php_context 'php -m' | grep -i opcache)" ]]; then
stop
start
exit $?
fi
}

function reload() {
echo "Reloading PHP ${OPENSHIFT_PHP_VERSION} cartridge (Apache+mod_php)"
bug_1173796
pre_start_httpd_config
httpd_pid=`cat "$HTTPD_PID_FILE" 2> /dev/null`
kill -USR1 $httpd_pid && wait_for_pid_file $HTTPD_PID_FILE
Expand All @@ -46,6 +58,7 @@ function reload() {

function restart() {
echo "Restarting PHP ${OPENSHIFT_PHP_VERSION} cartridge (Apache+mod_php)"
bug_1173796
ensure_httpd_restart_succeed "$HTTPD_PID_FILE" "$HTTPD_CFG_FILE"
if [ -f "$HTTPD_PID_FILE" ]; then
pre_start_httpd_config
Expand Down

0 comments on commit 480d3fe

Please sign in to comment.