diff --git a/frameworks/PHP/cakephp/benchmark_config.json b/frameworks/PHP/cakephp/benchmark_config.json index 351a5d119b4..723b55e35b0 100644 --- a/frameworks/PHP/cakephp/benchmark_config.json +++ b/frameworks/PHP/cakephp/benchmark_config.json @@ -43,9 +43,10 @@ "webserver": "none", "os": "Linux", "database_os": "Linux", - "display_name": "CakePHP-workerman", + "display_name": "CakePHP [workerman]", "notes": "", "versus": "php" } }] } + diff --git a/frameworks/PHP/cakephp/cakephp-workerman.dockerfile b/frameworks/PHP/cakephp/cakephp-workerman.dockerfile index ce77247eb6c..776e55f1252 100644 --- a/frameworks/PHP/cakephp/cakephp-workerman.dockerfile +++ b/frameworks/PHP/cakephp/cakephp-workerman.dockerfile @@ -7,24 +7,25 @@ RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null && \ apt-get update -yqq > /dev/null && apt-get upgrade -yqq > /dev/null RUN apt-get install -yqq git unzip \ - php8.4-cli php8.4-mysql php8.4-mbstring php8.4-intl php8.4-xml php8.4-curl > /dev/null + php8.5-cli php8.5-mysql php8.5-mbstring php8.5-intl php8.5-xml php8.5-curl > /dev/null COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer -RUN apt-get install -y php-pear php8.4-dev libevent-dev > /dev/null -RUN pecl install event-3.1.4 > /dev/null && echo "extension=event.so" > /etc/php/8.4/cli/conf.d/event.ini +RUN apt-get install -y php-pear php8.5-dev libevent-dev > /dev/null +RUN pecl install event-3.1.4 > /dev/null && echo "extension=event.so" > /etc/php/8.5/cli/conf.d/event.ini EXPOSE 8080 ADD ./ /cakephp WORKDIR /cakephp -RUN composer require joanhey/adapterman:^0.7 -RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --quiet +RUN composer require joanhey/adapterman:^0.7 --quiet +RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --quiet RUN chmod -R 777 /cakephp -#COPY deploy/conf/cli-php.ini /etc/php/8.4/cli/php.ini +#COPY deploy/conf/cli-php.ini /etc/php/8.5/cli/php.ini CMD php -c deploy/conf/cli-php.ini \ server.php start + diff --git a/frameworks/PHP/cakephp/cakephp.dockerfile b/frameworks/PHP/cakephp/cakephp.dockerfile index d5d39a7ea65..efd5894a928 100644 --- a/frameworks/PHP/cakephp/cakephp.dockerfile +++ b/frameworks/PHP/cakephp/cakephp.dockerfile @@ -7,22 +7,22 @@ RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null && \ apt-get update -yqq > /dev/null && apt-get upgrade -yqq > /dev/null RUN apt-get install -yqq nginx git unzip \ - php8.4-fpm php8.4-mysql php8.4-xml php8.4-mbstring php8.4-intl php8.4-dev php8.4-curl > /dev/null + php8.5-fpm php8.5-mysql php8.5-xml php8.5-mbstring php8.5-intl php8.5-dev php8.5-curl > /dev/null COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer -COPY deploy/conf/* /etc/php/8.4/fpm/ -COPY deploy/conf/* /etc/php/8.4/cli/ +COPY deploy/conf/* /etc/php/8.5/fpm/ +COPY deploy/conf/* /etc/php/8.5/cli/ ADD ./ /cakephp WORKDIR /cakephp -RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.4/fpm/php-fpm.conf ; fi; +RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.5/fpm/php-fpm.conf ; fi; RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --quiet RUN chmod -R 777 /cakephp -CMD service php8.4-fpm start && \ +CMD service php8.5-fpm start && \ nginx -c /cakephp/deploy/nginx.conf diff --git a/frameworks/PHP/cakephp/deploy/conf/cli-php.ini b/frameworks/PHP/cakephp/deploy/conf/cli-php.ini index e03b6e352a9..d2c550c65ee 100644 --- a/frameworks/PHP/cakephp/deploy/conf/cli-php.ini +++ b/frameworks/PHP/cakephp/deploy/conf/cli-php.ini @@ -14,3 +14,6 @@ opcache.jit_buffer_size = 128M opcache.jit = tracing disable_functions=header,header_remove,headers_sent,headers_list,http_response_code,setcookie,session_create_id,session_id,session_name,session_save_path,session_status,session_start,session_write_close,session_regenerate_id,session_unset,session_get_cookie_params,session_set_cookie_params,set_time_limit + +#php 8.5 +error_reporting = E_ALL & ~E_DEPRECATED diff --git a/frameworks/PHP/cakephp/server.php b/frameworks/PHP/cakephp/server.php index 820e178205d..ce502ed9bee 100644 --- a/frameworks/PHP/cakephp/server.php +++ b/frameworks/PHP/cakephp/server.php @@ -26,7 +26,7 @@ class HeaderDate { - const NAME = 'Date: '; + const DATE_FORMAT = 'D, d M Y H:i:s \G\M\T'; /** * Date header @@ -37,9 +37,9 @@ class HeaderDate public static function init(): void { - self::$date = self::NAME.gmdate(DATE_RFC7231); + self::$date = 'Date: '.gmdate(self::DATE_FORMAT); Timer::add(1, static function () { - self::$date = self::NAME.gmdate(DATE_RFC7231); + self::$date = 'Date: '.gmdate(self::DATE_FORMAT); }); } }