Issue 6 in php-transmission-class: 409 Conflict

2 views
Skip to first unread message

php-transmi...@googlecode.com

unread,
Jul 21, 2010, 3:54:34 PM7/21/10
to php-transmi...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 6 by chromox: 409 Conflict
http://code.google.com/p/php-transmission-class/issues/detail?id=6

Whenever the library tries to get the session id. On line 422:

if ( ! $fp = fopen( $this->url, 'r', false, $context ) ) // Open a
filepointer to the data, and use fgets to get the result

The problem is that when it fopens the server returns the 409 conflict
message with the session ID but no file handle is returned to $fp because
it was an error. How do I fix this?

php-transmi...@googlecode.com

unread,
Jul 21, 2010, 3:58:19 PM7/21/10
to php-transmi...@googlegroups.com

Comment #1 on issue 6 by chromox: 409 Conflict
http://code.google.com/p/php-transmission-class/issues/detail?id=6

Warning: fopen(http://91.121.2.23:12120/transmission/rpc): failed to open
stream: HTTP request failed! HTTP/1.0 409 Conflict
in /var/www/chromiumblue/play/transmission.php on line 424

Call Stack:
0.0004 70584 1. {main}()
/var/www/chromiumblue/play/revolver.php:0
0.7266 299856 2. TransmissionRPC->add()
/var/www/chromiumblue/play/revolver.php:39
0.7266 299912 3. TransmissionRPC->add_file()
/var/www/chromiumblue/play/transmission.php:232
0.7267 300228 4. TransmissionRPC->request()
/var/www/chromiumblue/play/transmission.php:207
0.7267 300672 5. TransmissionRPC->GetSessionID()
/var/www/chromiumblue/play/transmission.php:347
1.0648 301380 6. fopen()
/var/www/chromiumblue/play/transmission.php:424


TransmissionRPCException: Unable to connect to
http://91.121.2.23:12120/transmission/rpc in
/var/www/chromiumblue/play/transmission.php on line 425

Call Stack:
0.0004 70584 1. {main}()
/var/www/chromiumblue/play/revolver.php:0
0.7266 299856 2. TransmissionRPC->add()
/var/www/chromiumblue/play/revolver.php:39
0.7266 299912 3. TransmissionRPC->add_file()
/var/www/chromiumblue/play/transmission.php:232
0.7267 300228 4. TransmissionRPC->request()
/var/www/chromiumblue/play/transmission.php:207
0.7267 300672 5. TransmissionRPC->GetSessionID()
/var/www/chromiumblue/play/transmission.php:347


php-transmi...@googlecode.com

unread,
Jul 21, 2010, 4:02:30 PM7/21/10
to php-transmi...@googlegroups.com
Updates:
Labels: -Priority-Medium Priority-Low

Comment #2 on issue 6 by brycied...@gmail.com: 409 Conflict
http://code.google.com/p/php-transmission-class/issues/detail?id=6

chromox: Are you using the latest trunk checkout?
Your issue is strange because the class sets the 'ignore_errors' => true
$context property, so it shouldn't throw a fit on the fopen.
Please try the latest checkout from trunk.

php-transmi...@googlecode.com

unread,
Jul 21, 2010, 4:05:57 PM7/21/10
to php-transmi...@googlegroups.com

Comment #3 on issue 6 by chromox: 409 Conflict
http://code.google.com/p/php-transmission-class/issues/detail?id=6

I just got the latest trunk version and it is still happening... My PHP -v
is as follows:

PHP 5.2.6-3ubuntu4.5 with Suhosin-Patch 0.9.6.2 (cli) (built: Jan 6 2010
22:25:33)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
with Xdebug v2.0.3, Copyright (c) 2002-2007, by Derick Rethans


php-transmi...@googlecode.com

unread,
Jul 21, 2010, 4:10:19 PM7/21/10
to php-transmi...@googlegroups.com

Comment #4 on issue 6 by chromox: 409 Conflict
http://code.google.com/p/php-transmission-class/issues/detail?id=6

If you need me to post anything else I will of course.

php-transmi...@googlecode.com

unread,
Jul 21, 2010, 4:16:55 PM7/21/10
to php-transmi...@googlegroups.com

Comment #5 on issue 6 by brycied...@gmail.com: 409 Conflict
http://code.google.com/p/php-transmission-class/issues/detail?id=6

chromox:
I still can't reproduce your issue. I tried this on my Ubuntu box, close to
the same PHP version (Transmission v1.91, not that it should matter):
PHP 5.3.2-1ubuntu4.2 with Suhosin-Patch (cli) (built: May 13 2010 20:01:00)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies

Do you maybe have safe_mode or something else limiting enabled? It's
apparently ignoring that flag in $context.
The next thing to do would be to include a copy of your php.ini* file(s).

php-transmi...@googlecode.com

unread,
Jul 21, 2010, 4:29:44 PM7/21/10
to php-transmi...@googlegroups.com

Comment #6 on issue 6 by chromox: 409 Conflict
http://code.google.com/p/php-transmission-class/issues/detail?id=6

Here it is no comments...

Attachments:
php.txt 2.2 KB

php-transmi...@googlecode.com

unread,
Jul 21, 2010, 5:39:43 PM7/21/10
to php-transmi...@googlegroups.com

Comment #7 on issue 6 by brycied...@gmail.com: 409 Conflict
http://code.google.com/p/php-transmission-class/issues/detail?id=6

Hmmm still working just fine for me. The only "abnormal" output was
complaining about mcrypt and a deprecated setting (see below), but they're
harmless. I'm out of ideas for now, will have to ponder I guess.
Johan, any ideas?

Output below:
PHP Warning: PHP Startup: Unable to load dynamic
library '/usr/lib/php5/20090626+lfs/mcrypt.so' -
/usr/lib/php5/20090626+lfs/mcrypt.so: cannot open shared object file: No
such file or directory in Unknown on line 0

Warning: Directive 'register_long_arrays' is deprecated in PHP 5.3 and
greater in Unknown on line 0


php-transmi...@googlecode.com

unread,
Jul 21, 2010, 6:29:19 PM7/21/10
to php-transmi...@googlegroups.com
Updates:
Status: Verified

Comment #8 on issue 6 by johan.adriaans: 409 Conflict
http://code.google.com/p/php-transmission-class/issues/detail?id=6

php.net tells us the ignore_errors option was added in php 5.2.10. Your
version (5.2.6) does not support this feature causing an E_WARNING error.

http://www.php.net/manual/en/context.http.php - See Changelog

I'm afraid you need to upgrade your PHP (and we need to adjust our minimal
version)

Bryce Chidester

unread,
Jul 21, 2010, 6:31:54 PM7/21/10
to TransmissionRPC Developers List
Thanks Johan.
Strange that it didn't happen for me... Hmmm
Sent via BlackBerry by AT&T

php-transmi...@googlecode.com

unread,
Jul 21, 2010, 6:33:47 PM7/21/10
to php-transmi...@googlegroups.com
Updates:
Status: Started

Comment #9 on issue 6 by johan.adriaans: 409 Conflict
http://code.google.com/p/php-transmission-class/issues/detail?id=6

(No comment was entered for this change.)

Johan Adriaans

unread,
Jul 21, 2010, 6:49:57 PM7/21/10
to php-transmi...@googlegroups.com
No problem, you said your version was 5.3.2 right? That version does
include the ignore_error option.
I'm off to bed now, I'll update the minimum version check tomorrow.

php-transmi...@googlecode.com

unread,
Jul 22, 2010, 4:54:14 AM7/22/10
to php-transmi...@googlegroups.com
Updates:
Status: Fixed

Comment #10 on issue 6 by johan.adriaans: 409 Conflict
http://code.google.com/p/php-transmission-class/issues/detail?id=6

Changed PHP_MINVER to 5.2.10 in revision 13

php-transmi...@googlecode.com

unread,
Feb 13, 2012, 2:48:13 AM2/13/12
to php-transmi...@googlegroups.com

Comment #11 on issue 6 by mathewpa...@gmail.com: 409 Conflict
http://code.google.com/p/php-transmission-class/issues/detail?id=6

I am facing the same issue. I am running on PHP 5.3. Please see the output
of php -v:

PHP 5.3.3-7+squeeze6 with Suhosin-Patch (cli) (built: Jan 31 2012 19:30:53)


Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies

with Suhosin v0.9.32.1, Copyright (c) 2007-2010, by SektionEins GmbH

Reply all
Reply to author
Forward
0 new messages