Problems using PHP and CURL
Altoine Barker
ndiscreet at gmail.com
Thu Jan 29 08:49:24 PST 2009
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
To replicate the same features seen in the Mac OS native curl for MP I
used this command: port -d install curl +ssl +ipv6 +gss +sftp_scp
HTH
- -Altoine
Would that replicate what you experience in your script before you added
a fix by modifying your configuration?
Craig Hoffman wrote:
>> Please check which curl version is used. curl is part of MacOsx and
>> resides in /usr/bin/curl.
> capital:~ xxxx $ /opt/local/bin/curl -V
> curl 7.19.3 (i386-apple-darwin9.6.0) libcurl/7.19.3 OpenSSL/0.9.8j
> zlib/1.2.3
> Protocols: tftp ftp telnet dict ldap http file https ftps
> Features: IPv6 Largefile NTLM SSL libz
>
>> You could try to systematically rename them (or do a sudo port
>> deactivate curl) and check if the "standard" macosx curl gives you a
>> different message/error.
> Ok, I'll give that a try.
> _______________________
> Craig Hoffman
> iChat / AIM: mountain.dog
> _______________________
>
>
>
>
>
> On Jan 23, 2009, at 10:51 AM, Harry van der Wolf wrote:
>
>> Please check which curl version is used. curl is part of MacOsx and
>> resides in /usr/bin/curl. Macports curl is in /opt/local/bin. If I
>> compare them I see that they are not equally compiled with equal
>> dependencies on my system (10.5.6). Normally when macports is
>> installed it places /opt/local/bin as first search path in your PATH.
>> Your previous install might have used the /usr/bin/curl wheras your
>> macports install uses /opt/local/bin/curl.
>> You could try to systematically rename them (or do a sudo port
>> deactivate curl) and check if the "standard" macosx curl gives you a
>> different message/error.
>>
>> Harry
>>
>>
>>
>> 2009/1/23 Craig Hoffman <choffman at eclimb.net <mailto:choffman at eclimb.net>>
>>
>> Ok this strange -
>> When I put this URL
>> (https://test.authorize.net/gateway/transact.dll) in your CURL
>> example, you get this response:
>> The following errors have occurred.
>> (13) The merchant login ID or password is invalid or the account
>> is inactive.
>>
>> But when running MacPorts PHP it returns blank. This example
>> returns the correct response with Marc's PHP package (5.2.5).
>> Could this be perhaps an Apache thing?
>>
>> <?php
>> $ch = curl_init();
>> curl_setopt($ch, CURLOPT_URL,
>> "https://test.authorize.net/gateway/transact.dll");
>>
>> curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
>> $response = curl_exec($ch);
>>
>> curl_close($ch);
>> echo $response;
>> ?>
>>
>> _______________________
>> Craig Hoffman
>> iChat / AIM: mountain.dog
>> _______________________
>>
>>
>>
>>
>>
>> On Jan 23, 2009, at 9:36 AM, Craig Hoffman wrote:
>>
>> what does the following PHP example do? I get this:
>>
>> You have reached this web page by typing "example.com
>> <http://example.com>", "example.net <http://example.net>", or
>> "example.org <http://example.org>" into your web browser.
>> These domain names are reserved for use in documentation and
>> are not available for registration. See RFC 2606, Section 3.
>>
>> Ok, I guess CURL is working. Excellent. I wonder why my
>> script doesn't work with MacPorts PHP...
>>
>> _______________________
>> Craig Hoffman
>> iChat / AIM: mountain.dog
>> _______________________
>>
>>
>>
>>
>>
>> On Jan 23, 2009, at 9:23 AM, Chris Janton wrote:
>>
>> On 2009-01-23 , at 08:57 , Craig Hoffman wrote:
>>
>> Thanks for responding. I pasted a code snippet below.
>> Basically it sends an array to Authorize.Net for
>> processing. Authorize.Net responds with transaction
>> details (approved, declined, wrong address, etc...).
>> When CURL is working, using Liyanage PHP I get this
>> response:
>>
>>
>>
>> what does the following PHP example do? In theory it will
>> return the text of the web page which reads like this
>> "
>> You have reached this web page by typing "example.com
>> <http://example.com>", "example.net <http://example.net>",
>> or "example.org <http://example.org>" into your web browser.
>> These domain names are reserved for use in documentation
>> and are not available for registration. See RFC 2606,
>> Section 3.
>>
>> "
>>
>>
>> <?php
>> $ch = curl_init();
>> curl_setopt($ch, CURLOPT_URL, 'example.com
>> <http://example.com>');
>> curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
>> $output = curl_exec($ch);
>> curl_close($ch);
>> echo $output;
>> ?>
>>
>> 8)
>> ----------------------------------
>> Chris Janton - face at CentosPrime dot COM
>> Netminder for Opus1.COM
>>
>>
>>
>> _______________________________________________
>> macports-users mailing list
>> macports-users at lists.macosforge.org
>> <mailto:macports-users at lists.macosforge.org>
>> http://lists.macosforge.org/mailman/listinfo.cgi/macports-users
>>
>>
>> _______________________________________________
>> macports-users mailing list
>> macports-users at lists.macosforge.org
>> <mailto:macports-users at lists.macosforge.org>
>> http://lists.macosforge.org/mailman/listinfo.cgi/macports-users
>>
>>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> macports-users mailing list
> macports-users at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macports-users
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkmB3hMACgkQQlfc9y4ObkNqtQCgmt++ZgisVLNTS2Fb34kConDV
ULMAn0e81qIdvbHehp9yYg9Tn6+IA36X
=y/0h
-----END PGP SIGNATURE-----
More information about the macports-users
mailing list