PHP意外死亡,没有错误
有人能给我指一下PHP可以施加的所有不同内存/时间/[任何]限制的列表吗?简而言之,Apache在仅实例化具有特定参数的对象时会给我一个PHP意外死亡,没有错误,php,Php,有人能给我指一下PHP可以施加的所有不同内存/时间/[任何]限制的列表吗?简而言之,Apache在仅实例化具有特定参数的对象时会给我一个-103(ERR\u CONNECTION\u ABORTED)错误。我首先在Rackspace的云站点平台上体验到了这一点,然后在我的本地Windows box上体验到了这一点。我还没有看到Rackspace的CentOS云服务器出现问题 其他详情: 请求持续约4秒后消失 在请求过程中,httpd进程的内存使用量从~15M跃升到~30M ini\u get(
-103(ERR\u CONNECTION\u ABORTED)
错误。我首先在Rackspace的云站点平台上体验到了这一点,然后在我的本地Windows box上体验到了这一点。我还没有看到Rackspace的CentOS云服务器出现问题
其他详情:
- 请求持续约4秒后消失
- 在请求过程中,httpd进程的内存使用量从~15M跃升到~30M
返回264Mini\u get('memory\u limit')
return 60ini\u get('max\u execution\u time')
- PHP版本是5.4.7
- Apache版本是2.4.3
- 底层PHP应用程序是
Db\u ActiveRecord
继承的Shop\u CustomerGroup
类的新实例。当Db\u ActiveRecord
的构造函数尝试创建Phpr\u验证的新实例时,代码将终止
<?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...
}
请求标题
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>
您应该确保您的文件是UTF-8,没有BOM…设置和逐步执行可能会给您一些有用的见解。@Itaymav Malimovka我没有看到任何Apache或PHP错误。我用请求详细信息和虚拟主机配置条目更新了我的原始帖子,如果有帮助的话。@FabianTamp谢谢,我明天会试一试。你启用了吗?可能是display\u errors
没有及时发现问题。@Niels是的,应该启用错误日志记录ini_-get('error_-reporting')
返回32767(与E_-ALL
相同),ini_-get('display_-errors')
返回1,ini_-get('log_-errors')
也返回1。
<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>
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