所以我正在我客户的网站上工作,为了将Twitter帖子整合到网站中,我需要在PHP.ini中包含以下行:
allow_url_fopen = On;
所以现在我的PHP.ini看起来像这样:
; Rename this file to php.ini and uncomment or add directives.
; For a complete list of valid directives, visit:
; http://us2.php.net/manual/en/ini.php
[PHP]
; We highly recommend that you leave this options enabled
cgi.fix_pathinfo=1
; Increase maximum post size
;post_max_size = 20M
; Increase execution time
;max_execution_time = 300
; pull in EGPCS [Environment, GET, POST, Cookie, Server] variables as globals
;register_globals = true
; For performance reasons, (mt) does not load all of the modules that are available
; into PHP. You may uncomment any one of the following "extension" lines to enable
; the desired module
; Salblotron XSLT
;extension=xslt.so
; save in local tmp
session.save_path=/home/65994/data/tmp
allow_url_fopen = On;
upload_max_filesize = 20M
出于某种原因,它可以工作......但只有大约15分钟左右才能断开并出现错误。
然而,如果我把这条线添加到php.ini并移动它...并重新保存,它会再次起作用......
... ODD
有谁知道为什么或如何解决这个问题?
答案 0 :(得分:0)
default_socket_timeout
更长的选项http://php.net/manual/en/filesystem.configuration.php
顺便说一句,如果你用Twitter OAuth切换到cURL而不是直接打开url,你可能会为自己省去一些悲伤。