-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinstall_xdebug.sh
More file actions
executable file
·52 lines (41 loc) · 1.01 KB
/
install_xdebug.sh
File metadata and controls
executable file
·52 lines (41 loc) · 1.01 KB
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
#!/bin/bash
# andychen ([email protected])
# date 2015-2-9
# install xdebug
# NOTE ------------------------------
#
# php.ini account
#
# error_reporting = E_ALL
# display_error = On
# html_error = On
#
# NOTE ------------------------------
CPU_NUM=$(cat /proc/cpuinfo | grep processor | wc -l)
if [ ! -f "xdebug-2.2.2.tgz" ]; then
wget http://pecl.php.net/get/xdebug-2.2.2.tgz
fi
sudo rm -fr xdebug-2.2.2
tar -zvxf xdebug-2.2.2.tgz
cd xdebug-2.2.2
/alidata/server/php/bin/phpize
./configure --with-php-config=/alidata/server/php/bin/php-config
if [ $CPU_NUM -gt 1 ];then
make -j$CPU_NUM
else
make
fi
make install
cd ..
echo "
[Xdebug]
zend_extension=/alidata/server/php/lib/php/extensions/no-debug-non-zts-20090626/xdebug.so
xdebug.auto_trace=On
xdebug.show_mem_delta=On
xdebug.collect_params=On
xdebug.collect_return=On
xdebug.profiler_enable=On
xdebug.profiler_output_name=\"script\"
xdebug.trace_output_dir=\"/tmp/php_xdebug\"
xdebug.profiler_output_dir=\"/tmp/php_xdebug\"
" >> /alidata/server/php/etc/php.ini