#29280 [Com]: changing the default http-wrapper

2009-09-17 Thread fuzzy76 at fuzzy76 dot net
 ID:   29280
 Comment by:   fuzzy76 at fuzzy76 dot net
 Reported By:  Progman2002 at gmx dot de
 Status:   Assigned
 Bug Type: Feature/Change Request
 Operating System: *
 PHP Version:  5CVS
 Assigned To:  pollita
 New Comment:

Is that a yes or a no on the ini option? :) I need to use a proxy in my

office, and this makes testing webapps really difficult.


Previous Comments:


[2009-09-17 09:34:59] fuzzy76 at fuzzy76 dot net

Is that a yes or a no on the ini option? :) I need to use a proxy in my

office, and this makes testing webapps really difficult.



[2009-09-17 09:34:29] fuzzy76 at fuzzy76 dot net

Is that a yes or a no on the ini option? :) I need to use a proxy in my

office, and this makes testing webapps really difficult.



[2008-06-04 19:07:46] r13ckj at gmail dot com

I was just wondering whether this has been implemented?

My problem is outlined here:
http://forums.devshed.com/php-development-5/default-proxy-settings-for-php4-5t-534829.html#post2054576

I've spent countless hours on this problem, so any help would be much
appreciated.



[2004-07-24 06:19:45] poll...@php.net

Ack! My bad... didn't see your note about making it an .ini option :)




[2004-07-24 06:17:47] poll...@php.net

Dunno why this was assigned to me when wez implemented it :)

Closing it up.  You can either grab the snapshot from snaps.php.net
otherwise your wait will be until 5.1.0 is released.



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/29280

-- 
Edit this bug report at http://bugs.php.net/?id=29280&edit=1



#29280 [Com]: changing the default http-wrapper

2009-09-17 Thread fuzzy76 at fuzzy76 dot net
 ID:   29280
 Comment by:   fuzzy76 at fuzzy76 dot net
 Reported By:  Progman2002 at gmx dot de
 Status:   Assigned
 Bug Type: Feature/Change Request
 Operating System: *
 PHP Version:  5CVS
 Assigned To:  pollita
 New Comment:

Is that a yes or a no on the ini option? :) I need to use a proxy in my

office, and this makes testing webapps really difficult.


Previous Comments:


[2009-09-17 09:34:29] fuzzy76 at fuzzy76 dot net

Is that a yes or a no on the ini option? :) I need to use a proxy in my

office, and this makes testing webapps really difficult.



[2008-06-04 19:07:46] r13ckj at gmail dot com

I was just wondering whether this has been implemented?

My problem is outlined here:
http://forums.devshed.com/php-development-5/default-proxy-settings-for-php4-5t-534829.html#post2054576

I've spent countless hours on this problem, so any help would be much
appreciated.



[2004-07-24 06:19:45] poll...@php.net

Ack! My bad... didn't see your note about making it an .ini option :)




[2004-07-24 06:17:47] poll...@php.net

Dunno why this was assigned to me when wez implemented it :)

Closing it up.  You can either grab the snapshot from snaps.php.net
otherwise your wait will be until 5.1.0 is released.



[2004-07-22 16:47:53] progman2002 at gmx dot de

works fine.
 PHPs snip 
$opts = array('http' => array('request_fulluri' => true,
  'proxy' => 'tcp://192.168.0.1:8080'));
stream_context_get_default($opts);
 eos 
works also as...
 PHPs snip 
$context = stream_context_get_default();
stream_context_set_option($context, 'http', 'proxy',
'tcp://192.168.0.1:8080');
stream_context_set_option($context, 'http', 'request_fulluri', true);
 eos 
... does

So, now I must wait until it is in the non-cvs package ;)



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/29280

-- 
Edit this bug report at http://bugs.php.net/?id=29280&edit=1



#29280 [Com]: changing the default http-wrapper

2009-09-17 Thread fuzzy76 at fuzzy76 dot net
 ID:   29280
 Comment by:   fuzzy76 at fuzzy76 dot net
 Reported By:  Progman2002 at gmx dot de
 Status:   Assigned
 Bug Type: Feature/Change Request
 Operating System: *
 PHP Version:  5CVS
 Assigned To:  pollita
 New Comment:

Is that a yes or a no on the ini option? :) I need to use a proxy in my

office, and this makes testing webapps really difficult.


Previous Comments:


[2008-06-04 19:07:46] r13ckj at gmail dot com

I was just wondering whether this has been implemented?

My problem is outlined here:
http://forums.devshed.com/php-development-5/default-proxy-settings-for-php4-5t-534829.html#post2054576

I've spent countless hours on this problem, so any help would be much
appreciated.



[2004-07-24 06:19:45] poll...@php.net

Ack! My bad... didn't see your note about making it an .ini option :)




[2004-07-24 06:17:47] poll...@php.net

Dunno why this was assigned to me when wez implemented it :)

Closing it up.  You can either grab the snapshot from snaps.php.net
otherwise your wait will be until 5.1.0 is released.



[2004-07-22 16:47:53] progman2002 at gmx dot de

works fine.
 PHPs snip 
$opts = array('http' => array('request_fulluri' => true,
  'proxy' => 'tcp://192.168.0.1:8080'));
stream_context_get_default($opts);
 eos 
works also as...
 PHPs snip 
$context = stream_context_get_default();
stream_context_set_option($context, 'http', 'proxy',
'tcp://192.168.0.1:8080');
stream_context_set_option($context, 'http', 'request_fulluri', true);
 eos 
... does

So, now I must wait until it is in the non-cvs package ;)



[2004-07-22 14:47:54] w...@php.net

Current CVS now has stream_context_get_default() which returns the
default context used by all newly created streams (unless explicitly
overriden).

You can use this in your script (perhaps via auto_prepend) to set the
proxy globally.

I know; an ini option for the proxy would be a good idea too, so let's
ask Sara really nicely if she wouldn't mind adding that.



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/29280

-- 
Edit this bug report at http://bugs.php.net/?id=29280&edit=1



#29280 [Com]: changing the default http-wrapper

2008-06-04 Thread r13ckj at gmail dot com
 ID:   29280
 Comment by:   r13ckj at gmail dot com
 Reported By:  Progman2002 at gmx dot de
 Status:   Assigned
 Bug Type: Feature/Change Request
 Operating System: *
 PHP Version:  5CVS
 Assigned To:  pollita
 New Comment:

I was just wondering whether this has been implemented?

My problem is outlined here:
http://forums.devshed.com/php-development-5/default-proxy-settings-for-php4-5t-534829.html#post2054576

I've spent countless hours on this problem, so any help would be much
appreciated.


Previous Comments:


[2004-07-24 06:19:45] [EMAIL PROTECTED]

Ack! My bad... didn't see your note about making it an .ini option :)




[2004-07-24 06:17:47] [EMAIL PROTECTED]

Dunno why this was assigned to me when wez implemented it :)

Closing it up.  You can either grab the snapshot from snaps.php.net
otherwise your wait will be until 5.1.0 is released.



[2004-07-22 16:47:53] progman2002 at gmx dot de

works fine.
 PHPs snip 
$opts = array('http' => array('request_fulluri' => true,
  'proxy' => 'tcp://192.168.0.1:8080'));
stream_context_get_default($opts);
 eos 
works also as...
 PHPs snip 
$context = stream_context_get_default();
stream_context_set_option($context, 'http', 'proxy',
'tcp://192.168.0.1:8080');
stream_context_set_option($context, 'http', 'request_fulluri', true);
 eos 
... does

So, now I must wait until it is in the non-cvs package ;)



[2004-07-22 14:47:54] [EMAIL PROTECTED]

Current CVS now has stream_context_get_default() which returns the
default context used by all newly created streams (unless explicitly
overriden).

You can use this in your script (perhaps via auto_prepend) to set the
proxy globally.

I know; an ini option for the proxy would be a good idea too, so let's
ask Sara really nicely if she wouldn't mind adding that.



[2004-07-20 14:52:57] Progman2002 at web dot de

sure:
 PHP-Code:
 array('request_fulluri' => true,
  'proxy' =>
'tcp://192.168.0.1:8080'));

$context = stream_context_create($opts);

$url = "http://www.example.com/";;

$fp = fopen($url, 'r', false, $context);
if (!$fp) {
echo "nothing :(";
} else {
var_dump($fp);
fclose($fp);
}

// and now without $context...

$fp = fopen($url, 'r');
if (!$fp) {
echo "nothing :(";
} else {
var_dump($fp);
fclose($fp);
}
?>

The first call with $context works, the second doesnt:

 Output:
resource(3) of type (stream) 
Warning: fopen(http://www.example.com/) [function.fopen]: failed to
open stream: Connection timed out in /home/progman/public_html/test.php
on line 19
nothing :(

 Expected:
resource(3) of type (stream)
resource(4) of type (stream) // or an other resource-id

A php.ini-setting for proxys would be maybe better ;)



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/29280

-- 
Edit this bug report at http://bugs.php.net/?id=29280&edit=1



#29280 [Com]: changing the default http-wrapper

2004-07-22 Thread progman2002 at gmx dot de
 ID:  29280
 Comment by:  progman2002 at gmx dot de
 Reported By: Progman2002 at gmx dot de
 Status:  Assigned
 Bug Type:*Network Functions
 PHP Version: Irrelevant
 Assigned To: pollita
 New Comment:

works fine.
 PHPs snip 
$opts = array('http' => array('request_fulluri' => true,
  'proxy' => 'tcp://192.168.0.1:8080'));
stream_context_get_default($opts);
 eos 
works also as...
 PHPs snip 
$context = stream_context_get_default();
stream_context_set_option($context, 'http', 'proxy',
'tcp://192.168.0.1:8080');
stream_context_set_option($context, 'http', 'request_fulluri', true);
 eos 
... does

So, now I must wait until it is in the non-cvs package ;)


Previous Comments:


[2004-07-22 14:47:54] [EMAIL PROTECTED]

Current CVS now has stream_context_get_default() which returns the
default context used by all newly created streams (unless explicitly
overriden).

You can use this in your script (perhaps via auto_prepend) to set the
proxy globally.

I know; an ini option for the proxy would be a good idea too, so let's
ask Sara really nicely if she wouldn't mind adding that.



[2004-07-20 14:52:57] Progman2002 at web dot de

sure:
 PHP-Code:
 array('request_fulluri' => true,
  'proxy' =>
'tcp://192.168.0.1:8080'));

$context = stream_context_create($opts);

$url = "http://www.example.com/";;

$fp = fopen($url, 'r', false, $context);
if (!$fp) {
echo "nothing :(";
} else {
var_dump($fp);
fclose($fp);
}

// and now without $context...

$fp = fopen($url, 'r');
if (!$fp) {
echo "nothing :(";
} else {
var_dump($fp);
fclose($fp);
}
?>

The first call with $context works, the second doesnt:

 Output:
resource(3) of type (stream) 
Warning: fopen(http://www.example.com/) [function.fopen]: failed to
open stream: Connection timed out in /home/progman/public_html/test.php
on line 19
nothing :(

 Expected:
resource(3) of type (stream)
resource(4) of type (stream) // or an other resource-id

A php.ini-setting for proxys would be maybe better ;)



[2004-07-20 14:24:46] [EMAIL PROTECTED]

I know what you mean (and we do have something planned), but can you
please clarify which functions you are using to implement proxy
support?



[2004-07-20 14:01:48] Progman2002 at gmx dot de

Description:

I'm behind a proxy so my local php version cannot access the internet
directly. Every HTTP-Request must go throught the proxy. I have see
that I can create my own http-wrapper with settings to use my proxy and
use this metioned "context" as fourth parameter for the functions like
fopen and file_get_contents. This works fine, but what about if I use
third-party scripts, which just use file_get_contents($url) instead of
file_get_contents($url, false, $context)? It is possible to change or
modify the internal http-wrapper to use my proxy instead of creating a
new http-wrapper with stream_*() so I can just use file_get_contents()
and fopen() without the 'zcontext'-parameter?






-- 
Edit this bug report at http://bugs.php.net/?id=29280&edit=1


#29280 [Com]: changing the default http-wrapper

2004-07-20 Thread Progman2002 at web dot de
 ID:  29280
 Comment by:  Progman2002 at web dot de
 Reported By: Progman2002 at gmx dot de
 Status:  Feedback
 Bug Type:*Network Functions
 PHP Version: Irrelevant
 New Comment:

sure:
 PHP-Code:
 array('request_fulluri' => true,
  'proxy' =>
'tcp://192.168.0.1:8080'));

$context = stream_context_create($opts);

$url = "http://www.example.com/";;

$fp = fopen($url, 'r', false, $context);
if (!$fp) {
echo "nothing :(";
} else {
var_dump($fp);
fclose($fp);
}

// and now without $context...

$fp = fopen($url, 'r');
if (!$fp) {
echo "nothing :(";
} else {
var_dump($fp);
fclose($fp);
}
?>

The first call with $context works, the second doesnt:

 Output:
resource(3) of type (stream) 
Warning: fopen(http://www.example.com/) [function.fopen]: failed to
open stream: Connection timed out in /home/progman/public_html/test.php
on line 19
nothing :(

 Expected:
resource(3) of type (stream)
resource(4) of type (stream) // or an other resource-id

A php.ini-setting for proxys would be maybe better ;)


Previous Comments:


[2004-07-20 14:24:46] [EMAIL PROTECTED]

I know what you mean (and we do have something planned), but can you
please clarify which functions you are using to implement proxy
support?



[2004-07-20 14:01:48] Progman2002 at gmx dot de

Description:

I'm behind a proxy so my local php version cannot access the internet
directly. Every HTTP-Request must go throught the proxy. I have see
that I can create my own http-wrapper with settings to use my proxy and
use this metioned "context" as fourth parameter for the functions like
fopen and file_get_contents. This works fine, but what about if I use
third-party scripts, which just use file_get_contents($url) instead of
file_get_contents($url, false, $context)? It is possible to change or
modify the internal http-wrapper to use my proxy instead of creating a
new http-wrapper with stream_*() so I can just use file_get_contents()
and fopen() without the 'zcontext'-parameter?






-- 
Edit this bug report at http://bugs.php.net/?id=29280&edit=1