@@ -15,8 +15,8 @@ MEMSIZE_MB=$(free -m | awk '/^Mem:/{print $2}')
1515# configurations #
1616# ----------------#
1717
18- bison_version=" 2.7.1"
1918php_version=" latest"
19+ bison_version=" 2.7.1"
2020
2121# get the exact latest 5.6 version number
2222if [ " ${php_version,,} " = ' latest' ]; then
@@ -69,8 +69,8 @@ yum install -y \
6969# fix lib linking #
7070# -----------------#
7171
72- ln -sf /usr/lib64/libldap* /usr/lib/
73- ln -sf /usr/lib64/liblber* /usr/lib/
72+ ln -sfn /usr/lib64/libldap* /usr/lib/
73+ ln -sfn /usr/lib64/liblber* /usr/lib/
7474
7575ldconfig
7676
113113
114114# prefer using older bison
115115if ! bison --version | grep -F -q " ${bison_version} " ; then
116- echo " * temporarily set bison executable into PATH"
116+ echo " [*] temporarily set bison executable into PATH"
117117 PATH=" ${bison_bin_dir} :$PATH "
118118fi
119119
@@ -163,51 +163,54 @@ pushd "${php_src_dir}" || exit
163163
164164./buildconf --force
165165
166- ./configure --prefix=" ${php_install_dir} " \
167- --disable-debug \
168- --disable-rpath \
169- --enable-bcmath \
170- --enable-calendar \
171- --enable-exif \
172- --enable-fpm \
173- --enable-ftp \
174- --enable-inline-optimization \
175- --enable-intl \
176- --enable-mbregex --enable-mbstring \
177- --enable-pcntl \
178- --enable-shmop \
179- --enable-soap \
180- --enable-sockets \
181- --enable-sysvmsg --enable-sysvsem --enable-sysvshm \
182- --enable-wddx \
183- --enable-xml \
184- --enable-zip \
185- --with-bz2 \
186- --with-config-file-path=" ${php_install_dir} /etc" \
187- --with-config-file-scan-dir=" ${php_install_dir} /etc/php.d" \
188- --with-curl=" /usr/local" \
189- --with-fpm-group=" ${php_run_user} " \
190- --with-fpm-user=" ${php_run_user} " \
191- --with-gd --with-freetype-dir --with-jpeg-dir --with-png-dir --enable-gd-native-ttf \
192- --with-gettext \
193- --with-gmp \
194- --with-iconv-dir=" /usr/local" \
195- --with-libxml-dir=" /usr" \
196- --with-libzip \
197- --with-mhash \
198- --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --enable-mysqlnd \
199- --with-openssl \
200- --with-pspell \
201- --with-readline \
202- --with-xmlrpc \
203- --with-xsl \
204- --with-zlib \
205- ${LOW_MEMORY_FLAGS[*]}
166+ ./configure \
167+ --prefix=" ${php_install_dir} " \
168+ --disable-debug \
169+ --disable-rpath \
170+ --enable-bcmath \
171+ --enable-calendar \
172+ --enable-exif \
173+ --enable-fpm \
174+ --enable-ftp \
175+ --enable-inline-optimization \
176+ --enable-intl \
177+ --enable-mbregex --enable-mbstring \
178+ --enable-pcntl \
179+ --enable-shmop \
180+ --enable-soap \
181+ --enable-sockets \
182+ --enable-sysvmsg --enable-sysvsem --enable-sysvshm \
183+ --enable-wddx \
184+ --enable-xml \
185+ --enable-zip \
186+ --with-bz2 \
187+ --with-config-file-path=" ${php_install_dir} /etc" \
188+ --with-config-file-scan-dir=" ${php_install_dir} /etc/php.d" \
189+ --with-curl=" /usr/local" \
190+ --with-fpm-group=" ${php_run_user} " \
191+ --with-fpm-user=" ${php_run_user} " \
192+ --with-gd --with-freetype-dir --with-jpeg-dir --with-png-dir --enable-gd-native-ttf \
193+ --with-gettext \
194+ --with-gmp \
195+ --with-iconv-dir=" /usr/local" \
196+ --with-libxml-dir=" /usr" \
197+ --with-libzip \
198+ --with-mhash \
199+ --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --enable-mysqlnd \
200+ --with-openssl \
201+ --with-pspell \
202+ --with-readline \
203+ --with-xmlrpc \
204+ --with-xsl \
205+ --with-zlib \
206+ ${LOW_MEMORY_FLAGS[*]}
206207
207208# PEAR is no longer maintained, ignore errors about PEAR
208209sed -i" " -E " s/^(install-pear):/.IGNORE: \1\n\1:/g" ./Makefile
209210
210- make -j" ${THREAD_CNT} " ZEND_EXTRA_LIBS=" ${ZEND_EXTRA_LIBS[*]} " && make install && make clean
211+ make -j" ${THREAD_CNT} " ZEND_EXTRA_LIBS=" ${ZEND_EXTRA_LIBS[*]} " || exit
212+ make install || exit
213+ make clean
211214
212215popd || exit
213216
@@ -216,4 +219,6 @@ popd || exit
216219# end #
217220# -----#
218221
222+ " ${php_install_dir} /bin/php" -v
223+
219224popd || exit
0 commit comments