1.xdebug
php -i > ~/phpinfo.txt
Download xdebug-2.4.1.tgz
Unpack the downloaded file with tar -xvzf xdebug-2.4.1.tgz
Run: cd xdebug-2.4.1
Run: phpize (See the FAQ if you don't have phpize.
> As part of its output it should show:
>
> Configuring for:
> ...
> Zend Module Api No: 20151012
> Zend Extension Api No: 320151012
>
If it does not, you are using the wrong phpize. Please follow this FAQ entry and skip the next step.
Run: ./configure
Run: make
Run: sudo cp modules/xdebug.so /usr/local/lib/php/extensions/no-debug-non-zts-20151012/
copy php.ini to /usr/local/lib/php.ini and add the line
sudo cp /usr/local/php/php.ini /usr/local/lib/
sudo vi /usr/local/lib/php.ini
//append last of the php.ini
zend_extension = /usr/local/lib/php/extensions/no-debug-non-zts-20151012/xdebug.so
xdebug.remote_enable = 1
xdebug.remote_connect_back=1
xdebug.remote_port = 9000
xdebug.scream=0
xdebug.show_local_vars=1
xdebug.idekey=sublime-xdebug
restart php-fpm and nginx
//stop fpm
sudo kill -INT `cat /usr/local/var/run/php-fpm.pid`
//restart fpm
sudo kill -USR2 `cat /usr/local/var/run/php-fpm.pid`
run php -m --有xdebug 表示配置成功
ps aux | grep php-fpm
php -i | grep php.ini
2、sublime text
ctrl+shift+p >>Package Control:Install Package
input xdebug >>xdebug Client
ci pg
$db['default']['hostname'] = 'localhost';
$db['default']['username'] = 'postgres';
$db['default']['password'] = 'YOUR PASSWD';
$db['default']['database'] = 'YOUR DATABASE';
$db['default']['dbdriver'] = 'postgre';
$db['default']['dbprefix'] = '';
$db['default']['pconnect'] = TRUE;
$db['default']['db_debug'] = TRUE;
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = '';
$db['default']['char_set'] = 'utf8';
$db['default']['dbcollat'] = 'utf8_general_ci';
$db['default']['swap_pre'] = '';
$db['default']['autoinit'] = TRUE;
$db['default']['stricton'] = FALSE;
$db['default']['port']= 5432;
phpize install ext(so):
1.
cd phpsource/ext/pdo_pgsql
/usr/local/bin/phpize
2.
$ ./configure --with-pdo-pgsql
make
sudo make install
3.add config to php.ini
extension_dir = "/usr/local/lib/php/extensions/your-path"
extension=pgsql.so
extension=pdo_pgsql.so
4.restar php-fpm and web server
sudo kill -USR2 `cat /usr/local/var/run/php-fpm.pid`
sudo /usr/local/nginx/nginx -s reload
5. check result
php -i | grep pgsql
install curl:
//先安裝
apt-get install curl
apt-get install libcurl4-gnutls-dev
//然後
1. ./configure --with-curl
2. make
3. sudo make install
4.config php.ini
5.restart php-fpm
6.check
refrence:
Zephir
Configure Command => './configure' '--prefix=/webserver/nhp' '--with-config-file-path=/webserver/nhp/etc' '-disable-cgi' '--enable-fpm' '--with-fpm-user=www-data' '--with-fpm-group=www-data' '--with-mcrypt' '--with-zlib' '--with-openssl' '--with-gd=shared' '--with-freetype-dir' '--with-jpeg-dir' '--enable-gd-native-ttf' '--with-pgsql=/opt/pg95' '--enable-sockets' '--enable-opcache' '--without-pear' '--disable-phar' '--disable-fileinfo' '--disable-pdo' '--disable-dom' '--without-sqlite3' '--without-pdo-sqlite' '--disable-posix' '--disable-tokenizer' '--enable-sysvmsg' '--enable-zip' '--enable-sysvsem'