php7 + xdebug+sublime text 3

1.xdebug

https://xdebug.org/wizard.php 在以上网址填入:php -i的内容。

php -i > ~/phpinfo.txt
  1. Download xdebug-2.4.1.tgz
  2. Unpack the downloaded file with tar -xvzf xdebug-2.4.1.tgz
  3. Run: cd xdebug-2.4.1
  4. 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.

  1. Run: ./configure
  2. Run: make
  3. Run: sudo cp modules/xdebug.so /usr/local/lib/php/extensions/no-debug-non-zts-20151012/
  4. 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

  1. 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

  1. ctrl+shift+p >>Package Control:Install Package
  2. input xdebug >>xdebug Client
  3. chrome extensions install :https://github.com/mac-cain13/xdebug-helper-for-chrome

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'

转载于:https://my.oschina.net/raydchang/blog/786714

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值