Skip to content

Commit 9115022

Browse files
authored
Merge pull request #504 from aleksandrychev/ENT-4126
ENT-4126: Set phar read only off for PHP
2 parents f6e57fa + 8fe7eda commit 9115022

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

deps-packaging/php/cfbuild-php.spec

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,9 @@ sed -ri 's/^\s*memory_limit\s*=.*/memory_limit = 256M/g' ${RPM_BUILD_ROOT}%{pref
149149
# Set the default timezone for php
150150
sed -ri 's/^(\s|;)*date.timezone\s*=.*/date.timezone = "UTC"/g' ${RPM_BUILD_ROOT}%{prefix}/httpd/php/lib/php.ini
151151

152+
# Set the phar readonly Off for php
153+
sed -ri 's/^(\s|;)phar.readonly = On/phar.readonly = Off/' ${RPM_BUILD_ROOT}%{prefix}/httpd/php/lib/php.ini
154+
152155
echo "extension=curl.so" >> ${RPM_BUILD_ROOT}%{prefix}/httpd/php/lib/curl.ini
153156
echo "extension=openssl.so" >>${RPM_BUILD_ROOT}%{prefix}/httpd/php/lib/openssl.ini
154157
rm -rf ${RPM_BUILD_ROOT}%{prefix}/httpd/conf

deps-packaging/php/debian/rules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,9 @@ install: build
139139
# Set the default timezone for php to UTC
140140
sed -ri 's/^(\s|;)*date.timezone\s*=.*/date.timezone = "UTC"/g' $(CURDIR)/debian/tmp$(PREFIX)/httpd/php/lib/php.ini
141141

142+
# Set the phar readonly Off for php
143+
sed -ri 's/^(\s|;)phar.readonly = On/phar.readonly = Off/' $(CURDIR)/debian/tmp$(PREFIX)/httpd/php/lib/php.ini
144+
142145
echo "extension=curl.so" >> $(CURDIR)/debian/tmp$(PREFIX)/httpd/php/lib/curl.ini
143146
echo "extension=openssl.so" >> $(CURDIR)/debian/tmp$(PREFIX)/httpd/php/lib/openssl.ini
144147

0 commit comments

Comments
 (0)