我不得不按照这些指示去除并重新安装更新版本的PHPUnit .现在我正在推出这条线
sudo pear install --alldeps phpunit/PHPUnit
Run Code Online (Sandbox Code Playgroud)
我看到一条错误消息,看起来像这样.
Unknown remote channel: pear.symfony.com
phpunit/PHPUnit requires package "channel://pear.symfony.com/Yaml" (version >= 2.1.0)
No valid packages found
Run Code Online (Sandbox Code Playgroud)
如果我通过启动安装Yaml
sudo pear install symfony/YAML
Run Code Online (Sandbox Code Playgroud)
将安装不符合PHPUnit依赖性的旧版本(1.0.6).我怎么可能解决这个问题?
我的操作系统是Windows 7.我在计算机上安装了WAMP2.2.然后我尝试安装PEAR
.但是,我无法go-pear.bat
在我的wamp目录中找到我的文件.精细.我在这里下载: http://pear.php.net/go-pear.phar
并使用此文件安装.我把文件放进去了
C:/wamp/bin/php/php5.3.8/pear/go-pear.phar
Run Code Online (Sandbox Code Playgroud)
运行命令:php -d phar.require_hash=0 PEAR/go-pear.phar
安装完成后,我php.ini
在php和apache文件夹中包含pear的路径.我还包括C:/wamp/bin/php/php5.3.8/
在windows $PATH
变量中.但是当我运行pear命令时.它说它找不到梨命令.我检查文件夹,找到一个名为pear.bat
和的文件pear.ini
.我试图pear.bat
在命令行中再次运行.它仍然无法正常工作.专家,请帮忙解决这个问题.
我正在尝试安装PHP Zip扩展.
我的服务器没有外部互联网访问权限,所以我自己从PECL下载了它:http://pecl.php.net/package/zip.我选择1.10.2,最新的"稳定"版本,并将其转移到我的服务器.
我跑了:
pear install zip-1.10.2.tgz
Run Code Online (Sandbox Code Playgroud)
并补充说
extension=zip.so
Run Code Online (Sandbox Code Playgroud)
按照指示到php.ini.我可以看到zip.so已创建并放在右侧extension_dir文件夹中.我重新启动了apache然后检查它是否通过运行加载:
php -m
Run Code Online (Sandbox Code Playgroud)
尽管如此,"zip"仍然不在该列表中.
我错过了一步还是做错了什么?我觉得这应该很简单,我开始觉得很傻,哈哈.
其他可能重要的东西:
CentOS Apache 2.2.3 PHP 5.2.16
我正在尝试邮寄梨包.它成功发送了一封电子邮件但是给我以下错误:
Strict Standards: Non-static method Mail::factory() should not be called statically, assuming $this from incompatible context in C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\ClientPortal\classes\SupportTickets.php on line 356
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in C:\PHP\PEAR\Mail\smtp.php on line 365
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in C:\PHP\PEAR\Net\SMTP.php on line 386
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context …
Run Code Online (Sandbox Code Playgroud) 最初我使用以下内容但没有成功;
export http_proxy=http://username@password:host:port
Run Code Online (Sandbox Code Playgroud)
值得注意的是,我没有直接得到连接错误;
[root@pal ~]# sudo pear info PHP_CodeSniffer-1.2.1
No information found for `PHP_CodeSniffer-1.2.1'
Run Code Online (Sandbox Code Playgroud) 我一直在使用jenkins的PHP_CodeSniffer,我的build.xml是为phpcs配置的,如下所示
<target name="phpcs">
<exec executable="phpcs">
<arg line="--report=checkstyle --report-file=${basedir}/build/logs/checkstyle.xml --standard=Zend ${source}"/>
</exec>
</target>
Run Code Online (Sandbox Code Playgroud)
我想忽略以下警告
FOUND 0 ERROR(S) AND 1 WARNING(S) AFFECTING 1 LINE(S)
--------------------------------------------------------------------------------
117 | WARNING | Line exceeds 80 characters; contains 85 characters
--------------------------------------------------------------------------------
Run Code Online (Sandbox Code Playgroud)
我怎么能忽略行长警告?
我正在运行命令行PHP作业,导致分段错误.这项工作已经工作了很长时间,但它会处理通过电子邮件发送的内容.显然,这封电子邮件中有些内容可以解决,但我不知道是什么.如果我把核心文件放在gdb中,那真的没有用:
$ gdb /usr/local/bin/php core.20381
GNU gdb (GDB) 7.1-ubuntu
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/local/bin/php...done.
[New Thread 20381]
warning: Can't read pathname for …
Run Code Online (Sandbox Code Playgroud) 我正在尝试启动PHPUnit并运行以下是我目前正在遵循的步骤:
### Install new PEAR Version needed for PHPUnit 3.X
### Download: http://pear.php.net/go-pear.phar Save it under C:\xampp\php
Open a command prompt and go to C:\xampp\php
Type "php go-pear.phar" (Installs new PEAR)
Type "pear update-channels" (updates channel definitions)
Type "pear upgrade --alldeps" (upgrades all existing packages and pear)
Type "pear channel-discover components.ez.no" (this is needed for PHPUnit)
Type "pear channel-discover pear.symfony-project.com" (also needed by PHPUnit)
Type "pear channel-discover pear.phpunit.de" (This IS phpunit)
Type "pear install --alldeps phpunit/PHPUnit" (installs PHPUnit and all …
Run Code Online (Sandbox Code Playgroud) 当我跑:
peardev install phpunit/PHPUnit
Run Code Online (Sandbox Code Playgroud)
我得到以下内容:
No releases available for package "pear.phpunit.de/PHPUnit"
install failed
Run Code Online (Sandbox Code Playgroud)
我运行了以下内容:
pear channel-discover pear.phpunit.de
Channel "pear.phpunit.de" is already initialized
Run Code Online (Sandbox Code Playgroud)
和
pear install --alldeps phpunit/PHPUnit
No releases available for package "pear.phpunit.de/PHPUnit"
install failed
Run Code Online (Sandbox Code Playgroud)
和
pear remote-list -c phpunit
CHANNEL PHPUNIT AVAILABLE PACKAGES:
===================================
PACKAGE VERSION
DbUnit 1.0.2
File_Iterator 1.2.6
Object_Freezer 1.0.0
PHPUnit 3.5.14
PHPUnit_MockObject 1.0.9
PHPUnit_Selenium 1.0.3
PHP_CodeBrowser 1.0.0
PHP_CodeCoverage 1.0.4
PHP_Timer 1.0.0
PHP_TokenStream 1.0.1
Text_Template 1.1.0
bytekit 1.1.1
phpUnderControl 0.5.0
phpcpd 1.3.2
phpdcd 0.9.2
phploc 1.6.1
ppw …
Run Code Online (Sandbox Code Playgroud) pear ×10
php ×10
phpunit ×3
centos ×1
codesniffer ×1
composer-php ×1
email ×1
installation ×1
jenkins ×1
mail-queue ×1
package ×1
proxy ×1
symfony1 ×1
wamp ×1
windows-7 ×1
yaml ×1
zip ×1