Re: Re: cUrl and proxies

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, June 30, 2005 9:27 am, Mark Rees said:
> UPDATE: I think it is a bug in cURL, according to this link (I am using an
> ISA proxy).
> https://sourceforge.net/tracker/?func=detail&atid=100976&aid=1188280&group_i
> d=976
>
> So all I need to do is install the latest version of cURL then. I am
> really
> struggling with this - I don't have a good understanding of how PHP and
> cURL
> interact. I already have the necessary dlls on my machine :

How PHP and cURL (and Apache) interact:

PHP is a Module of Apache (or Service of IIS, or [shudder] runs as CGI)
php_curl.dll is a Module of PHP

So PHP is a tick on the back of the dog to Apache, and php_curl is a flea
on the tick. :-v

Now, in most cases, like MySQL, you also need MySQL installed on the
machine.  So, possibly, you will need that new curl.exe ALONG WITH a *new*
php_curl.dll

DO NOT ATTEMPT TO MIX-N-MATCH THE DIFFERENT VERSIONS OF DLL AND EXE!!!

While it might "work" for awhile, that's only sheer coincidence that the
particular functions in curl/php you are using didn't change between those
two versions.  As soon as you try to use a function that *DID* change,
Whammo! the thing will crash and burn.

You'll end up very cranky, possibly with a problem caused by a bad
decision months and months ago, and you won't have any idea of the cause
and effect relationship, cuz it "worked fine" for so long.

I'm not sure you even need the curl.exe -- I suspect that all the
functionality of curl.exe gets bundled up into php_curl.dll

Now the bad news:
You would need to re-compile php_curl, using your current version of PHP
source, and the version of curl source you want, on a Windows box, to get
the php_curl.dll you need.

That requires A) having a copy of MSVC++ (Microsoft Visual C++)
compiler/IDE and B) knowing how to work MSVC *very* well, to set up your
environment the way it needs to be to compile PHP.

A) is "easy" to solve if you have money.
B) is not so easy...  There may be a How To for PHP and MSVC out there,
but it sure didn't exist back when I tried this, quite some years ago.  I
failed miserably.

You may want to take your plight to the PHP-Windows mailing list.  There
are probably more people there who are actually capable of running MSVC
and getting PHP to compile.  They might just do it for you.  They may even
have the particular version of php_curl.dll you need available somewhere.

> php_curl.dll
> libeay.dll
> ssleay.dll
>
> But what can I download from
>
> http://curl.haxx.se/download.html
>
> I don't see any of those files there, and the windows package includes
> only
> curl.exe - where does that fit in?
>
> The readme files in the package I did download don't really help either:
> http://curl.haxx.se/dlwiz/?type=*&os=Win32&flav=-&ver=2000%2FXP
>
> Please help if you can
>
> Mark
>
> ""Mark Rees"" <mrees@xxxxxxxxxxxxxxxxx> wrote in message
> news:C9.4C.29969.03314C24@xxxxxxxxxxxxxxx
>> Hello
>>
>> This code gives me a 407  Proxy Authentication Required message. Can
> anyone
>> see what is missing? The username and password are definitely correct,
>> as
>> are the proxy IP and port.
>>
>> Win2k. php 5.0.4
>>
>> $ch=curl_init();
>> curl_setopt ($ch, CURLOPT_URL, 'http://www.google.com/');
>> curl_setopt($ch, CURLOPT_HEADER, 1);
>> curl_setopt($ch,CURLOPT_HTTP_VERSION,'CURL_HTTP_VERSION_1_1');
>> curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, 1);
>> curl_setopt($ch,CURLOPT_PROXY,'10.0.0.8:8080');
>> curl_setopt($ch,CURLOPT_PROXYUSERPWD,'abc:123');
>> $ret = curl_exec($ch);
>>
>> Thanks in advance
>>
>> Mark
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux