我有 php 5.3.6 和 ubuntu。我想安装APC。
当我这样做时$ pecl install apc,我最终得到一个错误:
In file included from /tmp/pear/temp/APC/apc.c:44:0:
/usr/include/php5/ext/pcre/php_pcre.h:29:18: fatal error: pcre.h: No such file or directory
compilation terminated.
make: *** [apc.lo] Error 1
ERROR: `make' failed
Run Code Online (Sandbox Code Playgroud)
当我尝试做$ yum install php-pecl-apc我总是得到错误:No package "php-pecl-apc" available
我尝试做 a $ yum clean all,但没有任何区别。
我不知道如何继续。你有什么建议?
我得到了很多这样的:
[NOTICE] child 19214 stopped for tracing
[NOTICE] about to trace 19214
[ERROR] ptrace(PEEKDATA) failed: Input/output error (5)
[NOTICE] finished trace of 19214
[WARNING] [pool www] child 19208, script 'blahblah.php' executing too slow (30.041419 sec), logging
[NOTICE] child 19208 stopped for tracing
[NOTICE] about to trace 19208
[ERROR] ptrace(PEEKDATA) failed: Input/output error (5)
[NOTICE] finished trace of 19208
[WARNING] [pool www] child 19218, script 'blahblah.php' executing too slow (30.035029 sec), logging
Run Code Online (Sandbox Code Playgroud)
当 php 达到最大孩子数(至少我认为是这种情况)时,它会停止“工作”......现在我知道我可以增加 max_children(目前设置为 9)但是有一种方法可以阻止 php 的“死亡”?
我使用的是具有 1 …
我在安装php-fpm与apache2-mpm-worker. Ť他是导向,我以下。
根据指南的第 5 步,
Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi
FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -host 127.0.0.1:9000 -pass-header Authorization
Run Code Online (Sandbox Code Playgroud)
但是我php5-fcgi在/usr/lib,但只有/usr/bin/php5-cgiand找不到,/usr/bin/php-cgi我不确定它们是否相同。
所以我将步骤 5 中的行更改为:
Alias /php5-fcgi /usr/bin/php5-fcgi
FastCgiExternalServer /usr/bin/php5-fcgi -host 127.0.0.1:9000 -pass-header
Run Code Online (Sandbox Code Playgroud)
在重新启动 Apache 时,它的日志给出了错误:
[notice] caught SIGTERM, shutting down
[alert] (4)Interrupted system call: FastCGI: read() from pipe failed (0)
[alert] (4)Interrupted system call: FastCGI: the PM is shutting down, Apache seems to have disappeared - bye
[notice] Apache/2.2.22 (Ubuntu) mod_fastcgi/mod_fastcgi-SNAP-0910052141 configured …Run Code Online (Sandbox Code Playgroud) 这是两个不同的 php 文件的故事。
文件 1 来源:
<?php $null->test();
Run Code Online (Sandbox Code Playgroud)
文件 1 输出:
致命错误:
在第 1 行的 /wwwroot/sites/example.com/public/fatal.php 中的非对象上调用成员函数 test()
这也打印到 /var/log/php-fpm/www-error.log (如我的 www.conf 中所定义)
文件2:
class A {}
function test(A $obj) {
echo 'here...';
}
var_dump('started');
$a = new A();
test($a);
var_dump('this is going to error out');
test($null);
var_dump('do we get here?');
Run Code Online (Sandbox Code Playgroud)
文件 2 输出:
字符串 'started' (length=7)
here...
string 'this is going to error out' (length=26)
没有错误记录。
/etc/php-fpm.d/www.conf 中的相关设置:
catch_workers_output = yesphp_flag[display_errors] = on
php_flag[display_startup_errors] = on
php_admin_value[error_reporting] = 1 …
我真的需要在 Ubuntu 12.04 上完全清除我的 Web 服务器。我已经尝试过sudo apt-get purge apache2 php5 libapache2-mod-php5 mysql-server libapache2-mod-auth-mysql php5-mysql phpmyadmin(希望可以删除所有这些)。我如何彻底清除所有这些?
这是错误消息:
cc: internal compiler error: Killed (program cc1)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.6/README.Bugs> for instructions.
make: *** [ext/fileinfo/libmagic/apprentice.lo] Error 1
Run Code Online (Sandbox Code Playgroud)
make 处理的最后一件事是 apprentice.lo,它似乎是图像处理库的一部分(也许?)。我正在使用 Ansible 来配置我的实例。它是一个 Digital Ocean 单核 512MB 虚拟机。
我一直在使用 vagrant / ansible 在本地为 dev 使用相同的配置,并且编译良好,这是我尝试配置的第一个云 VM。唯一的区别是我的 DO 服务器的基本映像来自 DO,对于我的本地开发人员,我通过 VirtualBox 从一个库存的 CentOS 基本服务器安装构建了我自己的 Vagrant 框。我把它从我的 DropBox 中拉下来。
该问题已被其他人遇到并报告为php错误报告
我的 php ansible 角色直到错误:
---
- name: Download php source
get_url: url={{ php_source_url }} dest=/tmp
register: get_url_result
- name: untar the …Run Code Online (Sandbox Code Playgroud) 我有一台运行 Fedora Core 5 的 Web 服务器(是的,我知道它很旧)并且它运行的是 PHP 5.1.6,所以我下载并编译了 5.2.9 的源代码并重新启动了服务器,phpinfo() 仍然返回 5.1.6 .
$ which php
/usr/local/bin/php
Run Code Online (Sandbox Code Playgroud)
但是当我在这个 PHP 安装上进行版本切换时,我得到了
$ /usr/local/bin/php -v
PHP 5.2.9 (cli) (built: May 26 2009 10:17:42)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
Run Code Online (Sandbox Code Playgroud)
我可能遗漏了什么,或者我该如何纠正?
php-cgi 似乎在 PHP 5.3.1 中消失了。我已经尝试了 ./configure 的 --enable-cgi 和 --disable-cli 标志,但它没有在 sapi/cgi 子目录下创建二进制文件。
我说的是所有流量,包括完整的传入和传出 HTTP 请求和响应。
我正在使用最新的 Ubuntu、Apache2 和 PHP,并且需要标题和页面数据——整个九码。
我知道 mod_dumpio,但我只是以这种方式记录标题,而不是其他数据,例如任何 POSTed XML。可能有一些我遗漏的配置吗?
真诚感谢任何帮助!
第一次海报 - 长期读者和学习者。
已经尝试了 2 周来在 Debian 5 (lenny) 机器上解决一个搞砸了的 PHP5.3 安装,但徒劳无功。每次我尝试 apt-get install php5-cli 时,我都会收到大量未满足的依赖项,我真的不知道从哪里开始,也不知道如何重新开始。
这是我未满足的依赖项列表:
Reading package lists... Done
Building dependency tree
Rlibc6 is already the newest version.
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following …Run Code Online (Sandbox Code Playgroud) php5 ×10
apache-2.2 ×4
php ×3
php-fpm ×3
installation ×2
ubuntu ×2
ansible ×1
centos6 ×1
cgi ×1
debian ×1
debian-lenny ×1
fastcgi ×1
fedora ×1
linux ×1
logging ×1
make ×1
mysql ×1
nginx ×1
pecl ×1
ubuntu-10.04 ×1