有人能给我一份PHP可以施加的所有不同内存/时间/[whatst]限制的列表吗?简而言之,Apache在仅仅实例化具有特定参数的对象时就给了我一个-103 (ERR_CONNECTION_ABORTED)
错误。我首先在Rackspace的云站点平台上体验到了这一点,然后在我的本地Windows盒子上体验到。我还没有看到这个问题出现在Rackspace的一个Centospace云服务器上。
其他详细信息:
- 该请求持续了大约4秒后就终止了
- 在请求过程中,httpd进程的内存使用量从约15M跳到约30M
- CCD_ 2返回264M
- CCD_ 3返回60
- PHP版本为5.4.7
- Apache版本为2.4.3
- PHP应用程序的底层是Lemonstand
基本上,我正在创建Shop_CustomerGroup
类的一个新实例,它继承自Db_ActiveRecord
。当Db_ActiveRecord
的构造函数尝试创建Phpr_Validation
的新实例时,代码将失效。
<?php
class Db_ActiveRecord extends Db_SqlBase implements IteratorAggregate
{
// More code...
public function __construct($values = null, $options = array())
{
$this->modelState = self::stateCreating;
$this->model_options = $options;
$this->implement = Phpr_Util::splat($this->implement, true);
array_unshift($this->implement, 'Phpr_Events');
parent::__construct();
$this->initialize();
self::$object_counter++;
$this->objectId = 'ac_obj_'.self::$object_counter;
if (!$this->get_model_option('no_validation'))
{
if (!empty($options['test'])) {
// If I pass in `null`, 'foo' gets thrown. But if I pass in `$this`, the script appears to die.
$this->validation = new Phpr_Validation($this, 'test');
} else {
$this->validation = new Phpr_Validation($this);
}
$this->validation->focusPrefix = get_class($this)."_";
}
// Fill with data
if ($values !== null)
{
$this->fill($values);
$this->fill_relations($values);
}
$this->modelState = self::stateCreated;
}
// More code...
}
class Phpr_Validation
{
// More code...
public function __construct( $Owner = null, $FormId = 'FormElement' )
{
if ($FormId == 'test')
throw new Phpr_ApplicationException('foo');
$this->_owner = $Owner;
$this->_formId = $FormId;
$this->_fields = array();
$this->errorFields = array();
$this->valid = false;
$this->errorMessage = null;
$this->fieldErrors = array();
$this->fieldValues = array();
}
// More code...
}
除非将$this
传递到对象的构造函数中有什么特别之处,否则我确信我会遇到某种限制。我只是不知道这个限制是多少。
感谢您的帮助!谢谢
更新1:
请求URL:
https://[DOMAIN_NAME]/checkout/new_account
请求标头
POST https://[DOMAIN_NAME]/checkout/new_account HTTP/1.1
Pragma: no-cache
Origin: [DOMAIN_NAME]
PHPR-EVENT-HANDLER: ev{onHandleRequest}
Cache-Control: no-cache
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.64 Safari/537.31
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Accept: */*
PHPR-POSTBACK: 1
Referer: https://[DOMAIN_NAME]/checkout/new_account
X-Requested-With: XMLHttpRequest
PHPR-REMOTE-EVENT: 1
Apache配置
<VirtualHost [IP_ADDRESS]:443>
ServerAdmin postmaster@[DOMAIN_NAME]
DocumentRoot "[PATH...]"
ServerName [DOMAIN_NAME]
SSLEngine on
SSLCertificateFile "conf/ssl.crt/[DOMAIN_NAME].crt"
SSLCertificateKeyFile "conf/ssl.key/[DOMAIN_NAME].key"
<Directory "[PATH...]">
AllowOverride All
Order allow,deny
Allow from all
</Directory>
ErrorLog "logs/[DOMAIN_NAME]-ssl-error.log"
</VirtualHost>
更新2:
examplep''apache''logs''error.log
- 〔2013年5月6日星期一18:44:49.119268〕〔ssl:warn〕〔pid 8820:tid 396〕AH01873:初始化:未配置会话缓存〔提示:SSLSessionCache〕
- 〔2013年5月6日星期一18:44:49.159268〕〔mpm_winnt:通知〕〔pid 8820:tid 396〕AH00455:Apache/2.4.3(Win32(OpenSSL/1.0.1c PHP/5.4.7配置-恢复正常操作
- 〔Mon May 06 18:44:49.159268 2013〕〔mpm_winnt:通知〕〔pid 8820:tid 396〕AH00456:服务器构建时间:2012年8月18日12:41:37
- 〔2013年5月6日星期一18:44:49.159268〕〔核心:通知〕〔pid 8820:tid 396〕AH00094:命令行:'C:''examplep''apache''bin''httpd.exe-d C:''examplep/apache'
- 【2013年5月6日星期一18:44:49.160268】【mpm_winnt:通知】【pid 8820:tid 396】AH00418:父进程:已创建子进程15352
- [2013年5月6日星期一18:44:50/17268][ssl:warn][pid 15352:tid 272]AH01873:初始化:未配置会话缓存[提示:SSLSessionCache]
- [mpm_vinnt:notice][pid 15352:tid 272]AH00354:Child:启动150个工作线程
- 〔2013年5月6日星期一18:45:43.77268〕〔mpm_winnt:通知〕〔pid 8820:tid 396〕AH00428:父进程:子进程已退出,状态为255--正在重新启动
- [2013年5月6日星期一18:45:44.154268][ssl:warn][pid 8820:tid 396]AH01873:初始化:未配置会话缓存[提示:SSLSessionCache]
- [mpm_vinnt:notice][pid 8820:tid 396]AH00455:AApache/2.4.3(Win32(OpenSSL/1.0.1c PHP/5.4.7配置--恢复正常操作
- 〔Mon May 06 18:45:44.193268 2013〕〔mpm_winnt:通知〕〔pid 8820:tid 396〕AH00456:服务器构建时间:2012年8月18日12:41:37
- [2013年5月6日星期一18:45:44.193268][核心:通知][pid 8820:tid 396]AH00094:命令行:'C:''xamp''apache''bin''httpd.exe-d C:''xamp/apache'
- 【2013年5月6日星期一18:45:44.194268】【mpm_winnt:通知】【pid 8820:tid 396】AH00418:父进程:已创建子进程12524
- 〔2013年5月6日星期一18:45:45.018268〕〔ssl:warn〕〔pid 12524:tid 272〕AH01873:初始化:未配置会话缓存〔提示:SSLSessionCache〕
- 【2013年5月6日星期一18:45:45.056268】【mpm_winnt:notification】【pid 12524:tid 272】AH00354:Child:启动150个工作线程
examplep''apache''logs[DOMAIN_NAME]-ssl错误.log
- [ssl:warn][pid 8820:tid 396]AH01906:RSA服务器证书是CA证书(BasicConstraints:CA==TRUE!?(
- [ssl:warn][pid 8820:tid 396]AH01906:RSA服务器证书是CA证书(BasicConstraints:CA==TRUE!?(
- [ssl:warn][pid 15352:tid 272]AH01906:RSA服务器证书是CA证书(BasicConstraints:CA==TRUE!?(
- [ssl:warn][pid 15352:tid 272]AH01906:RSA服务器证书是CA证书(BasicConstraints:CA==TRUE!?(
- [ssl:warn][pid 8820:tid 396]AH01906:RSA服务器证书是CA证书(BasicConstraints:CA==TRUE!?(
- [ssl:warn][pid 12524:tid 272]AH01906:RSA服务器证书是CA证书(BasicConstraints:CA==TRUE!?(
- [ssl:warn][pid 12524:tid 272]AH01906:RSA服务器证书是CA证书(BasicConstraints:CA==TRUE!?(
更新3事件查看器中的Apache错误
Faulting application name: httpd.exe, version: 2.4.3.0, time stamp: 0x502f70a3
Faulting module name: php5ts.dll, version: 5.4.7.0, time stamp: 0x505114f8
Exception code: 0xc0000005
Fault offset: 0x0005d719
Faulting process id: 0x24f8
Faulting application start time: 0x01ce4b5683b7a39a
Faulting application path: C:'xampp'apache'bin'httpd.exe
Faulting module path: C:'xampp'php'php5ts.dll
Report Id: f646e88a-b749-11e2-9017-005056c00008
您应该确保您的文件是UTF-8,没有BOM。。。