I am trying to importing the theme-unit-test xml file from wordpress.org to my own wordpress(4.0) through import section. This is my php.ini setting
But still get the max execution time limit error. I tried one more way with .htaccess to my worpdress site.
php_value max_execution_time 3000
But it is also not working. This is the exact error:
Fatal error: Maximum execution time of 60 seconds exceeded in C:\wamp\www\omnipress\wp-includes\class-http.php on line 1498
Then i decided to go into the core file and checked the line has the following method:
private function stream_body( $handle, $data ) {
$data_length = strlen( $data );
if ( $this->max_body_length && ( strlen( $this->body ) + $data_length ) > $this->max_body_length )
$data = substr( $data, 0, ( $this->max_body_length - $data_length ) );
if ( $this->stream_handle ) {
$bytes_written = fwrite( $this->stream_handle, $data );
} else {
$this->body .= $data;
$bytes_written = $data_length;
}
// Upon event of this function returning less than strlen( $data ) curl will error with CURLE_WRITE_ERROR.
return $bytes_written;
}
And this method is called in the following CURL request:
if ( true === $r['blocking'] ) {
curl_setopt( $handle, CURLOPT_HEADERFUNCTION, array( $this, 'stream_headers' ) );
curl_setopt( $handle, CURLOPT_WRITEFUNCTION, array( $this, 'stream_body' ) );
}
This CURL request has the connection timeout parameter, that i set to 0 (means unlimited timeout)
$timeout = (int) ceil( 0 );
curl_setopt( $handle, CURLOPT_CONNECTTIMEOUT, $timeout );
curl_setopt( $handle, CURLOPT_TIMEOUT, $timeout );
But still it is not working :(
Please give me the right direction to achieve this, what i have missed. This is the link of test data that i want to import into my wordpress.
https://wpcom-themes.svn.automattic.com/demo/theme-unit-test-data.xml