php-7.4.33-1no1linux2026
1. php 2026.10.21 취약점 보완
2. Cest.Linux 홈페이지 운용 관계로 7.4.33 버전으로 보안 패치(8.5.12 버전 리빌드 -> XE 지원하지 못함)
3. /etc/httpd/conf/modules.d/70_mod_php.conf
LoadModule php7_module modules/mod_php.so
AddType application/x-httpd-php .php
AddType application/x-httpd-php .phtml
AddType application/x-httpd-php-source .phps
DirectoryIndex index.php index.phtml
AddType application/x-httpd-php .php
AddType application/x-httpd-php .phtml
AddType application/x-httpd-php-source .phps
DirectoryIndex index.php index.phtml
(주의) php_module이 아니라 php7_module로 설정해야 함. 이는 소스 빌드 시 sapi/apache2handler/mod_php7.c를 mod_php.c로 대체했기 때문에 php7_module로 사용하여야 함.
4. 리빌드된 패키지 설치 시 dnf in -y php-mysqli 명령으로 mysql 연동 패키지 설치
5. /etc/httpd/conf/conf.d/security.conf 수정해야 phpinfo()가 동작하게 됨. 403 오류로 접근 제한시 설정
# miscellaneous security settings
# disable TRACE (CVE-2009-2823)
TraceEnable Off
<IfModule mod_dir.c>
# This protects rpm backup files from beeing served, these files could
# contain sensible information.
<FilesMatch "\.(rpmorig|rpmsave)$">
Require all denied
</FilesMatch>
# This protects ssi and php files from beeing served if the module is not
# installed, it prevents presumptive source code theft.
<IfModule !mod_include.c>
<FilesMatch "\.(shtml)$">
ErrorDocument 403 "<h1>403 Forbidden: Execute Access Forbidden</h1>\
<p>The server is currently not serving ssi scripts.</p><p>This \
could mean the server administrator is doing maintenance or has \
orphan ssi files laying around, please contact the server \
administrator or come back later. Thank you.</p>"
Require all denied
</FilesMatch>
</IfModule>
</IfModule>
26~30 라인 설정 제거 # disable TRACE (CVE-2009-2823)
TraceEnable Off
<IfModule mod_dir.c>
# This protects rpm backup files from beeing served, these files could
# contain sensible information.
<FilesMatch "\.(rpmorig|rpmsave)$">
Require all denied
</FilesMatch>
# This protects ssi and php files from beeing served if the module is not
# installed, it prevents presumptive source code theft.
<IfModule !mod_include.c>
<FilesMatch "\.(shtml)$">
ErrorDocument 403 "<h1>403 Forbidden: Execute Access Forbidden</h1>\
<p>The server is currently not serving ssi scripts.</p><p>This \
could mean the server administrator is doing maintenance or has \
orphan ssi files laying around, please contact the server \
administrator or come back later. Thank you.</p>"
Require all denied
</FilesMatch>
</IfModule>
</IfModule>
6. 설치 후에 XE와 발생될 수 있는 문제점
1. 로그인 인증 문제 : /etc/php.d/21_openssl.ini -> extension = openssl
2. session_set_save_handler() 미정의 : /etc/php.d/20_session.ini -> extension = session
3. filter_var() 미정의 : /etc/php.d/20_filter.ini -> extension = filter
4. pdo_sqlite.so 심볼 문제 : /etc/php.d/70_pdo.ini 추가 및 로드 순서 조정
5. mysqli_connect() 미정의 : /etc/php.d/30_mysqli.ini -> extension = mysqli
6. ctype_xdigit() 머정의로 로그인 실패 : /etc/php.d/15_ctype.ini -> extension = ctype