php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #32695 CURLPROXY_SOCKS5 Notices
Submitted: 2005-04-13 16:00 UTC Modified: 2005-04-14 08:37 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:0 of 2 (0.0%)
From: just-anonimus-no-spam at no-such-host dot com Assigned:
Status: Closed Package: Documentation problem
PHP Version: 4.3.11 OS: Linux fc3 2.6.11.6 #1 Tue Apr
Private report: No CVE-ID: None
 [2005-04-13 16:00 UTC] just-anonimus-no-spam at no-such-host dot com
Description:
------------
I can't solve some problem while trying to get a site content via 
socks5 proxy (CURL Information: libcurl/7.13.1 OpenSSL/0.9.7d zlib/1.1.4) 

  While trying to do like this: 

Reproduce code:
---------------
 <?php
        error_reporting(E_ALL); 
        $ch = curl_init ();
        curl_setopt ($ch, CURLOPT_URL, "http://www.yahoo.com");
        curl_setopt ($ch, CURLOPT_TIMEOUT, 30);
        curl_setopt ($ch, CURLOPT_PROXY, "192.168.1.12:1080");
        curl_setopt ($ch, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5);
        curl_setopt ($ch, CURLOPT_RETURNTRANSFER, TRUE);
        curl_setopt ($ch, CURLOPT_FAILONERROR, true);
        curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 1);
        $result = curl_exec($ch);
        print curl_errno ($ch);
        print $result;
        curl_close ($ch);
        ?>

Expected result:
----------------
I get: print $result is Ok;

        Notice: Use of undefined constant CURLOPT_PROXYTYPE - assumed 'CURLOPT_PROXYTYPE' in /home/jim/php/curl_socks.php on line 7 
        Notice: Use of undefined constant CURLPROXY_SOCKS5 - assumed 'CURLPROXY_SOCKS5' in /home/jim/php/curl_socks.php on line 7

Actual result:
--------------
But: The socks proxy is ok => $result also Ok!
PS: PLEASE CHECK ERROR (Near Notices)

THANKS::FOR_YOUR_WORK

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-04-14 00:28 UTC] sniper@php.net
Reclassified as documentation problem, the list of the constants should more clearly say in what PHP version's the options are available. (at least on curl_setopt() page)

Just update to PHP 5.0.4 and this'll work.
 [2005-04-14 08:37 UTC] vrana@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.


 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Nov 19 08:00:01 2025 UTC