易截截图软件、单文件、免安装、纯绿色、仅160KB

PHP调用存储过程超时解决方法


最近工作中遇到一个头疼的问题:php中调用一个存储过程(要复制N多数据的.),由于此过程执行时间很长.导致php总是超时错误:
Service Temporarily Unavailable
The
server is temporarily unable to service your request due to maintenance downtime
or capacity problems
.
Please
try
again
later
.
问题折腾了好久,一直没找到原因.分别是:
php开头加上:  set_time_limit(0);
不管用.
php.ini中设置timeout的时间:
  session.cookie_lifetime = 0
  session.gc_maxlifetime =
3440
  pfpro.defaulttimeout = 3600 
  max_execution_time =
3600
  max_input_time = 3600 ;
还是不管用.
设置mysql的配置文件my.ini:
  connect_timeout=3600
  wait_timeout=2880000
  interactive_timeout
= 2880000 
  max_allowed_packet = 10M
还是还是不管用.
Apache中设置httpd.conf 超时:
 #Timeout:
Sec.
  Timeout 360000
  #KeepAlive: Off | On
  KeepAlive
On
  #MaxKeepAliveRequests:
  MaxKeepAliveRequests
0
  #KeepAliveTimeout:
  KeepAliveTimeout 600
继续不管用.晕死了...
今天继续找原因.哈哈哈哈.竟然在C:\Program
Files\Zend\ZendServer\etc\ZendEnablerConf.xml
中找到一个timeout属性.<Timeouts ConnectionTimeout='60' requestTimeout='120'
/>
难道是这个原因??120改成1200
.测试....成功!!!!
反正以上设置我不知道是否必须.反正这个设置必须的.呵呵呵.写在这里备忘,希望对找到这的人也有帮助



相关文档:

php表达式之explode() 分割字符串

原帖地址:http://www.phpma.com/english/20071215/640.html
Description
array explode
( string separator, string string [, int limit])phpma.com
Returns an array of strings, each of which is a substring of string
formed by splitting it on boundaries formed by the string separator
. If limit
is ......

PHP函数__autoload()和spl_autoload_register()

__autoload($classname){
}
当PHP找不到类文件会调用这个方法,当注册了自己的函数或方法时,PHP不会调用__autoload()函数,而会调用自定义的函数
spl_autoload_register('func_name');
spl_autoload_register(array('class_name','method_name')); ......

PHP截取固定长度字符串函数

<?php   
  
function toFixLen($str,$len){ //固定长度字符串的截取   
  
    if($len>=strlen($str)||!$len) return $str;   
  
    $len-=3;   
  
  ......

用PHP的DOM控件来创建XML输出

/*
用PHP的DOM控件来创建XML输出
设置输出内容的类型为xml
*/
header('Content-Type: text/xml;');
//创建新的xml文件
$dom = new DOMDocument('1.0', 'utf-8');
//建立<response>元素
$response = $dom->createElement('response');
$dom->appendChild($response);
//建立<books>元素并将其作 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号