PHP意外死亡而没有错误

时间:2013-05-07 00:38:19

标签: php

有人能指出我可以强加给PHP的所有不同内存/时间/ [无论]限制的列表吗?简而言之,Apache仅在实例化具有特定参数的对象时给出-103 (ERR_CONNECTION_ABORTED)错误。我首先在Rackspace的Cloud Sites平台上体验了这一点,然后在我的本地Windows机器上体验了这一点。我还没有看到这个问题出现在Rackspace的一个CentOS云服务器上。

其他细节:

  • 请求在它死亡前持续约4秒钟。
  • 在请求期间,httpd进程的内存使用量从~15M跳到~30M。
  • ini_get('memory_limit')返回264M。
  • ini_get('max_execution_time')返回60。
  • PHP版本为5.4.7。
  • Apache版本是2.4.3。
  • 底层PHP应用程序是Lemonstand

基本上,我正在创建一个继承自Shop_CustomerGroup的{​​{1}}类的新实例。当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... } 传递给对象的构造函数,否则我确信我遇到了某种限制。我只是不知道那个限制可能是什么。

任何帮助表示赞赏!谢谢!

更新1:

请求网址

$this

请求标题

https://[DOMAIN_NAME]/checkout/new_account

Apache配置

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

更新2:

XAMPP \ apache的\日志\ error.log中

  • [Mon May 06 18:44:49.119268 2013] [ssl:warn] [pid 8820:tid 396] AH01873:初始化:未配置会话缓存[提示:SSLSessionCache]
  • [Mon May 06 18:44:49.159268 2013] [mpm_winnt:notice] [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:notice] [pid 8820:tid 396] AH00456:服务器内置:2012年8月18日12:41:37
  • [Mon May 06 18:44:49.159268 2013] [core:notice] [pid 8820:tid 396] AH00094:命令行:'C:\ xampp \ apache \ bin \ httpd.exe -d C:/ xampp /阿帕奇'
  • [Mon May 06 18:44:49.160268 2013] [mpm_winnt:notice] [pid 8820:tid 396] AH00418:父母:创建子进程15352
  • [Mon May 06 18:44:50.017268 2013] [ssl:warn] [pid 15352:tid 272] AH01873:Init:未配置会话缓存[提示:SSLSessionCache]
  • [Mon May 06 18:44:50.057268 2013] [mpm_winnt:notice] [pid 15352:tid 272] AH00354:Child:启动150个工作线程。
  • [Mon May 06 18:45:43.777268 2013] [mpm_winnt:notice] [pid 8820:tid 396] AH00428:父:子进程退出,状态为255 - 重新启动。
  • [Mon May 06 18:45:44.1542682013] [ssl:warn] [pid 8820:tid 396] AH01873:初始化:未配置会话缓存[提示:SSLSessionCache]
  • [Mon May 06 18:45:44.193268 2013] [mpm_winnt:notice] [pid 8820:tid 396] AH00455:Apache / 2.4.3(Win32)OpenSSL / 1.0.1c配置PHP / 5.4.7 - 恢复正常运营
  • [Mon May 06 18:45:44.193268 2013] [mpm_winnt:notice] [pid 8820:tid 396] AH00456:服务器内置:2012年8月18日12:41:37
  • [Mon May 06 18:45:44.193268 2013] [core:notice] [pid 8820:tid 396] AH00094:命令行:'C:\ xampp \ apache \ bin \ httpd.exe -d C:/ xampp /阿帕奇'
  • [Mon May 06 18:45:44.194268 2013] [mpm_winnt:notice] [pid 8820:tid 396] AH00418:父母:创建子进程12524
  • [Mon May 06 18:45:45.018268 2013] [ssl:warn] [pid 12524:tid 272] AH01873:初始化:未配置会话缓存[提示:SSLSessionCache]
  • [Mon May 06 18:45:45.056268 2013] [mpm_winnt:notice] [pid 12524:tid 272] AH00354:孩子:开始150个工作线程。

XAMPP \ apache的\日志[DOMAIN_NAME] -ssl-error.log中

  • [Mon May 06 18:44:48.777268 2013] [ssl:warn] [pid 8820:tid 396] AH01906:RSA服务器证书是CA证书(BasicConstraints:CA == TRUE!?)
  • [Mon May 06 18:44:49.119268 2013] [ssl:warn] [pid 8820:tid 396] AH01906:RSA服务器证书是CA证书(BasicConstraints:CA == TRUE!?)
  • [Mon May 06 18:44:49.683268 2013] [ssl:warn] [pid 15352:tid 272] AH01906:RSA服务器证书是CA证书(BasicConstraints:CA == TRUE!?)
  • [Mon May 06 18:44:50.018268 2013] [ssl:warn] [pid 15352:tid 272] AH01906:RSA服务器证书是CA证书(BasicConstraints:CA == TRUE!?)
  • [Mon May 06 18:45:44.1542682013] [ssl:warn] [pid 8820:tid 396] AH01906:RSA服务器证书是CA证书(BasicConstraints:CA == TRUE!?)
  • [Mon May 06 18:45:44.680268 2013] [ssl:warn] [pid 12524:tid 272] AH01906:RSA服务器证书是CA证书(BasicConstraints:CA == TRUE!?)
  • [Mon May 06 18:45:45.018268 2013] [ssl:warn] [pid 12524:tid 272] AH01906:RSA服务器证书是CA证书(BasicConstraints:CA == TRUE!?)
事件查看器中

更新3 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>

1 个答案:

答案 0 :(得分:0)

您应该确保您的文件是UTF-8而没有BOM ...