Em um servidor Ubuntu 14.04 o upload do arquivo curl PHP funciona, mas em outro Ubuntu 14.04 recebe erro

0

Eu tenho um problema muito estranho, eu tenho 2 servidores Ubuntu 14.04 com PHP 5.5. Um dos nossos scripts PHP é executado bem no Servidor A, mas dá erro no Servidor B. Aqui está a saída detalhada da minha onda curl (do php) onde está o trabalho:

# php -f ocr-check.php
* Hostname was NOT found in DNS cache
*   Trying 69.64.69.77...
* Connected to www.ocrwebservice.com (69.64.69.77) port 80 (#0)
* Server auth using Basic with user 'done'
> POST /restservices/processDocument?gettext=true HTTP/1.1
Authorization: Basic ZG9uZTowRTVFQ0JDRS01OUZFLTRERkItQUU3RC1GQTRDMUU4MDlDQjU=
Host: www.ocrwebservice.com
Accept: */*
Content-Type: application/json
Content-Length: 149597
Expect: 100-continue

< HTTP/1.1 100 Continue
* We are completely uploaded and fine
< HTTP/1.1 200 OK
< Cache-Control: no-cache
< Pragma: no-cache
< Content-Length: 18125
< Content-Type: application/json; charset=utf-8
< Expires: -1
* Server Microsoft-IIS/7.5 is not blacklisted
< Server: Microsoft-IIS/7.5
< X-AspNet-Version: 4.0.30319
< X-Powered-By: ASP.NET
< Date: Tue, 29 Nov 2016 12:45:37 GMT
<
* Connection #0 to host www.ocrwebservice.com left intact
Array
(
    [url] => http://www.ocrwebservice.com/restservices/processDocument?gettext=true
    [content_type] => application/json; charset=utf-8
    [http_code] => 200
    [header_size] => 286
    [request_size] => 259
    [filetime] => -1
    [ssl_verify_result] => 0
    [redirect_count] => 0
    [total_time] => 13.858555
    [namelookup_time] => 0.252775
    [connect_time] => 0.419635
    [pretransfer_time] => 0.419708
    [size_upload] => 149597
    [size_download] => 18125
    [speed_download] => 1307
    [speed_upload] => 10794
    [download_content_length] => 18125
    [upload_content_length] => 149597
    [starttransfer_time] => 0.586543
    [redirect_time] => 0
    [redirect_url] =>
    [primary_ip] => 69.64.69.77
    [certinfo] => Array
        (
        )

    [primary_port] => 80
    [local_ip] => 10.1.162.53
    [local_port] => 54870
)

O mesmo script php em outro servidor Ubuntu dá erro, veja os detalhes abaixo:

# php -f ocr-check.php
    * Hostname was NOT found in DNS cache
    *   Trying 69.64.69.77...
    * Connected to www.ocrwebservice.com (69.64.69.77) port 80 (#0)
    * Server auth using Basic with user 'done'
    > POST /restservices/processDocument?gettext=true HTTP/1.1
    Authorization: Basic ZG9uZTowRTVFQ0JDRS01OUZFLTRERkItQUU3RC1GQTRDMUU4MDlDQjU=
    Host: www.ocrwebservice.com
    Accept: */*
    Content-Type: application/json
    Content-Length: 149597
    Expect: 100-continue

    < HTTP/1.1 403 Forbidden
    < Content-Type: text/html
    * Server Microsoft-IIS/7.5 is not blacklisted
    < Server: Microsoft-IIS/7.5
    < X-Powered-By: ASP.NET
    < Date: Tue, 29 Nov 2016 12:08:17 GMT
    < Content-Length: 1233
    * HTTP error before end of send, stop sending
    <
    * Closing connection 0
    Array
    (
        [url] => http://www.ocrwebservice.com/restservices/processDocument?gettext=true
        [content_type] => text/html
        [http_code] => 403
        [header_size] => 160
        [request_size] => 259
        [filetime] => -1
        [ssl_verify_result] => 0
        [redirect_count] => 0
        [total_time] => 0.362763
        [namelookup_time] => 0.013694
        [connect_time] => 0.187885
        [pretransfer_time] => 0.188209
        [size_upload] => 0
        [size_download] => 1233
        [speed_download] => 3398
        [speed_upload] => 0
        [download_content_length] => 1233
        [upload_content_length] => 149597
        [starttransfer_time] => 0.36236
        [redirect_time] => 0
        [redirect_url] =>
        [primary_ip] => 69.64.69.77
        [certinfo] => Array
            (
            )

        [primary_port] => 80
        [local_ip] => 10.1.10.193
        [local_port] => 60971
    )

Precisa de ajuda urgente para descobrir por que isso está acontecendo? Servidor B, que é o nosso servidor de produção, onde não funciona. Como depuro esse problema?

Muito obrigado por qualquer ajuda.

Atenciosamente ... Ketan

    
por Raj Saraf 29.11.2016 / 14:18

0 respostas