小编Hay*_*ate的帖子

postgres日志文件中的"元组(0,79)"是什么意思发生了死锁?

在postgres日志中:

2016-12-23 15:28:14 +07 [17281-351 trns: 4280939, vtrns: 3/20] postgres@deadlocks HINT:  See server log for query details.
2016-12-23 15:28:14 +07 [17281-352 trns: 4280939, vtrns: 3/20] postgres@deadlocks CONTEXT:  while locking tuple (0,79) in relation "account"
2016-12-23 15:28:14 +07 [17281-353 trns: 4280939, vtrns: 3/20] postgres@deadlocks STATEMENT:  SELECT id FROM account where id=$1 for update;
Run Code Online (Sandbox Code Playgroud)

当我挑起僵局时,我可以看到文字:tuple (0,79).

据我所知,元组只是表中的几行.但我不明白是什么(0,79)意思.我在表帐户中只有2行,它只是游戏和自学应用程序.

(0,79)意味着什么呢?

postgresql deadlock database-deadlocks

10
推荐指数
1
解决办法
3181
查看次数

在centos 6.4上使用xdebug进行远程调试

我尝试用phpstorm远程调试php应用程序.我在vmware虚拟机上使用centos 6.4,php5.3和apache 2.2,在真正的ubuntu上使用firefox的phpstorm.xdebug真正安装:

Installed Packages
Name        : php-pecl-xdebug
Arch        : i686
Version     : 2.1.4
Release     : 1.el6
Size        : 580 k
Repo        : installed
From repo   : epel
Summary     : PECL package for debugging PHP scripts
URL         : http://pecl.php.net/package/xdebug
License     : PHP
Run Code Online (Sandbox Code Playgroud)

phpinfo也证实了这一点:

This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
    with Xdebug v2.1.4, Copyright (c) 2002-2012, by Derick Rethans
Run Code Online (Sandbox Code Playgroud)

当我通过ssh从控制台运行脚本(简单的hello world)时,我的脚本停止了,我从xdebug和xdebug连接到mu ide并在自己的日志中写入信息.但是当我从browsen运行脚本时 - 即使在xdebug日志中也没有效果.我尝试使用firefox扩展来启动调试会话,我尝试使用xdebug.remote_autostart = 1选项,tru关闭了centos中的iptables,但也没有效果.我做错了什么?xdebug配置:

; Enable xdebug …
Run Code Online (Sandbox Code Playgroud)

php centos xdebug

3
推荐指数
1
解决办法
4910
查看次数

php curl CURLOPT_PASSWDFUNCTION选项

我不能使用php的curl选项CURLOPT_PASSWDFUNCTION,得到通知:

PHP Notice:  Use of undefined constant CURLOPT_PASSWDFUNCTION - assumed 'CURLOPT_PASSWDFUNCTION'
Run Code Online (Sandbox Code Playgroud)

样品:

function get_passwd($ch, $string, $length){
    return 'password';
}
curl_setopt($ch, CURLOPT_PASSWDFUNCTION, 'get_passwd');
Run Code Online (Sandbox Code Playgroud)

PHP信息:

PHP 5.4.40(cli)(建于2015年4月29日02:17:51)版权所有(c)1997-2014 PHP Group Zend Engine v2.4.0,版权所有(c)1998-2014 Zend Technologies

我做错了什么?

UPD:curl正在工作,当我执行我的代码时,我收到消息"请输入密码",我输入密码并使用ecnryption和证书通过ssl获取数据.我想避免手动输入密码.

php security curl

1
推荐指数
1
解决办法
159
查看次数