Skip to content
This repository was archived by the owner on Feb 18, 2022. It is now read-only.

Commit de56edf

Browse files
committed
php now requires php-fpm and start it with httpd / nginx
1 parent 59a9fef commit de56edf

File tree

3 files changed

+16
-4
lines changed

3 files changed

+16
-4
lines changed

php-fpm.wants

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[Unit]
2+
Wants=php-fpm.service
3+

php.spec

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
Summary: PHP scripting language for creating dynamic web sites
6868
Name: php
6969
Version: %{upver}%{?rcver:~%{rcver}}
70-
Release: 1%{?dist}
70+
Release: 2%{?dist}
7171
# All files licensed under PHP version 3.01, except
7272
# Zend is licensed under Zend
7373
# TSRM is licensed under BSD
@@ -87,6 +87,7 @@ Source6: php-fpm.service
8787
Source7: php-fpm.logrotate
8888
Source9: php.modconf
8989
Source10: php.ztsmodconf
90+
Source12: php-fpm.wants
9091
Source13: nginx-fpm.conf
9192
Source14: nginx-php.conf
9293
# Configuration files for some extensions
@@ -152,6 +153,7 @@ Provides: mod_php = %{version}-%{release}
152153
Requires: php-common%{?_isa} = %{version}-%{release}
153154
# For backwards-compatibility, require php-cli for the time being:
154155
Requires: php-cli%{?_isa} = %{version}-%{release}
156+
Requires: php-fpm%{?_isa} = %{version}-%{release}
155157
# To ensure correct /var/lib/php/session ownership:
156158
Requires(pre): httpd-filesystem
157159
# php engine for Apache httpd webserver
@@ -1224,8 +1226,9 @@ install -m 755 -d $RPM_BUILD_ROOT%{_prefix}/lib/tmpfiles.d
12241226
install -m 644 php-fpm.tmpfiles $RPM_BUILD_ROOT%{_prefix}/lib/tmpfiles.d/php-fpm.conf
12251227
# install systemd unit files and scripts for handling server startup
12261228
install -m 755 -d $RPM_BUILD_ROOT%{_sysconfdir}/systemd/system/php-fpm.service.d
1227-
install -m 755 -d $RPM_BUILD_ROOT%{_unitdir}
1228-
install -m 644 %{SOURCE6} $RPM_BUILD_ROOT%{_unitdir}/
1229+
install -Dm 644 %{SOURCE6} $RPM_BUILD_ROOT%{_unitdir}/php-fpm.conf
1230+
install -Dm 644 %{SOURCE12} $RPM_BUILD_ROOT%{_unitdir}/httpd.service.d/php-fpm.conf
1231+
install -Dm 644 %{SOURCE12} $RPM_BUILD_ROOT%{_unitdir}/nginx.service.d/php-fpm.conf
12291232
# LogRotate
12301233
install -m 755 -d $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d
12311234
install -m 644 %{SOURCE7} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/php-fpm
@@ -1438,6 +1441,8 @@ rm -f README.{Zeus,QNX,CVS-RULES}
14381441
%config(noreplace) %{_sysconfdir}/nginx/default.d/php.conf
14391442
%{_prefix}/lib/tmpfiles.d/php-fpm.conf
14401443
%{_unitdir}/php-fpm.service
1444+
%{_unitdir}/httpd.service.d/php-fpm.conf
1445+
%{_unitdir}/nginx.service.d/php-fpm.conf
14411446
%{_sbindir}/php-fpm
14421447
%dir %{_sysconfdir}/systemd/system/php-fpm.service.d
14431448
%dir %{_sysconfdir}/php-fpm.d
@@ -1508,6 +1513,9 @@ rm -f README.{Zeus,QNX,CVS-RULES}
15081513

15091514

15101515
%changelog
1516+
* Mon Sep 25 2017 Remi Collet <[email protected]> - 7.1.10~RC1-2
1517+
- php now requires php-fpm and start it with httpd / nginx
1518+
15111519
* Wed Sep 13 2017 Remi Collet <[email protected]> - 7.1.10~RC1-1
15121520
- Update to 7.1.10RC1
15131521

php.ztsmodconf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11

22
<IfModule !mod_php5.c>
33
<IfModule !prefork.c>
4-
LoadModule php7_module modules/libphp7-zts.so
4+
# ZTS module is not supported, so FPM is preferred
5+
# LoadModule php7_module modules/libphp7-zts.so
56
</IfModule>
67
</IfModule>

0 commit comments

Comments
 (0)