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?
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
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.
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
If you need me to post anything else I will of course.
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).
Here it is no comments...
Attachments:
php.txt 2.2 KB
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
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)
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.)
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
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