开发者

PHPUNIT xdebug codecoverage not working in console (mac) MAMP 1.9 PRO

开发者 https://www.devze.com 2023-01-26 05:29 出处:网络
Hi i have issues with my xdebug connection to PHPUnit. when running: phpunit --coverage-html ./report unit

Hi i have issues with my xdebug connection to PHPUnit.

when running:

phpunit --coverage-html ./report unit

i get:

PHPUnit 3.4.15 by Sebastian Bergmann.

The Xdebug extension is not loaded.

when i run php -v

PHP 5.2.13 (cli) (built: Mar  5 2010 16:23:44) 
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies
    with eAccelerator v0.9.6, Copyright (c) 2004-2010 eAccelerator, by eAccelerator
    with Xdebug v2.0.5, Copyright (c) 2002-2008, by Derick Rethans

when i run php -m

[PHP Modules]
bcmath
bz2
calendar
ctype
curl
date
dbase
dom
eAccelerator
exif
filter
ftp
gd
gettext
hash
iconv
imap
json
ldap
libxml
mbstring
mcrypt
mysql
mysqli
openssl
pcre
PDO
pdo_mysql
pdo_pgsql
pdo_sqlite
pgsql
posix
Reflection
session
SimpleXML
soap
sockets
SPL
SQLite
standard
tokenizer
xdebug
xml
xmlreader
xmlwriter
xsl
yaz
zlib

[Zend Modules]
Xdebug
eAccelerator

this is my php_info()

PHP Version 5.2.13


System  Darwin Mikael-B-Ortenheims-MacBook-Pro.local 10.5.0 Darwin Kernel Version 10.5.0: Fri Nov 5 23:20:39 PDT 2010; root:xnu-1504.9.17~1/RELEASE_I386 i386
Build Date  Mar 5 2010 16:19:29
Configure Command    './configure' '--with-mysql=/Applications/MAMP/Library' '--with-apxs2=/Applications/MAMP/Library/bin/apxs' '--with-gd' '--with-jpeg-dir=/Applications/MAMP/Library' '--with-png-dir=/Applications/MAMP/Library' '--with-zlib' '--with-freetype-dir=/Applications/MAMP/Library' '--prefix=/Applications/MAMP/bin/php5.2' '--exec-prefix=/Applications/MAMP/bin/php5.2' '--sysconfdir=/Applications/MAMP/conf/php5.2' '--with-soap' '--with-config-file-path=/Applications/MAMP/conf/php5.2' '--enable-track-vars' '--enable-bcmath' '--enable-ftp' '--enable-gd-native-ttf' '--with-bz2=/usr' '--with-ldap' '--with-mysqli=/Applications/MAMP/Library/bin/mysql_config' '--with-sqlite' '--with-ttf' '--with-t1lib=/Applications/MAMP/Library' '--enable-mbstring=all' '--with-curl=/Applications/MAMP/Library' '--enable-dbx' '--enable-sockets' '--enable-bcmath' '--with-imap=shared,/Applications/MAMP/Library/lib/imap-2007e' '--enable-soap' '--with-kerberos' '--enable-calendar' '--with-pgsql=shared,/Applications/MAMP/Library/pg' '--enable-dbase' '--enable-exif' '--with-libxml-dir=/Applications/MAMP/Library' '--with-gettext=shared,/Applications/MAMP/Library' '--with-xsl=/Applications/MAMP/Library' '--with-pdo-mysql=shared,/Applications/MAMP/Library' '--with-pdo-pgsql=shared,/Applications/MAMP/Library/pg' '--with-mcrypt=shared,/Applications/MAMP/Library' '--with-openssl'
Server API  Apache 2.0 Handler
Virtual Directory Support   disabled
Configuration File (php.ini) Path   /Applications/MAMP/conf/php5.2
Loaded Configuration File   /Library/Application Support/appsolute/MAMP PRO/conf/php.ini
Scan this dir for additional .ini files (none)
additional .ini files parsed    (none)
PHP API 20041225
PHP Extension   20060613
Zend Extension  220060519
Debug Build no
Thread Safety   disabled
Zend Memory Manager enabled
IPv6 Support    enabled
Registered PHP Streams  https, ftps, compress.zlib, compress.bzip2, php, file, data, http, ftp
Registered Stream Socket Transports tcp, udp, unix, udg, ssl, sslv3, sslv2, tls
Registered Stream Filters   zlib.*, bzip2.*, convert.iconv.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed

This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies
    with Xdebug v2.0.5, Copyright (c) 2002-2008, by Derick Rethans

PHP Credits

Configuration

PHP Core

Directive   Local Value Master Value
allow_call_time_pass_reference  On  On
allow_url_fopen On  On
allow_url_include   Off Off
always_populate_raw_post_data   Off Off
arg_separator.input &   &
arg_separator.output    &   &
asp_tags    Off Off
auto_append_file    no value    no value
auto_globals_jit    On  On
auto_prepend_file   no value    no value
browscap    no value    no value
default_charset no value    no value
default_mimetype    text/html   text/html
define_syslog_variables Off Off
disable_classes no value    no value
disable_functions   no value    no value
display_errors  On  On
display_startup_errors  On  On
doc_root    no value    no value
docref_ext  no value    no value
docref_root no value    no value
enable_dl   On  On
error_append_string no value    no value
error_log   /Applications/MAMP/logs/php_error.log   /Applications/MAMP/logs/php_error.log
error_prepend_string    no value    no value
error_reporting 6143    6143
expose_php  On  On
extension_dir   /Applications/MAMP/bin/php5.2/lib/php/extensions/no-debug-non-zts-20060613/ /Applications/MAMP/bin/php5.2/lib/php/extensions/no-debug-non-zts-20060613/
file_uploads    On  On
highlight.bg    #FFFFFF #FFFFFF
highlight.comment   #FF8000 #FF8000
highlight.default   #0000BB #0000BB
highlight.html  #000000 #000000
highlight.keyword   #007700 #007700
highlight.string    #DD0000 #DD0000
html_errors On  On
ignore_repeated_errors  Off Off
ignore_repeated_source  Off Off
ignore_user_abort   Off Off
implicit_flush  Off Off
include_path    .:/Applications/MAMP/bin/php5.2/lib/php .:/Applications/MAMP/bin/php5.2/lib/php
log_errors  On  On
log_errors_max_len  1024    1024
magic_quotes_gpc    On  On
magic_quotes_runtime    Off Off
magic_quotes_sybase Off Off
mail.force_extra_parameters no value    no value
max_execution_time  30  30
max_file_uploads    20  20
max_input_nesting_level 64  64
max_input_time  60  60
memory_limit    32M 32M
open_basedir    no value    no value
output_buffering    no value    no value
output_handler  no value    no value
post_max_size   32M 32M
precision   12  12
realpath_cache_size 16K 16K
realpath_cache_ttl  120 120
register_argc_argv  On  On
register_globals    Off Off
register_long_arrays    On  On
report_memleaks On  On
report_zend_debug   On  On
safe_mode   Off Off
safe_mode_exec_dir  no value    no value
safe_mode_gid   Off Off
safe_mode_include_dir   no value    no value
sendmail_from   no value    no value
sendmail_path   /usr/sbin/sendmail -t -i    /usr/sbin/sendmail -t -i 
serialize_precision 100 100
short_open_tag  On  On
SMTP    localhost   localhost
smtp_port   25  25
sql.safe_mode   Off Off
track_errors    Off Off
unserialize_callback_func   no value    no value
upload_max_filesize 32M 32M
upload_tmp_dir  /Applications/MAMP/tmp/php  /Applications/MAMP/tmp/php
user_dir    no value    no value
variables_order EGPCS   EGPCS
xmlrpc_error_number 0   0
xmlrpc_errors   Off Off
y2k_compliance  On  On
zend.ze1_compatibility_mode Off Off

apache2handler

Apache Version  Apache
Apache API Version  20020903
Server Administrator    you@example.com
Hostname:Port   localhost:8888
User/Group  mikaelbortenheim(501)/-1
Max Requests    Per Child: 0 - Keep Alive: on - Max Per Connection: 100
Timeouts    Connection: 300 - Keep-Alive: 15
Virtual Server  Yes
Server Root /Applications/MAMP/Library
Loaded Modules  core prefork http_core mod_so mod_access mod_auth mod_auth_anon mod_auth_dbm mod_auth_digest mod_file_cache mod_echo mod_charset_lite mod_cache mod_disk_cache mod_mem_cache mod_example mod_case_filter mod_case_filter_in mod_ext_filter mod_include mod_deflate mod_log_config mod_env mod_mime_magic mod_cern_meta mod_expires mod_headers mod_usertrack mod_setenvif mod_proxy proxy_connect proxy_ftp proxy_http mod_bucketeer mod_mime mod_dav mod_status mod_autoindex mod_asis mod_info mod_cgi mod_cgid mod_dav_fs mod_vhost_alias mod_negotiation mod_dir mod_imap mod_actions mod_speling mod_userdir mod_alias mod_rewrite mod_php5

Directive   Local Value Master Value
engine  1   1
last_modified   0   0
xbithack    0   0

Apache Environment

Variable    Value
HTTP_HOST   localhost:8888
HTTP_USER_AGENT Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_5; en-us) AppleWebKit/533.18.1 (KHTML, like Gecko) Version/5.0.2 Safari/533.18.5
HTTP_ACCEPT application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
HTTP_REFERER    http://localhost:8888/MAMP/English/index.php?language=English
HTTP_ACCEPT_LANGUAGE    en-us
HTTP_ACCEPT_ENCODING    gzip, deflate
HTTP_COOKIE SQLiteManager_currentLangue=2
HTTP_CONNECTION keep-alive
PATH    /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/opt/local/bin:/usr/local/git/bin
SERVER_SIGNATURE    no value
SERVER_SOFTWARE Apache
SERVER_NAME localhost
SERVER_ADDR ::1
SERVER_PORT 8888
REMOTE_HOST localhost
REMOTE_ADDR ::1
DOCUMENT_ROOT   /Users/mikaelbortenheim/Sites/PHP
SERVER_ADMIN    you@example.com
SCRIPT_FILENAME /Library/Application Support/appsolute/MAMP PRO/mamp/phpinfo.php
REMOTE_PORT 65402
GATEWAY_INTERFACE   CGI/1.1
SERVER_PROTOCOL HTTP/1.1
REQUEST_METHOD  GET
QUERY_STRING    no value
REQUEST_URI /MAMP/phpinfo.php
SCRIPT_NAME /MAMP/phpinfo.php

HTTP Headers Information

HTTP Request Headers
HTTP Request    GET /MAMP/phpinfo.php HTTP/1.1
Host    localhost:8888
User-Agent  Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_5; en-us) AppleWebKit/533.18.1 (KHTML, like Gecko) Version/5.0.2 Safari/533.18.5
Accept  application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Referer http://localhost:8888/MAMP/English/index.php?language=English
Accept-Language en-us
Accept-Encoding gzip, deflate
Cookie  SQLiteManager_currentLangue=2
Connection  keep-alive
HTTP Response Headers
X-Powered-By    PHP/5.2.13
Keep-Alive  timeout=15, max=93
Connection  Keep-Alive
Transfer-Encoding   chunked
Content-Type    text/html

bcmath

BCMath support  enabled

bz2

BZip2 Support   Enabled
Stream Wrapper support  compress.bz2://
Stream Filter support   bzip2.decompress, bzip2.compress
BZip2 Version   1.0.5, 10-Dec-2007

calendar

Calendar support    enabled

ctype

ctype functions enabled

curl

cURL support    enabled
cURL Information    libcurl/7.20.0 OpenSSL/0.9.7l zlib/1.2.3 libidn/1.15

date

date/time support   enabled
"Olson" Timezone Database Version   2010.2
Timezone Database   internal
Default timezone    Europe/Berlin

Directive   Local Value Master Value
date.default_latitude   31.7667 31.7667
date.default_longitude  35.2333 35.2333
date.sunrise_zenith 90.583333   90.583333
date.sunset_zenith  90.583333   90.583333
date.timezone   no value    no value

dom

DOM/XML enabled
DOM/XML API Version 20031129
libxml Version  2.7.6
HTML Support    enabled
XPath Support   enabled
XPointer Support    enabled
Schema Support  enabled
RelaxNG Support enabled

exif

EXIF Support    enabled
EXIF Version    1.4 $Id: exif.c 293036 2010-01-03 09:23:27Z sebastian $
Supported EXIF Version  0220
Supported filetypes JPEG,TIFF

filter

Input Validation and Filtering  enabled
Revision    $Revision: 293051 $

Directive   Local Value Master Value
filter.default  unsafe_raw  unsafe_raw
filter.default_flags    no value    no value

ftp

FTP support enabled

gd

GD Support  enabled
GD Version  bundled (2.0.34 compatible)
FreeType Support    enabled
FreeType Linkage    with freetype
FreeType Version    2.3.9
T1Lib Support   enabled
GIF Read Support    enabled
GIF Create Support  enabled
JPG Support enabled
PNG Support enabled
WBMP Support    enabled
XBM Support enabled

gettext

GetText Support enabled

hash

hash support    enabled
Hashing Engines md2 md4 md5 sha1 sha256 sha384 sha512 ripemd128 ripemd160 ripemd256 ripemd320 whirlpool tiger128,3 tiger160,3 tiger192,3 tiger128,4 tiger160,4 tiger192,4 snefru gost adler32 crc32 crc32b haval128,3 haval160,3 haval192,3 haval224,3 haval256,3 haval128,4 haval160,4 haval192,4 haval224,4 haval256,4 haval128,5 haval160,5 haval192,5 haval224,5 haval256,5

iconv

iconv support   enabled
iconv implementation    libiconv
iconv library version   1.13

Directive   Local Value Master Value
iconv.input_encoding    ISO-8859-1  ISO-8859-1
iconv.internal_encoding ISO-8859-1  ISO-8859-1
iconv.output_encoding   ISO-8859-1  ISO-8859-1

imap

IMAP c-Client Version   2007e
Kerberos Support    enabled

json

json support    enabled
json version    1.2.1
开发者_运维百科
ldap

LDAP Support    enabled
RCS Version $Id: ldap.c 293036 2010-01-03 09:23:27Z sebastian $
Total Links 0/unlimited
API Version 3001
Vendor Name OpenLDAP
Vendor Version  20219

libxml

libXML support  active
libXML Version  2.7.6
libXML streams  enabled

mbstring

Multibyte Support   enabled
Multibyte string engine libmbfl
Multibyte (japanese) regex support  enabled
Multibyte regex (oniguruma) version 4.4.4
Multibyte regex (oniguruma) backtrack check On

mbstring extension makes use of "streamable kanji code filter and converter", which is distributed under the GNU Lesser General Public License version 2.1.

Directive   Local Value Master Value
mbstring.detect_order   no value    no value
mbstring.encoding_translation   Off Off
mbstring.func_overload  0   0
mbstring.http_input pass    pass
mbstring.http_output    pass    pass
mbstring.internal_encoding  no value    no value
mbstring.language   neutral neutral
mbstring.strict_detection   Off Off
mbstring.substitute_character   no value    no value

mcrypt

mcrypt support  enabled
Version 2.5.8
Api No  20021217
Supported ciphers   cast-128 gost rijndael-128 twofish arcfour cast-256 loki97 rijndael-192 saferplus wake blowfish-compat des rijndael-256 serpent xtea blowfish enigma rc2 tripledes
Supported modes cbc cfb ctr ecb ncfb nofb ofb stream

Directive   Local Value Master Value
mcrypt.algorithms_dir   no value    no value
mcrypt.modes_dir    no value    no value

mysql

MySQL Support   enabled
Active Persistent Links 0
Active Links    0
Client API version  5.1.44
MYSQL_MODULE_TYPE   external
MYSQL_SOCKET    /Applications/MAMP/tmp/mysql/mysql.sock
MYSQL_INCLUDE   -I/Applications/MAMP/Library/include/mysql
MYSQL_LIBS  -L/Applications/MAMP/Library/lib/mysql -lmysqlclient

Directive   Local Value Master Value
mysql.allow_persistent  On  On
mysql.connect_timeout   60  60
mysql.default_host  no value    no value
mysql.default_password  no value    no value
mysql.default_port  no value    no value
mysql.default_socket    /Applications/MAMP/tmp/mysql/mysql.sock /Applications/MAMP/tmp/mysql/mysql.sock
mysql.default_user  no value    no value
mysql.max_links Unlimited   Unlimited
mysql.max_persistent    Unlimited   Unlimited
mysql.trace_mode    Off Off

mysqli

MysqlI Support  enabled
Client API library version  5.1.44
Client API header version   5.1.44
MYSQLI_SOCKET   /Applications/MAMP/tmp/mysql/mysql.sock

Directive   Local Value Master Value
mysqli.default_host no value    no value
mysqli.default_port 3306    3306
mysqli.default_pw   no value    no value
mysqli.default_socket   no value    no value
mysqli.default_user no value    no value
mysqli.max_links    Unlimited   Unlimited
mysqli.reconnect    Off Off

openssl

OpenSSL support enabled
OpenSSL Version OpenSSL 0.9.7i 14 Oct 2005

pcre

PCRE (Perl Compatible Regular Expressions) Support  enabled
PCRE Library Version    7.9 2009-04-11

Directive   Local Value Master Value
pcre.backtrack_limit    100000  100000
pcre.recursion_limit    100000  100000

PDO

PDO support enabled
PDO drivers sqlite, sqlite2, pgsql, mysql

pdo_mysql

PDO Driver for MySQL, client library version    5.1.44

pdo_pgsql

PDO Driver for PostgreSQL   enabled
PostgreSQL(libpq) Version   8.4.2
Module version  1.0.2
Revision     $Id: pdo_pgsql.c 293036 2010-01-03 09:23:27Z sebastian $

pdo_sqlite

PDO Driver for SQLite 3.x   enabled
PECL Module version (bundled) 1.0.1 $Id: pdo_sqlite.c 293036 2010-01-03 09:23:27Z sebastian $
SQLite Library  3.3.7

pgsql

PostgreSQL Support  enabled
PostgreSQL(libpq) Version   8.4.2
Multibyte character support enabled
SSL support enabled
Active Persistent Links 0
Active Links    0

Directive   Local Value Master Value
pgsql.allow_persistent  On  On
pgsql.auto_reset_persistent Off Off
pgsql.ignore_notice Off Off
pgsql.log_notice    Off Off
pgsql.max_links Unlimited   Unlimited
pgsql.max_persistent    Unlimited   Unlimited

posix

Revision    $Revision: 293036 $

Reflection

Reflection  enabled
Version $Id: php_reflection.c 293850 2010-01-22 14:21:17Z jani $

session

Session Support enabled
Registered save handlers    files user sqlite
Registered serializer handlers  php php_binary

Directive   Local Value Master Value
session.auto_start  Off Off
session.bug_compat_42   On  On
session.bug_compat_warn On  On
session.cache_expire    180 180
session.cache_limiter   nocache nocache
session.cookie_domain   no value    no value
session.cookie_httponly Off Off
session.cookie_lifetime 0   0
session.cookie_path /   /
session.cookie_secure   Off Off
session.entropy_file    no value    no value
session.entropy_length  0   0
session.gc_divisor  100 100
session.gc_maxlifetime  1440    1440
session.gc_probability  1   1
session.hash_bits_per_character 4   4
session.hash_function   0   0
session.name    PHPSESSID   PHPSESSID
session.referer_check   no value    no value
session.save_handler    files   files
session.save_path   /Applications/MAMP/tmp/php  /Applications/MAMP/tmp/php
session.serialize_handler   php php
session.use_cookies On  On
session.use_only_cookies    Off Off
session.use_trans_sid   0   0

SimpleXML

Simplexml support   enabled
Revision    $Revision: 293036 $
Schema support  enabled

soap

Soap Client enabled
Soap Server enabled

Directive   Local Value Master Value
soap.wsdl_cache 1   1
soap.wsdl_cache_dir /tmp    /tmp
soap.wsdl_cache_enabled 1   1
soap.wsdl_cache_limit   5   5
soap.wsdl_cache_ttl 86400   86400

sockets

Sockets Support enabled

SPL

SPL support enabled
Interfaces  Countable, OuterIterator, RecursiveIterator, SeekableIterator, SplObserver, SplSubject
Classes AppendIterator, ArrayIterator, ArrayObject, BadFunctionCallException, BadMethodCallException, CachingIterator, DirectoryIterator, DomainException, EmptyIterator, FilterIterator, InfiniteIterator, InvalidArgumentException, IteratorIterator, LengthException, LimitIterator, LogicException, NoRewindIterator, OutOfBoundsException, OutOfRangeException, OverflowException, ParentIterator, RangeException, RecursiveArrayIterator, RecursiveCachingIterator, RecursiveDirectoryIterator, RecursiveFilterIterator, RecursiveIteratorIterator, RecursiveRegexIterator, RegexIterator, RuntimeException, SimpleXMLIterator, SplFileInfo, SplFileObject, SplObjectStorage, SplTempFileObject, UnderflowException, UnexpectedValueException

SQLite

SQLite support  enabled
PECL Module version 2.0-dev $Id: sqlite.c 293036 2010-01-03 09:23:27Z sebastian $
SQLite Library  2.8.17
SQLite Encoding iso8859

Directive   Local Value Master Value
sqlite.assoc_case   0   0

standard

Regex Library   Bundled library enabled
Dynamic Library Support enabled
Path to sendmail    /usr/sbin/sendmail -t -i

Directive   Local Value Master Value
assert.active   1   1
assert.bail 0   0
assert.callback no value    no value
assert.quiet_eval   0   0
assert.warning  1   1
auto_detect_line_endings    0   0
default_socket_timeout  60  60
safe_mode_allowed_env_vars  PHP_    PHP_
safe_mode_protected_env_vars    LD_LIBRARY_PATH LD_LIBRARY_PATH
url_rewriter.tags   a=href,area=href,frame=src,input=src,form=,fieldset=    a=href,area=href,frame=src,input=src,form=,fieldset=
user_agent  no value    no value

tokenizer

Tokenizer Support   enabled

xdebug

xdebug support  enabled
Version 2.0.5

Supported protocols Revision
DBGp - Common DeBuGger Protocol $Revision: 1.125.2.6 $
GDB - GNU Debugger protocol $Revision: 1.87 $
PHP3 - PHP 3 Debugger protocol  $Revision: 1.22 $

Directive   Local Value Master Value
xdebug.auto_trace   Off Off
xdebug.collect_includes On  On
xdebug.collect_params   0   0
xdebug.collect_return   Off Off
xdebug.collect_vars Off Off
xdebug.default_enable   On  On
xdebug.dump.COOKIE  no value    no value
xdebug.dump.ENV no value    no value
xdebug.dump.FILES   no value    no value
xdebug.dump.GET no value    no value
xdebug.dump.POST    no value    no value
xdebug.dump.REQUEST no value    no value
xdebug.dump.SERVER  no value    no value
xdebug.dump.SESSION no value    no value
xdebug.dump_globals On  On
xdebug.dump_once    On  On
xdebug.dump_undefined   Off Off
xdebug.extended_info    On  On
xdebug.idekey   mikaelbortenheim    no value
xdebug.manual_url   http://www.php.net  http://www.php.net
xdebug.max_nesting_level    100 100
xdebug.profiler_aggregate   Off Off
xdebug.profiler_append  Off Off
xdebug.profiler_enable  Off Off
xdebug.profiler_enable_trigger  Off Off
xdebug.profiler_output_dir  /tmp    /tmp
xdebug.profiler_output_name cachegrind.out.%p   cachegrind.out.%p
xdebug.remote_autostart Off Off
xdebug.remote_enable    On  On
xdebug.remote_handler   dbgp    dbgp
xdebug.remote_host  localhost   localhost
xdebug.remote_log   no value    no value
xdebug.remote_mode  req req
xdebug.remote_port  9000    9000
xdebug.show_exception_trace Off Off
xdebug.show_local_vars  Off Off
xdebug.show_mem_delta   Off Off
xdebug.trace_format 0   0
xdebug.trace_options    0   0
xdebug.trace_output_dir /tmp    /tmp
xdebug.trace_output_name    trace.%c    trace.%c
xdebug.var_display_max_children 128 128
xdebug.var_display_max_data 512 512
xdebug.var_display_max_depth    3   3

xml

XML Support active
XML Namespace Support   active
libxml2 Version 2.7.6

xmlreader

XMLReader   enabled

xmlwriter

XMLWriter   enabled

xsl

XSL enabled
libxslt Version 1.1.26
libxslt compiled against libxml Version 2.7.6
EXSLT   enabled
libexslt Version    1.1.26

yaz

YAZ Support enabled
PHP/YAZ Version 1.0.14
YAZ Version 4.0.1
Compiled with YAZ version   4.0.1

zlib

ZLib Support    enabled
Stream Wrapper support  compress.zlib://
Stream Filter support   zlib.inflate, zlib.deflate
Compiled Version    1.2.3
Linked Version  1.2.3

Directive   Local Value Master Value
zlib.output_compression Off Off
zlib.output_compression_level   -1  -1
zlib.output_handler no value    no value

Additional Modules

Module Name
dbase

Environment

Variable    Value
SHELL   /bin/bash
TMPDIR  /var/folders/57/57ldIbUwEfapCAykVGuP-E+++TI/-Tmp-/
Apple_PubSub_Socket_Render  /tmp/launch-q1YyNj/Render
USER    mikaelbortenheim
COMMAND_MODE    legacy
SSH_AUTH_SOCK   /tmp/launch-h4iFnb/Listeners
__CF_USER_TEXT_ENCODING 0x1F5:0:0
PATH    /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/opt/local/bin:/usr/local/git/bin
PWD /
SHLVL   1
HOME    /Users/mikaelbortenheim
DYLD_LIBRARY_PATH   /Applications/MAMP/Library/lib:
PYTHONPATH  /Applications/Quick Search Box.app/Contents/Frameworks/Vermilion.framework/Resources
LOGNAME mikaelbortenheim
DISPLAY /tmp/launch-fxEJxI/org.x:0
SECURITYSESSIONID   308f98
_   /Applications/MAMP/Library/bin/httpd

PHP Variables

Variable    Value
_REQUEST["SQLiteManager_currentLangue"] 2
_COOKIE["SQLiteManager_currentLangue"]  2
_SERVER["HTTP_HOST"]    localhost:8888
_SERVER["HTTP_USER_AGENT"]  Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_5; en-us) AppleWebKit/533.18.1 (KHTML, like Gecko) Version/5.0.2 Safari/533.18.5
_SERVER["HTTP_ACCEPT"]  application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
_SERVER["HTTP_REFERER"] http://localhost:8888/MAMP/English/index.php?language=English
_SERVER["HTTP_ACCEPT_LANGUAGE"] en-us
_SERVER["HTTP_ACCEPT_ENCODING"] gzip, deflate
_SERVER["HTTP_COOKIE"]  SQLiteManager_currentLangue=2
_SERVER["HTTP_CONNECTION"]  keep-alive
_SERVER["PATH"] /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/opt/local/bin:/usr/local/git/bin
_SERVER["SERVER_SIGNATURE"] no value
_SERVER["SERVER_SOFTWARE"]  Apache
_SERVER["SERVER_NAME"]  localhost
_SERVER["SERVER_ADDR"]  ::1
_SERVER["SERVER_PORT"]  8888
_SERVER["REMOTE_HOST"]  localhost
_SERVER["REMOTE_ADDR"]  ::1
_SERVER["DOCUMENT_ROOT"]    /Users/mikaelbortenheim/Sites/PHP
_SERVER["SERVER_ADMIN"] you@example.com
_SERVER["SCRIPT_FILENAME"]  /Library/Application Support/appsolute/MAMP PRO/mamp/phpinfo.php
_SERVER["REMOTE_PORT"]  65402
_SERVER["GATEWAY_INTERFACE"]    CGI/1.1
_SERVER["SERVER_PROTOCOL"]  HTTP/1.1
_SERVER["REQUEST_METHOD"]   GET
_SERVER["QUERY_STRING"] no value
_SERVER["REQUEST_URI"]  /MAMP/phpinfo.php
_SERVER["SCRIPT_NAME"]  /MAMP/phpinfo.php
_SERVER["PHP_SELF"] /MAMP/phpinfo.php
_SERVER["REQUEST_TIME"] 1290244798
_SERVER["argv"] 
Array
(
)
_SERVER["argc"] 0
_ENV["SHELL"]   /bin/bash
_ENV["TMPDIR"]  /var/folders/57/57ldIbUwEfapCAykVGuP-E+++TI/-Tmp-/
_ENV["Apple_PubSub_Socket_Render"]  /tmp/launch-q1YyNj/Render
_ENV["USER"]    mikaelbortenheim
_ENV["COMMAND_MODE"]    legacy
_ENV["SSH_AUTH_SOCK"]   /tmp/launch-h4iFnb/Listeners
_ENV["__CF_USER_TEXT_ENCODING"] 0x1F5:0:0
_ENV["PATH"]    /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/opt/local/bin:/usr/local/git/bin
_ENV["PWD"] /
_ENV["SHLVL"]   1
_ENV["HOME"]    /Users/mikaelbortenheim
_ENV["DYLD_LIBRARY_PATH"]   /Applications/MAMP/Library/lib:
_ENV["PYTHONPATH"]  /Applications/Quick Search Box.app/Contents/Frameworks/Vermilion.framework/Resources
_ENV["LOGNAME"] mikaelbortenheim
_ENV["DISPLAY"] /tmp/launch-fxEJxI/org.x:0
_ENV["SECURITYSESSIONID"]   308f98
_ENV["_"]   /Applications/MAMP/Library/bin/httpd

PHP License

This program is free software; you can redistribute it and/or modify it under the terms of the PHP License as published by the PHP Group and included in the distribution in the file: LICENSE

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

If you did not receive a copy of the PHP license, or have any questions about PHP licensing, please contact license@php.net.

to help me with this do you need any more info? code_coverage works in the browser.

thanks


check if the referenced php in the phpunit script is the same as you use in console

which php (output could be: /usr/local/zend/bin/php)

vi /path/to/phpunit (first line could be. #!/usr/bin/php) (best: #!/usr/bin/env php)

if #!/usr/bin/env php isn't working try to set your MAMP php-bin by hand #!/Applications/MAMP/bin/php5/bin/php (< i'm not using MAMP so you have to check this)

Edit You could try this: Remove the sym-link from /usr/bin

change the phpunit back to #!/usr/bin/env php (check if its still executable)

export your MAMP php-bin path to $PATH

export PATH=/Applications/MAMP/bin/php5/bin:$PATH (please verify the path first)

which php should now point to /Applications/MAMP/bin/php5/bin/php

try to run phpunit --coverage-html ./report unit


Lets try to isolate the problem better: try running the following code:

<?php
var_dump(extension_loaded('xdebug'));

Whats the result?

The reason I'm asking is this piece of code in PHPUnit/TextUI/Command.php (version 3.4.15 of PHPUnit)

        case '--coverage-clover': {
            if (extension_loaded('tokenizer') &&
                extension_loaded('xdebug')) {
                $this->arguments['coverageClover'] = $option[1];
            } else {
                if (!extension_loaded('tokenizer')) {
                    $this->showMessage(
                      'The tokenizer extension is not loaded.'
                    );
                } else {
                    $this->showMessage(
                      'The Xdebug extension is not loaded.'
                    );
                }
            }
        }
        break;

And the fact that you get true if you try extension_loaded('xdebug') in a separate test script makes this a complete mystery to me. Why would the code work in separate script but not in PHPUnit?


After trying Anti Veeranna's answer and also checking what's sugested here, I was pretty sure that everything is set-up correcty at my dev machine.

I started debugging phpunit and after a while I got the impression that a faulty <filer> tag in my phpunit.xml.dist file is causing the problem. I simply removed the <filer> options and all permission denied and XDebug not found errors where gone.

So this is my checklist of you have prolems with phpunit and coverage:

  1. Try phpunit without any coverage options. If this works phpunit is set-up ok.
  2. If <?php var_dump(extension_loaded('xdebug')); is giving you bool(true), XDebug is set-up correctly.
  3. Remove (or fix) your <filer> tags from phpunit.xml.dist file.

Good Luck!

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号