2014-05-14 4 views
0

방글라데시에서 pthreads 확장을 사용하려고했습니다. 나는 PECL 섹션에서 puphpet과 pthreads를 통해 Vagrantfile을 생성했습니다. 난 막연한 일을 할 때 모든 것이 정상이라고 말하지만 가상 컴퓨터에서 php -m을 실행하면 확장이 없어지고 클래스를 사용할 수 없습니다. 방글라데시와 puphpet로 PHP 용 pthread 사용 가능

$ sudo pecl install pthreads 
downloading pthreads-2.0.7.tgz ... 
Starting to download pthreads-2.0.7.tgz (77,570 bytes) 
..................done: 77,570 bytes 
34 source files, building 
running: phpize 
Configuring for: 
PHP Api Version:   20121113 
Zend Module Api No:  20121212 
Zend Extension Api No: 220121212 
building in /tmp/pear/temp/pear-build-rootS6s2Hq/pthreads-2.0.7 
running: /tmp/pear/temp/pthreads/configure 
checking for grep that handles long lines and -e... /bin/grep 
checking for egrep... /bin/grep -E 
checking for a sed that does not truncate output... /bin/sed 
checking for cc... cc 
checking whether the C compiler works... yes 
checking for C compiler default output file name... a.out 
checking for suffix of executables... 
checking whether we are cross compiling... no 
checking for suffix of object files... o 
checking whether we are using the GNU C compiler... yes 
checking whether cc accepts -g... yes 
checking for cc option to accept ISO C89... none needed 
checking how to run the C preprocessor... cc -E 
checking for icc... no 
checking for suncc... no 
checking whether cc understands -c and -o together... yes 
checking for system library directory... lib 
checking if compiler supports -R... no 
checking if compiler supports -Wl,-rpath,... yes 
checking build system type... x86_64-unknown-linux-gnu 
checking host system type... x86_64-unknown-linux-gnu 
checking target system type... x86_64-unknown-linux-gnu 
checking for PHP prefix... /usr 
checking for PHP includes... -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib 
checking for PHP extension directory... /usr/lib/php5/20121212 
checking for PHP installed headers prefix... /usr/include/php5 
checking if debug is enabled... no 
checking if zts is enabled... no 
checking for re2c... no 
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers. 
checking for gawk... no 
checking for nawk... nawk 
checking if nawk is broken... no 
checking whether to enable Threading API... yes, shared 
checking whether to enable pedantic locking... no 
checking checking for ZTS... configure: error: pthreads requires ZTS, please re-compile PHP with ZTS enabled 
ERROR: `/tmp/pear/temp/pthreads/configure' failed 

이 그래서 내가 방랑 환경에서 사용할 수 ZTS이 필요하다는 것 :

나는 방랑 SSH를하고 수동의 pthreads를 설치하려고하면

, 나는 다음과 같은 오류가 발생했습니다. config.yaml 파일에서 지정할 방법이 있습니까? 이것은 내가 현재 가지고있는 것입니다 :

--- 
vagrantfile-local: 
    vm: 
     box: debian-wheezy72-x64-vbox43 
     box_url: 'http://box.puphpet.com/debian-wheezy72-x64-vbox43.box' 
     hostname: null 
     network: 
      private_network: 192.168.56.101 
      forwarded_port: 
       RPfV8nB1v0E7: 
        host: '7885' 
        guest: '22' 
     provider: 
      virtualbox: 
       modifyvm: 
        natdnshostresolver1: on 
        memory: '512' 
       setextradata: 
        VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root: 1 
     provision: 
      puppet: 
       manifests_path: puphpet/puppet 
       manifest_file: manifest.pp 
       options: 
        - '--verbose' 
        - '--hiera_config /vagrant/puphpet/puppet/hiera.yaml' 
        - '--parser future' 
     synced_folder: 
      Nko2ivpBaaBH: 
       source: ./ 
       target: /var/www/php-mud-client 
       nfs: 'false' 
     usable_port_range: 2200..2250 
    ssh: 
     host: null 
     port: null 
     private_key_path: null 
     username: vagrant 
     guest_port: null 
     keep_alive: true 
     forward_agent: false 
     forward_x11: false 
     shell: 'bash -l' 
    vagrant: 
     host: detect 
server: 
    packages: 
     - vim 
    dot_files: 
     - 
      bash_aliases: null 
    _prevent_empty: '' 
mailcatcher: 
    install: 0 
    settings: 
     smtp_ip: 0.0.0.0 
     smtp_port: 1025 
     http_ip: 0.0.0.0 
     http_port: '1080' 
     mailcatcher_path: /usr/local/bin 
     log_path: /var/log/mailcatcher/mailcatcher.log 
apache: 
    install: 1 
    settings: 
     user: www-data 
     group: www-data 
     default_vhost: true 
     manage_user: false 
     manage_group: false 
     sendfile: 0 
    modules: 
     - php 
     - rewrite 
    vhosts: { } 
    mod_pagespeed: 0 
    mod_spdy: 0 
php: 
    install: '1' 
    version: '55' 
    composer: '1' 
    modules: 
     php: 
      - cli 
      - intl 
      - mcrypt 
     pear: { } 
     pecl: 
      - pecl_http 
      - pthreads 
    ini: 
     display_errors: On 
     error_reporting: '-1' 
     session.save_path: /var/lib/php/session 
    timezone: Europe/Madrid 
mysql: 
    install: 0 
    root_password: '123' 
    phpmyadmin: 0 
    adminer: 0 
    databases: { } 
postgresql: 
    install: 0 
    settings: 
     root_password: '123' 
     user_group: postgres 
     encoding: UTF8 
     version: '9.3' 
    databases: { } 
    adminer: 0 
mariadb: 
    install: 0 
    root_password: '123' 
    phpmyadmin: 0 
    adminer: 0 
    databases: { } 
mongodb: 
    install: 0 
    settings: 
     auth: 1 
     port: '27017' 
    databases: { } 
redis: 
    install: 0 
    settings: 
     conf_port: '6379' 
beanstalkd: 
    install: 0 
    settings: 
     listenaddress: 0.0.0.0 
     listenport: '13000' 
     maxjobsize: '65535' 
     maxconnections: '1024' 
     binlogdir: /var/lib/beanstalkd/binlog 
     binlogfsync: null 
     binlogsize: '10485760' 
    beanstalk_console: 0 
    binlogdir: /var/lib/beanstalkd/binlog 
rabbitmq: 
    install: 0 
    settings: 
     port: '5672' 

답변

1

내가 마지막으로 다음과 같은 옵션 PHP 5.5을 컴파일 쉘 스크립트와 방랑 파일을 만든 활성화 :

  • 수 있도록 디버그
  • enable- 메인테이너-ZTS
  • 수-pthreads의

방랑 파일은 Github에서 찾을 수 있습니다 :

매우 복잡한 환경이 필요하지 않으므로 충분할 것으로 보입니다.