cURL help please

cURL help please

am 12.10.2007 18:04:31 von k.rollman

I am having a problem using cURL to create an https connection on a
non-standard port (440). Using curl_setopt to set the port to 440 has
no effect, and I get the following from curl's verbose output.

* About to connect() to xxx.xxx.xxx.xxx port 443
* Connected to xxx.xxx.xxx.xxx (xxx.xxx.xxx.xxx) port 443

If I put ':440' in the url, I get the following and an error code of
7.
* About to connect() to xxx.xxx.xxx.xxx port 440
* Failed to connect to xxx.xxx.xxx.xxx IP number 1: 13
* Closing connection #0

>From phpinfo:

php 5.5.2

FreeBSD cgi27 6.2-RELEASE-p7 FreeBSD 6.2-RELEASE-p7 #1

cgi mode
'./configure' '--prefix=/usr/local/nf/php5' '--exec-prefix=/usr/local/
nf/php5' '--enable-exif' '--enable-dbase' '--enable-mbstring' '--with-
mysql=/usr/local/nf' '--enable-discard-path' '--with-config-file-path=/
usr/local/nf/php5/etc' '--with-zlib-dir=/usr/local/nf' '--with-iconv=/
usr/local/nf' '--with-libxml-dir=/usr/local/nf' '--with-png-dir=/usr/
local/nf' '--with-jpeg-dir=/usr/local/nf' '--with-imagick=/usr/local/
nf' '--with-gd' '--with-curl=/usr/local/nf' '--with-openssl=/usr/local/
nf' '--without-xpm' '--without-freetype' '--with-libxml-dir=/usr/local/
nf' '--with-mcrypt=/usr/local/nf' '--with-mysqli=/usr/local/nf/bin/
mysql_config'

Apache/1.3.34 (Unix) mod_fastcgi/2.4.2 mod_perl/1.26
libcurl/7.11.1 OpenSSL/0.9.8e zlib/1.1.3

I have access to another server, and have tested the code there and it
works; apache 2.1, php 5.2.3, libcurl/7.16.0 OpenSSL/0.9.8d zlib/
1.2.3. Changes to the production server are not possible as it is a
hosted site :(

TIA for any help you can provide.

Re: cURL help please

am 12.10.2007 20:02:59 von Jerry Stuckle

k.rollman@gmail.com wrote:
> I am having a problem using cURL to create an https connection on a
> non-standard port (440). Using curl_setopt to set the port to 440 has
> no effect, and I get the following from curl's verbose output.
>
> * About to connect() to xxx.xxx.xxx.xxx port 443
> * Connected to xxx.xxx.xxx.xxx (xxx.xxx.xxx.xxx) port 443
>
> If I put ':440' in the url, I get the following and an error code of
> 7.
> * About to connect() to xxx.xxx.xxx.xxx port 440
> * Failed to connect to xxx.xxx.xxx.xxx IP number 1: 13
> * Closing connection #0
>
>>From phpinfo:
>
> php 5.5.2
>
> FreeBSD cgi27 6.2-RELEASE-p7 FreeBSD 6.2-RELEASE-p7 #1
>
> cgi mode
> './configure' '--prefix=/usr/local/nf/php5' '--exec-prefix=/usr/local/
> nf/php5' '--enable-exif' '--enable-dbase' '--enable-mbstring' '--with-
> mysql=/usr/local/nf' '--enable-discard-path' '--with-config-file-path=/
> usr/local/nf/php5/etc' '--with-zlib-dir=/usr/local/nf' '--with-iconv=/
> usr/local/nf' '--with-libxml-dir=/usr/local/nf' '--with-png-dir=/usr/
> local/nf' '--with-jpeg-dir=/usr/local/nf' '--with-imagick=/usr/local/
> nf' '--with-gd' '--with-curl=/usr/local/nf' '--with-openssl=/usr/local/
> nf' '--without-xpm' '--without-freetype' '--with-libxml-dir=/usr/local/
> nf' '--with-mcrypt=/usr/local/nf' '--with-mysqli=/usr/local/nf/bin/
> mysql_config'
>
> Apache/1.3.34 (Unix) mod_fastcgi/2.4.2 mod_perl/1.26
> libcurl/7.11.1 OpenSSL/0.9.8e zlib/1.1.3
>
> I have access to another server, and have tested the code there and it
> works; apache 2.1, php 5.2.3, libcurl/7.16.0 OpenSSL/0.9.8d zlib/
> 1.2.3. Changes to the production server are not possible as it is a
> hosted site :(
>
> TIA for any help you can provide.
>
>

Perhaps a firewall is blocking it?

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

Re: cURL help please

am 12.10.2007 20:41:12 von k.rollman

On Oct 12, 12:02 pm, Jerry Stuckle wrote:
> k.roll...@gmail.com wrote:
> > I am having a problem using cURL to create an https connection on a
> > non-standard port (440). Using curl_setopt to set the port to 440 has
> > no effect, and I get the following from curl's verbose output.
>
> > * About to connect() to xxx.xxx.xxx.xxx port 443
> > * Connected to xxx.xxx.xxx.xxx (xxx.xxx.xxx.xxx) port 443
>
> > If I put ':440' in the url, I get the following and an error code of
> > 7.
> > * About to connect() to xxx.xxx.xxx.xxx port 440
> > * Failed to connect to xxx.xxx.xxx.xxx IP number 1: 13
> > * Closing connection #0
>
> >>From phpinfo:
>
> > php 5.5.2
>
> > FreeBSD cgi27 6.2-RELEASE-p7 FreeBSD 6.2-RELEASE-p7 #1
>
> > cgi mode
> > './configure' '--prefix=/usr/local/nf/php5' '--exec-prefix=/usr/local/
> > nf/php5' '--enable-exif' '--enable-dbase' '--enable-mbstring' '--with-
> > mysql=/usr/local/nf' '--enable-discard-path' '--with-config-file-path=/
> > usr/local/nf/php5/etc' '--with-zlib-dir=/usr/local/nf' '--with-iconv=/
> > usr/local/nf' '--with-libxml-dir=/usr/local/nf' '--with-png-dir=/usr/
> > local/nf' '--with-jpeg-dir=/usr/local/nf' '--with-imagick=/usr/local/
> > nf' '--with-gd' '--with-curl=/usr/local/nf' '--with-openssl=/usr/local/
> > nf' '--without-xpm' '--without-freetype' '--with-libxml-dir=/usr/local/
> > nf' '--with-mcrypt=/usr/local/nf' '--with-mysqli=/usr/local/nf/bin/
> > mysql_config'
>
> > Apache/1.3.34 (Unix) mod_fastcgi/2.4.2 mod_perl/1.26
> > libcurl/7.11.1 OpenSSL/0.9.8e zlib/1.1.3
>
> > I have access to another server, and have tested the code there and it
> > works; apache 2.1, php 5.2.3, libcurl/7.16.0 OpenSSL/0.9.8d zlib/
> > 1.2.3. Changes to the production server are not possible as it is a
> > hosted site :(
>
> > TIA for any help you can provide.
>
> Perhaps a firewall is blocking it?
>
> --
> ==================
> Remove the "x" from my email address
> Jerry Stuckle
> JDS Computer Training Corp.
> jstuck...@attglobal.net
> ==================- Hide quoted text -
>
> - Show quoted text -

There is a firewall, but the port is open and I confirmed it with a
browser. I have also checked the firewall's logs, and there is
nothing from the production server.

Thanks anyway.

Re: cURL help please

am 13.10.2007 04:05:31 von Jerry Stuckle

k.rollman@gmail.com wrote:
> On Oct 12, 12:02 pm, Jerry Stuckle wrote:
>> k.roll...@gmail.com wrote:
>>> I am having a problem using cURL to create an https connection on a
>>> non-standard port (440). Using curl_setopt to set the port to 440 has
>>> no effect, and I get the following from curl's verbose output.
>>> * About to connect() to xxx.xxx.xxx.xxx port 443
>>> * Connected to xxx.xxx.xxx.xxx (xxx.xxx.xxx.xxx) port 443
>>> If I put ':440' in the url, I get the following and an error code of
>>> 7.
>>> * About to connect() to xxx.xxx.xxx.xxx port 440
>>> * Failed to connect to xxx.xxx.xxx.xxx IP number 1: 13
>>> * Closing connection #0
>>> >From phpinfo:
>>> php 5.5.2
>>> FreeBSD cgi27 6.2-RELEASE-p7 FreeBSD 6.2-RELEASE-p7 #1
>>> cgi mode
>>> './configure' '--prefix=/usr/local/nf/php5' '--exec-prefix=/usr/local/
>>> nf/php5' '--enable-exif' '--enable-dbase' '--enable-mbstring' '--with-
>>> mysql=/usr/local/nf' '--enable-discard-path' '--with-config-file-path=/
>>> usr/local/nf/php5/etc' '--with-zlib-dir=/usr/local/nf' '--with-iconv=/
>>> usr/local/nf' '--with-libxml-dir=/usr/local/nf' '--with-png-dir=/usr/
>>> local/nf' '--with-jpeg-dir=/usr/local/nf' '--with-imagick=/usr/local/
>>> nf' '--with-gd' '--with-curl=/usr/local/nf' '--with-openssl=/usr/local/
>>> nf' '--without-xpm' '--without-freetype' '--with-libxml-dir=/usr/local/
>>> nf' '--with-mcrypt=/usr/local/nf' '--with-mysqli=/usr/local/nf/bin/
>>> mysql_config'
>>> Apache/1.3.34 (Unix) mod_fastcgi/2.4.2 mod_perl/1.26
>>> libcurl/7.11.1 OpenSSL/0.9.8e zlib/1.1.3
>>> I have access to another server, and have tested the code there and it
>>> works; apache 2.1, php 5.2.3, libcurl/7.16.0 OpenSSL/0.9.8d zlib/
>>> 1.2.3. Changes to the production server are not possible as it is a
>>> hosted site :(
>>> TIA for any help you can provide.
>> Perhaps a firewall is blocking it?
>>
>> --
>> ==================
>> Remove the "x" from my email address
>> Jerry Stuckle
>> JDS Computer Training Corp.
>> jstuck...@attglobal.net
>> ==================- Hide quoted text -
>>
>> - Show quoted text -
>
> There is a firewall, but the port is open and I confirmed it with a
> browser. I have also checked the firewall's logs, and there is
> nothing from the production server.
>
> Thanks anyway.
>
>

The inbound port may be open - but does the application have permission
to connect to the outbound port?

Two entirely different things.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================