Note that there are some explanatory texts on larger screens.

plurals
  1. POCurl PHP - strange internal server error
    primarykey
    data
    text
    <p>I have 2 servers. Server 1 has the engine/api. Server 2 has apache2 and my website.</p> <p>From the website I try do a simple curl to the engine. If the curl lasts more than ~15sec I get internal server error. If I run this script from bash (not using a browser) I get status 200 and an answer. When I run this script from localhost to the engine it runs ok. But, when I want connect from my server via browser to engine - I get the internal server error after 15s. </p> <p>I don't have any information in apache2 error_log. In php.ini I have the execution time = 120 and in apache I have 300 timeout. Do you have any idea what is wrong? (My server runs under debian lenny.) Sorry for my bad English.</p> <pre><code>$data = "Test text"; $_data['post'] = 'source_text='.urlencode($data); $_data['url'] = ENGINE_PATH; $_data['access'] = HTACCESS_LOGIN.':'.HTACCESS_PASSWORD; $_curl = curl_init(); if(!empty($_data['post'])){ curl_setopt($_curl, CURLOPT_POST, 1); curl_setopt($_curl, CURLOPT_POSTFIELDS, $_data['post']); } if(substr($_data['url'],0,5) == 'https'){ curl_setopt( $_curl, CURLOPT_SSL_VERIFYPEER, false ); } curl_setopt($_curl, CURLOPT_URL, $_data['url']); curl_setopt($_curl, CURLOPT_RETURNTRANSFER, 1); curl_setopt($_curl, CURLOPT_TIMEOUT, 60); curl_setopt($_curl, CURLOPT_CONNECTTIMEOUT, 60); curl_setopt($_curl, CURLOPT_HEADER, 0); curl_setopt($_curl, CURLOPT_FOLLOWLOCATION, 1); if(!empty($_data['access'])){ curl_setopt( $_curl, CURLOPT_USERPWD, $_data['access']); } $agent = 'Mozilla/5.0 (X11; U; Linux x86_64; pl-PL; rv:1.9.2.22) Gecko/20110905 Ubuntu/10.04 (lucid) Firefox/3.6.22'; if(!empty($_SERVER['HTTP_USER_AGENT'])){ $agent = $_SERVER['HTTP_USER_AGENT']; } curl_setopt($_curl, CURLOPT_USERAGENT, $agent); curl_setopt($_curl, CURLOPT_FAILONERROR, 1); $data = curl_exec($_curl); </code></pre> <p><em><strong>EDIT</em></strong></p> <p>I do simple script php -</p> <pre><code> echo '1'; sleep(16); echo '2'; </code></pre> <p>But I get 500 error too. I try this in apache2 and lighttpd. Than I pretty sure - this is error configuration on system...</p> <p><em><strong>EDIT</em></strong> Problem is solved. The problem was configuration of server pound. Thank you for help.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload