我是靠谱客的博主 坚定导师,最近开发中收集的这篇文章主要介绍sublime text编译php7,php7 + xdebug+sublime text 3,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

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'

最后

以上就是坚定导师为你收集整理的sublime text编译php7,php7 + xdebug+sublime text 3的全部内容,希望文章能够帮你解决sublime text编译php7,php7 + xdebug+sublime text 3所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(56)

评论列表共有 0 条评论

立即
投稿
返回
顶部