forked from Lapayo/SAMPHP
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall_libphp5.sh
executable file
·51 lines (38 loc) · 951 Bytes
/
install_libphp5.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
set -e
SRCDIR=${HOME}/php5.6-source
DISTDIR=${HOME}/dist
rm -rf $SRCDIR
PHP5="php-5.6.3"
PHPFEATURES="--disable-cli --disable-cgi --enable-embed=shared --disable-zts --with-sqlite3 --enable-pdo --with-pdo-mysql --with-pdo-sqlite --with-mysqli --enable-mbstring \
"
mkdir -p ${SRCDIR}
if [ ! -f ${DISTDIR} ]
then
mkdir -p ${DISTDIR}
fi
cd ${DISTDIR}
if [ ! -f ${DISTDIR}/${PHP5}.tar.gz ]
then
wget -c http://us.php.net/get/${PHP5}.tar.gz/from/this/mirror/
mv index.html ${PHP5}.tar.gz
fi
echo ---------- Unpacking downloaded archives. This process may take several minutes! ----------
cd ${SRCDIR}
# Unpack them all
echo Extracting ${PHP5}...
tar xzf ${DISTDIR}/${PHP5}.tar.gz
echo Done.
#PHP 5
echo ###################
echo Compile PHP
echo ###################
cd ${SRCDIR}/${PHP5}
export CXXFLAGS="-m32"
export LDFLAGS="-m32"
export CPPFLAGS="-m32"
./configure ${PHPFEATURES}
make
make install
#register module
ldconfig
exit 0