diff --git a/hphp/test/zend/bad/ext-curl/bug27023.php b/hphp/test/zend/bad/ext-curl/bug27023.php new file mode 100644 index 000000000..d49b15e19 --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/bug27023.php @@ -0,0 +1,30 @@ + '@' . __DIR__ . '/curl_testdata1.txt'); +curl_setopt($ch, CURLOPT_POSTFIELDS, $params); +var_dump(curl_exec($ch)); + +$params = array('file' => '@' . __DIR__ . '/curl_testdata1.txt;type=text/plain'); +curl_setopt($ch, CURLOPT_POSTFIELDS, $params); +var_dump(curl_exec($ch)); + +$params = array('file' => '@' . __DIR__ . '/curl_testdata1.txt;filename=foo.txt'); +curl_setopt($ch, CURLOPT_POSTFIELDS, $params); +var_dump(curl_exec($ch)); + +$params = array('file' => '@' . __DIR__ . '/curl_testdata1.txt;type=text/plain;filename=foo.txt'); +curl_setopt($ch, CURLOPT_POSTFIELDS, $params); +var_dump(curl_exec($ch)); + +$params = array('file' => '@' . __DIR__ . '/curl_testdata1.txt;filename=foo.txt;type=text/plain'); +curl_setopt($ch, CURLOPT_POSTFIELDS, $params); +var_dump(curl_exec($ch)); + + +curl_close($ch); +?> \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/bug27023.php.expectf b/hphp/test/zend/bad/ext-curl/bug27023.php.expectf new file mode 100644 index 000000000..ec18902bb --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/bug27023.php.expectf @@ -0,0 +1,5 @@ +string(%d) "curl_testdata1.txt|application/octet-stream" +string(%d) "curl_testdata1.txt|text/plain" +string(%d) "foo.txt|application/octet-stream" +string(%d) "foo.txt|text/plain" +string(%d) "foo.txt|text/plain" \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/bug48203.php b/hphp/test/zend/bad/ext-curl/bug48203.php new file mode 100644 index 000000000..633ba5a06 --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/bug48203.php @@ -0,0 +1,18 @@ + \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/bug48203.php.expectf b/hphp/test/zend/bad/ext-curl/bug48203.php.expectf new file mode 100644 index 000000000..bf60dbb6a --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/bug48203.php.expectf @@ -0,0 +1,3 @@ +HipHop Warning: %a +%A +Ok \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/bug48203_multi.php b/hphp/test/zend/bad/ext-curl/bug48203_multi.php new file mode 100644 index 000000000..72f82e96c --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/bug48203_multi.php @@ -0,0 +1,54 @@ + 1, + $curl_option => $fp, + CURLOPT_URL => getenv("PHP_CURL_HTTP_REMOTE_SERVER") + ); + + // we also need to set CURLOPT_VERBOSE to test CURLOPT_STDERR properly + if (CURLOPT_STDERR == $curl_option) { + $options[CURLOPT_VERBOSE] = 1; + } + + if (CURLOPT_INFILE == $curl_option) { + $options[CURLOPT_UPLOAD] = 1; + } + + curl_setopt_array($ch1, $options); + curl_setopt_array($ch2, $options); + + fclose($fp); // <-- premature close of $fp caused a crash! + + $mh = curl_multi_init(); + + curl_multi_add_handle($mh, $ch1); + curl_multi_add_handle($mh, $ch2); + + $active = 0; + do { + curl_multi_exec($mh, $active); + } while ($active > 0); + + curl_multi_remove_handle($mh, $ch1); + curl_multi_remove_handle($mh, $ch2); + curl_multi_close($mh); + + echo "Ok for $description\n"; +} + +$options_to_check = array( + "CURLOPT_STDERR", "CURLOPT_WRITEHEADER", "CURLOPT_FILE", "CURLOPT_INFILE" +); + +foreach($options_to_check as $option) { + checkForClosedFilePointer(constant($option), $option); +} + +?> \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/bug48203_multi.php.expectf b/hphp/test/zend/bad/ext-curl/bug48203_multi.php.expectf new file mode 100644 index 000000000..8b5b7f751 --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/bug48203_multi.php.expectf @@ -0,0 +1,15 @@ +HipHop Warning: %a +HipHop Warning: %a +%A +Ok for CURLOPT_STDERR +%A +HipHop Warning: %a +HipHop Warning: %a +Ok for CURLOPT_WRITEHEADER +HipHop Warning: %a +HipHop Warning: %a +%A +Ok for CURLOPT_FILE +HipHop Warning: %a +HipHop Warning: %a +Ok for CURLOPT_INFILE \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/bug48207.php b/hphp/test/zend/bad/ext-curl/bug48207.php new file mode 100644 index 000000000..5ee994a98 --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/bug48207.php @@ -0,0 +1,35 @@ + \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/bug48207.php.expectf b/hphp/test/zend/bad/ext-curl/bug48207.php.expectf new file mode 100644 index 000000000..fa8cee1ae --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/bug48207.php.expectf @@ -0,0 +1,3 @@ +HipHop Warning: %a +Hello World! +Hello World! \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/bug48514.php b/hphp/test/zend/bad/ext-curl/bug48514.php new file mode 100644 index 000000000..e2139aa6c --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/bug48514.php @@ -0,0 +1,11 @@ + \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/bug48514.php.expectf b/hphp/test/zend/bad/ext-curl/bug48514.php.expectf new file mode 100644 index 000000000..f1629a437 --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/bug48514.php.expectf @@ -0,0 +1,4 @@ +resource(%d) of type (curl) +%string|unicode%(4) "curl" +resource(%d) of type (curl_multi) +%string|unicode%(10) "curl_multi" \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/bug54798.php b/hphp/test/zend/bad/ext-curl/bug54798.php new file mode 100644 index 000000000..1ed27e399 --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/bug54798.php @@ -0,0 +1,43 @@ + \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/bug54798.php.expectf b/hphp/test/zend/bad/ext-curl/bug54798.php.expectf new file mode 100644 index 000000000..b850584e8 --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/bug54798.php.expectf @@ -0,0 +1,11 @@ +HipHop Warning: %a +* About to connect() %a +* Closing connection #%d +Ok for CURLOPT_STDERR +HipHop Warning: %a +Ok for CURLOPT_WRITEHEADER +HipHop Warning: %a +%a +Ok for CURLOPT_FILE +HipHop Warning: %a +Ok for CURLOPT_INFILE \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/bug55767.php b/hphp/test/zend/bad/ext-curl/bug55767.php new file mode 100644 index 000000000..1dc76d9b2 --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/bug55767.php @@ -0,0 +1,27 @@ +'World','Foo'=>'Bar',100=>'John Doe')); + curl_setopt($ch, CURLOPT_URL, $url); //set the url we want to use + + $curl_content = curl_exec($ch); + curl_close($ch); + + var_dump( $curl_content ); +?> +===DONE=== \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/bug55767.php.expectf b/hphp/test/zend/bad/ext-curl/bug55767.php.expectf new file mode 100644 index 000000000..e315992b0 --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/bug55767.php.expectf @@ -0,0 +1,17 @@ +*** Testing curl sending through GET an POST *** +string(203) "array(2) { + ["test"]=> + string(7) "getpost" + ["get_param"]=> + string(11) "Hello World" +} +array(3) { + ["Hello"]=> + string(5) "World" + ["Foo"]=> + string(3) "Bar" + [100]=> + string(8) "John Doe" +} +" +===DONE=== \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/bug63363.php b/hphp/test/zend/bad/ext-curl/bug63363.php new file mode 100644 index 000000000..026494076 --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/bug63363.php @@ -0,0 +1,11 @@ + \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/bug63363.php.expectf b/hphp/test/zend/bad/ext-curl/bug63363.php.expectf new file mode 100644 index 000000000..ffa491400 --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/bug63363.php.expectf @@ -0,0 +1,7 @@ +bool(true) +HipHop Notice: %a +bool(true) +bool(true) +HipHop Notice: %a +bool(true) +bool(true) \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/bug63795.php b/hphp/test/zend/bad/ext-curl/bug63795.php new file mode 100644 index 000000000..026494076 --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/bug63795.php @@ -0,0 +1,11 @@ + \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/bug63795.php.expectf b/hphp/test/zend/bad/ext-curl/bug63795.php.expectf new file mode 100644 index 000000000..ffa491400 --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/bug63795.php.expectf @@ -0,0 +1,7 @@ +bool(true) +HipHop Notice: %a +bool(true) +bool(true) +HipHop Notice: %a +bool(true) +bool(true) \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_CURLOPT_READDATA.php b/hphp/test/zend/bad/ext-curl/curl_CURLOPT_READDATA.php new file mode 100644 index 000000000..fba183bbe --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_CURLOPT_READDATA.php @@ -0,0 +1,28 @@ + + string(5) "world" + ["smurf"]=> + string(4) "blue" +} \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_basic_001.php b/hphp/test/zend/bad/ext-curl/curl_basic_001.php new file mode 100644 index 000000000..ecde0a50e --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_basic_001.php @@ -0,0 +1,29 @@ + +===DONE=== \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_basic_001.php.expectf b/hphp/test/zend/bad/ext-curl/curl_basic_001.php.expectf new file mode 100644 index 000000000..b2648da47 --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_basic_001.php.expectf @@ -0,0 +1,4 @@ +*** Testing curl_exec() : basic functionality *** +string(25) "Hello World! +Hello World!" +===DONE=== \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_basic_002.php b/hphp/test/zend/bad/ext-curl/curl_basic_002.php new file mode 100644 index 000000000..a70da6b7b --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_basic_002.php @@ -0,0 +1,25 @@ + +===DONE=== \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_basic_002.php.expectf b/hphp/test/zend/bad/ext-curl/curl_basic_002.php.expectf new file mode 100644 index 000000000..700db27bd --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_basic_002.php.expectf @@ -0,0 +1,4 @@ +*** Testing curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); *** +string(25) "Hello World! +Hello World!" +===DONE=== \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_basic_003.php b/hphp/test/zend/bad/ext-curl/curl_basic_003.php new file mode 100644 index 000000000..a7fb36b0a --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_basic_003.php @@ -0,0 +1,27 @@ + +===DONE=== \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_basic_003.php.expectf b/hphp/test/zend/bad/ext-curl/curl_basic_003.php.expectf new file mode 100644 index 000000000..7ec1727b2 --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_basic_003.php.expectf @@ -0,0 +1,17 @@ +*** Testing curl sending through GET an POST *** +string(208) "array(2) { + ["test"]=> + string(7) "getpost" + ["get_param"]=> + string(11) "Hello World" +} +array(3) { + ["Hello"]=> + string(5) "World" + ["Foo"]=> + string(3) "Bar" + ["Person"]=> + string(8) "John Doe" +} +" +===DONE=== \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_basic_004.php b/hphp/test/zend/bad/ext-curl/curl_basic_004.php new file mode 100644 index 000000000..224fd14f0 --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_basic_004.php @@ -0,0 +1,26 @@ + +===DONE=== \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_basic_004.php.expectf b/hphp/test/zend/bad/ext-curl/curl_basic_004.php.expectf new file mode 100644 index 000000000..df157627c --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_basic_004.php.expectf @@ -0,0 +1,3 @@ +*** Testing curl setting referer *** +string(19) "http://www.refer.er" +===DONE=== \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_basic_005.php b/hphp/test/zend/bad/ext-curl/curl_basic_005.php new file mode 100644 index 000000000..338dc9a54 --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_basic_005.php @@ -0,0 +1,26 @@ + +===DONE=== \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_basic_005.php.expectf b/hphp/test/zend/bad/ext-curl/curl_basic_005.php.expectf new file mode 100644 index 000000000..4bfee8507 --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_basic_005.php.expectf @@ -0,0 +1,3 @@ +*** Testing curl with user agent *** +string(9) "cURL phpt" +===DONE=== \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_basic_006.php b/hphp/test/zend/bad/ext-curl/curl_basic_006.php new file mode 100644 index 000000000..11d724e9e --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_basic_006.php @@ -0,0 +1,26 @@ +); ***' . "\n"; + + $url = "{$host}/get.php?test=get"; + $ch = curl_init(); + + ob_start(); // start output buffering + curl_setopt($ch, CURLOPT_URL, $url); //set the url we want to use + curl_setopt($ch, CURLOPT_WRITEFUNCTION, function ($ch, $data) { + echo 'Data: '.$data; + return strlen ($data); + }); + + curl_exec($ch); + curl_close($ch); +?> +===DONE=== \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_basic_006.php.expectf b/hphp/test/zend/bad/ext-curl/curl_basic_006.php.expectf new file mode 100644 index 000000000..076f43f1d --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_basic_006.php.expectf @@ -0,0 +1,3 @@ +*** Testing curl_setopt($ch, CURLOPT_WRITEFUNCTION, ); *** +Data: Hello World! +Hello World!===DONE=== \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_basic_011.php b/hphp/test/zend/bad/ext-curl/curl_basic_011.php new file mode 100644 index 000000000..7026b310f --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_basic_011.php @@ -0,0 +1,26 @@ + +===DONE=== \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_basic_011.php.expectf b/hphp/test/zend/bad/ext-curl/curl_basic_011.php.expectf new file mode 100644 index 000000000..97906c901 --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_basic_011.php.expectf @@ -0,0 +1,3 @@ +*** Testing curl with cookie *** +string(3) "bar" +===DONE=== \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_basic_012.php b/hphp/test/zend/bad/ext-curl/curl_basic_012.php new file mode 100644 index 000000000..c090f7c38 --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_basic_012.php @@ -0,0 +1,26 @@ + +===DONE=== \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_basic_012.php.expectf b/hphp/test/zend/bad/ext-curl/curl_basic_012.php.expectf new file mode 100644 index 000000000..3996efd71 --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_basic_012.php.expectf @@ -0,0 +1,3 @@ +*** Testing curl with HTTP/1.0 *** +string(8) "HTTP/1.0" +===DONE=== \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_basic_013.php b/hphp/test/zend/bad/ext-curl/curl_basic_013.php new file mode 100644 index 000000000..884b02cad --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_basic_013.php @@ -0,0 +1,26 @@ + +===DONE=== \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_basic_013.php.expectf b/hphp/test/zend/bad/ext-curl/curl_basic_013.php.expectf new file mode 100644 index 000000000..1bd8f3fb0 --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_basic_013.php.expectf @@ -0,0 +1,3 @@ +*** Testing curl with HTTP/1.1 *** +string(8) "HTTP/1.1" +===DONE=== \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_basic_014.php b/hphp/test/zend/bad/ext-curl/curl_basic_014.php new file mode 100644 index 000000000..098ce1703 --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_basic_014.php @@ -0,0 +1,5 @@ + +===DONE=== \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_basic_014.php.expectf b/hphp/test/zend/bad/ext-curl/curl_basic_014.php.expectf new file mode 100644 index 000000000..12d7c54ec --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_basic_014.php.expectf @@ -0,0 +1,2 @@ +resource(%d) of type (curl) +===DONE=== \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_basic_016.php b/hphp/test/zend/bad/ext-curl/curl_basic_016.php new file mode 100644 index 000000000..59f40dd95 --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_basic_016.php @@ -0,0 +1,6 @@ + +===DONE=== \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_basic_016.php.expectf b/hphp/test/zend/bad/ext-curl/curl_basic_016.php.expectf new file mode 100644 index 000000000..b9497d994 --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_basic_016.php.expectf @@ -0,0 +1,43 @@ +array(2%d) { + [%u|b%"url"]=> + string(0) "" + ["content_type"]=> + NULL + ["http_code"]=> + int(0) + ["header_size"]=> + int(0) + ["request_size"]=> + int(0) + ["filetime"]=> + int(0) + ["ssl_verify_result"]=> + int(0) + ["redirect_count"]=> + int(0) + ["total_time"]=> + float(0) + ["namelookup_time"]=> + float(0) + ["connect_time"]=> + float(0) + ["pretransfer_time"]=> + float(0) + ["size_upload"]=> + float(0) + ["size_download"]=> + float(0) + ["speed_download"]=> + float(0) + ["speed_upload"]=> + float(0) + ["download_content_length"]=> + float(%f) + ["upload_content_length"]=> + float(%f) + ["starttransfer_time"]=> + float(0) + ["redirect_time"]=> + float(0) +} +===DONE=== \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_basic_017.php b/hphp/test/zend/bad/ext-curl/curl_basic_017.php new file mode 100644 index 000000000..aa5e9da35 --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_basic_017.php @@ -0,0 +1,55 @@ + curl_init(), + 1 => curl_init(), + 2 => curl_init(), + ); + + ob_start(); // start output buffering + + curl_setopt($chs[0], CURLOPT_URL, $url); //set the url we want to use + curl_setopt($chs[1], CURLOPT_URL, $url); //set the url we want to use + curl_setopt($chs[2], CURLOPT_URL, $url); //set the url we want to use + + $mh = curl_multi_init(); + + // add handlers + curl_multi_add_handle($mh, $chs[0]); + curl_multi_add_handle($mh, $chs[1]); + curl_multi_add_handle($mh, $chs[2]); + + $running=null; + //execute the handles + $state = null; + do { + $state = curl_multi_exec($mh, $running); + } while ($running > 0); + + //close the handles + curl_multi_remove_handle($mh, $chs[0]); + curl_multi_remove_handle($mh, $chs[1]); + curl_multi_remove_handle($mh, $chs[2]); + curl_multi_close($mh); + + $curl_content = ob_get_contents(); + ob_end_clean(); + + if($state === CURLM_OK) { + var_dump( $curl_content ); + } else { + echo "curl_exec returned false"; + } +?> +===DONE=== \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_basic_017.php.expectf b/hphp/test/zend/bad/ext-curl/curl_basic_017.php.expectf new file mode 100644 index 000000000..f5f4a66b8 --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_basic_017.php.expectf @@ -0,0 +1,6 @@ +*** Testing curl_exec() : basic functionality *** +string(75) "Hello World! +Hello World!Hello World! +Hello World!Hello World! +Hello World!" +===DONE=== \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_basic_018.php b/hphp/test/zend/bad/ext-curl/curl_basic_018.php new file mode 100644 index 000000000..4e3f86442 --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_basic_018.php @@ -0,0 +1,58 @@ + curl_init(), + 1 => curl_init(), + 2 => curl_init(), + ); + + ob_start(); // start output buffering + + $options = array( + CURLOPT_RETURNTRANSFER => 1, + CURLOPT_URL => $url, + ); + + curl_setopt_array($chs[0], $options); //set the options + curl_setopt_array($chs[1], $options); //set the options + curl_setopt_array($chs[2], $options); //set the options + + $mh = curl_multi_init(); + + // add handlers + curl_multi_add_handle($mh, $chs[0]); + curl_multi_add_handle($mh, $chs[1]); + curl_multi_add_handle($mh, $chs[2]); + + $running=null; + //execute the handles + do { + curl_multi_exec($mh, $running); + } while ($running > 0); + + $curl_content = ''; + $curl_content .= curl_multi_getcontent($chs[0]); + $curl_content .= curl_multi_getcontent($chs[1]); + $curl_content .= curl_multi_getcontent($chs[2]); + + //close the handles + curl_multi_remove_handle($mh, $chs[0]); + curl_multi_remove_handle($mh, $chs[1]); + curl_multi_remove_handle($mh, $chs[2]); + curl_multi_close($mh); + + var_dump( $curl_content ); + +?> +===DONE=== \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_basic_018.php.expectf b/hphp/test/zend/bad/ext-curl/curl_basic_018.php.expectf new file mode 100644 index 000000000..0acd60bb7 --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_basic_018.php.expectf @@ -0,0 +1,6 @@ +*** Testing curl_exec() : basic functionality *** +%unicode|string%(75) "Hello World! +Hello World!Hello World! +Hello World!Hello World! +Hello World!" +===DONE=== \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_basic_019.php b/hphp/test/zend/bad/ext-curl/curl_basic_019.php new file mode 100644 index 000000000..4d2d7b17d --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_basic_019.php @@ -0,0 +1,14 @@ + +===DONE=== \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_basic_019.php.expectf b/hphp/test/zend/bad/ext-curl/curl_basic_019.php.expectf new file mode 100644 index 000000000..a8ffa1592 --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_basic_019.php.expectf @@ -0,0 +1,3 @@ +Hello World! +Hello World!bool(true) +===DONE=== \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_basic_020.php b/hphp/test/zend/bad/ext-curl/curl_basic_020.php new file mode 100644 index 000000000..5e02793bf --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_basic_020.php @@ -0,0 +1,11 @@ + +===DONE=== \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_basic_020.php.expectf b/hphp/test/zend/bad/ext-curl/curl_basic_020.php.expectf new file mode 100644 index 000000000..f6930c08d --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_basic_020.php.expectf @@ -0,0 +1,3 @@ +Hello World! +Hello World!int(200) +===DONE=== \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_basic_021.php b/hphp/test/zend/bad/ext-curl/curl_basic_021.php new file mode 100644 index 000000000..8f72033c9 --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_basic_021.php @@ -0,0 +1,11 @@ + +===DONE=== \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_basic_021.php.expectf b/hphp/test/zend/bad/ext-curl/curl_basic_021.php.expectf new file mode 100644 index 000000000..91719cde6 --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_basic_021.php.expectf @@ -0,0 +1,2 @@ +%unicode|string%(24) "text/plain;charset=utf-8" +===DONE=== \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_close_basic.php b/hphp/test/zend/bad/ext-curl/curl_close_basic.php new file mode 100644 index 000000000..e90315a4b --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_close_basic.php @@ -0,0 +1,6 @@ + +===DONE=== \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_close_basic.php.expectf b/hphp/test/zend/bad/ext-curl/curl_close_basic.php.expectf new file mode 100644 index 000000000..7268374e9 --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_close_basic.php.expectf @@ -0,0 +1,2 @@ +resource(%d) of type (Unknown) +===DONE=== \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_copy_handle_basic_001.php b/hphp/test/zend/bad/ext-curl/curl_copy_handle_basic_001.php new file mode 100644 index 000000000..328c5dc4e --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_copy_handle_basic_001.php @@ -0,0 +1,22 @@ + +===DONE=== \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_copy_handle_basic_001.php.expectf b/hphp/test/zend/bad/ext-curl/curl_copy_handle_basic_001.php.expectf new file mode 100644 index 000000000..e53a8e706 --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_copy_handle_basic_001.php.expectf @@ -0,0 +1,11 @@ +*** Testing curl copy handle with simple GET *** +string(106) "array(2) { + ["test"]=> + string(7) "getpost" + ["get_param"]=> + string(11) "Hello World" +} +array(0) { +} +" +===DONE=== \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_copy_handle_basic_002.php b/hphp/test/zend/bad/ext-curl/curl_copy_handle_basic_002.php new file mode 100644 index 000000000..747ee4993 --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_copy_handle_basic_002.php @@ -0,0 +1,23 @@ + +===DONE=== \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_copy_handle_basic_002.php.expectf b/hphp/test/zend/bad/ext-curl/curl_copy_handle_basic_002.php.expectf new file mode 100644 index 000000000..142b42ce0 --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_copy_handle_basic_002.php.expectf @@ -0,0 +1,15 @@ +*** Testing curl copy handle with simple POST *** +string(163) "array(1) { + ["test"]=> + string(7) "getpost" +} +array(3) { + ["Hello"]=> + string(5) "World" + ["Foo"]=> + string(3) "Bar" + ["Person"]=> + string(8) "John Doe" +} +" +===DONE=== \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_copy_handle_basic_004.php b/hphp/test/zend/bad/ext-curl/curl_copy_handle_basic_004.php new file mode 100644 index 000000000..a5b28de1d --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_copy_handle_basic_004.php @@ -0,0 +1,24 @@ + +===DONE=== \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_copy_handle_basic_004.php.expectf b/hphp/test/zend/bad/ext-curl/curl_copy_handle_basic_004.php.expectf new file mode 100644 index 000000000..74d27b1b5 --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_copy_handle_basic_004.php.expectf @@ -0,0 +1,11 @@ +*** Test curl_copy_handle() after exec() *** +string(106) "array(2) { + ["test"]=> + string(7) "getpost" + ["get_param"]=> + string(11) "Hello World" +} +array(0) { +} +" +===DONE=== \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_copy_handle_basic_005.php b/hphp/test/zend/bad/ext-curl/curl_copy_handle_basic_005.php new file mode 100644 index 000000000..b9a7bcfec --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_copy_handle_basic_005.php @@ -0,0 +1,26 @@ + +===DONE=== \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_copy_handle_basic_005.php.expectf b/hphp/test/zend/bad/ext-curl/curl_copy_handle_basic_005.php.expectf new file mode 100644 index 000000000..7b06c3883 --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_copy_handle_basic_005.php.expectf @@ -0,0 +1,15 @@ +*** Test curl_copy_handle() after exec() with POST *** +string(163) "array(1) { + ["test"]=> + string(7) "getpost" +} +array(3) { + ["Hello"]=> + string(5) "World" + ["Foo"]=> + string(3) "Bar" + ["Person"]=> + string(8) "John Doe" +} +" +===DONE=== \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_copy_handle_basic_006.php b/hphp/test/zend/bad/ext-curl/curl_copy_handle_basic_006.php new file mode 100644 index 000000000..5022ec0c6 --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_copy_handle_basic_006.php @@ -0,0 +1,24 @@ + +===DONE=== \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_copy_handle_basic_006.php.expectf b/hphp/test/zend/bad/ext-curl/curl_copy_handle_basic_006.php.expectf new file mode 100644 index 000000000..5b4e78ccc --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_copy_handle_basic_006.php.expectf @@ -0,0 +1,4 @@ +*** Testing curl copy handle with User Agent *** +string(9) "cURL phpt" +string(9) "cURL phpt" +===DONE=== \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_copy_handle_basic_007.php b/hphp/test/zend/bad/ext-curl/curl_copy_handle_basic_007.php new file mode 100644 index 000000000..281083886 --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_copy_handle_basic_007.php @@ -0,0 +1,24 @@ + "World", "Foo" => "Bar", "Person" => "John Doe")); + curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:')); // Disable Expect: header (lighttpd does not support it :) + curl_setopt($ch, CURLOPT_URL, $url); //set the url we want to use + + $copy = curl_copy_handle($ch); + curl_close($ch); + + $curl_content = curl_exec($copy); + curl_close($copy); + + var_dump( $curl_content ); +?> +===DONE=== \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_copy_handle_basic_007.php.expectf b/hphp/test/zend/bad/ext-curl/curl_copy_handle_basic_007.php.expectf new file mode 100644 index 000000000..b72782bfd --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_copy_handle_basic_007.php.expectf @@ -0,0 +1,15 @@ +*** Testing curl copy handle with simple POST using array as arguments *** +string(163) "array(1) { + ["test"]=> + string(7) "getpost" +} +array(3) { + ["Hello"]=> + string(5) "World" + ["Foo"]=> + string(3) "Bar" + ["Person"]=> + string(8) "John Doe" +} +" +===DONE=== \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_copy_handle_basic_008.php b/hphp/test/zend/bad/ext-curl/curl_copy_handle_basic_008.php new file mode 100644 index 000000000..83d7b16bf --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_copy_handle_basic_008.php @@ -0,0 +1,15 @@ + \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_copy_handle_basic_008.php.expectf b/hphp/test/zend/bad/ext-curl/curl_copy_handle_basic_008.php.expectf new file mode 100644 index 000000000..9ff05612d --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_copy_handle_basic_008.php.expectf @@ -0,0 +1,4 @@ +Hello World! +Hello World! +Hello World! +Hello World! \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_file_deleted_before_curl_close.php b/hphp/test/zend/bad/ext-curl/curl_file_deleted_before_curl_close.php new file mode 100644 index 000000000..1492cc53b --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_file_deleted_before_curl_close.php @@ -0,0 +1,26 @@ + \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_file_deleted_before_curl_close.php.expectf b/hphp/test/zend/bad/ext-curl/curl_file_deleted_before_curl_close.php.expectf new file mode 100644 index 000000000..82df35664 --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_file_deleted_before_curl_close.php.expectf @@ -0,0 +1,2 @@ +* Closing connection #%d +Closed correctly \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_ftp_pasv.php b/hphp/test/zend/bad/ext-curl/curl_ftp_pasv.php new file mode 100644 index 000000000..d47303b97 --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_ftp_pasv.php @@ -0,0 +1,45 @@ + +===DONE=== \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_ftp_pasv.php.expectf b/hphp/test/zend/bad/ext-curl/curl_ftp_pasv.php.expectf new file mode 100644 index 000000000..e7c042967 --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_ftp_pasv.php.expectf @@ -0,0 +1,2 @@ +bool(true) +===DONE=== \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_multi_close_basic.php b/hphp/test/zend/bad/ext-curl/curl_multi_close_basic.php new file mode 100644 index 000000000..f7cf22398 --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_multi_close_basic.php @@ -0,0 +1,6 @@ + +===DONE=== \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_multi_close_basic.php.expectf b/hphp/test/zend/bad/ext-curl/curl_multi_close_basic.php.expectf new file mode 100644 index 000000000..7268374e9 --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_multi_close_basic.php.expectf @@ -0,0 +1,2 @@ +resource(%d) of type (Unknown) +===DONE=== \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_multi_getcontent_basic3.php b/hphp/test/zend/bad/ext-curl/curl_multi_getcontent_basic3.php new file mode 100644 index 000000000..58344e997 --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_multi_getcontent_basic3.php @@ -0,0 +1,39 @@ +0); + + $results1=curl_multi_getcontent($ch1); + $results2=curl_multi_getcontent($ch2); + + //CLOSE + curl_multi_remove_handle($mh,$ch1); + curl_multi_remove_handle($mh,$ch2); + curl_multi_close($mh); + + echo $results1; + echo $results2; + +?> \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_multi_getcontent_basic3.php.expectf b/hphp/test/zend/bad/ext-curl/curl_multi_getcontent_basic3.php.expectf new file mode 100644 index 000000000..aaf55b7b4 --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_multi_getcontent_basic3.php.expectf @@ -0,0 +1,9 @@ +array(2) { + ["test"]=> + string(7) "getpost" + ["get_param"]=> + string(11) "Hello World" +} +array(0) { +} +CURL2 \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_multi_getcontent_error1.php b/hphp/test/zend/bad/ext-curl/curl_multi_getcontent_error1.php new file mode 100644 index 000000000..0c2d5bb4d --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_multi_getcontent_error1.php @@ -0,0 +1,38 @@ +0); + + $results1=curl_multi_getcontent(); //no parameter + $results2=curl_multi_getcontent($ch2); + + //CLOSE + curl_multi_remove_handle($mh,$ch1); + curl_multi_remove_handle($mh,$ch2); + curl_multi_close($mh); + + echo $results1; + echo $results2; + +?> \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_multi_getcontent_error1.php.expectf b/hphp/test/zend/bad/ext-curl/curl_multi_getcontent_error1.php.expectf new file mode 100644 index 000000000..43f65446c --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_multi_getcontent_error1.php.expectf @@ -0,0 +1,2 @@ +HipHop Warning: %a +CURL2 \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_multi_getcontent_error2.php b/hphp/test/zend/bad/ext-curl/curl_multi_getcontent_error2.php new file mode 100644 index 000000000..06d639fab --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_multi_getcontent_error2.php @@ -0,0 +1,38 @@ +0); + + $results1=curl_multi_getcontent($ch1,$ch2); //no parameter + $results2=curl_multi_getcontent($ch2); + + //CLOSE + curl_multi_remove_handle($mh,$ch1); + curl_multi_remove_handle($mh,$ch2); + curl_multi_close($mh); + + echo $results1; + echo $results2; + +?> \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_multi_getcontent_error2.php.expectf b/hphp/test/zend/bad/ext-curl/curl_multi_getcontent_error2.php.expectf new file mode 100644 index 000000000..43f65446c --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_multi_getcontent_error2.php.expectf @@ -0,0 +1,2 @@ +HipHop Warning: %a +CURL2 \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_multi_getcontent_error3.php b/hphp/test/zend/bad/ext-curl/curl_multi_getcontent_error3.php new file mode 100644 index 000000000..ea8c68743 --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_multi_getcontent_error3.php @@ -0,0 +1,40 @@ +0); + + $ch1="string"; + + $results1=curl_multi_getcontent($ch1); //incorrect parameter type + $results2=curl_multi_getcontent($ch2); + + //CLOSE + //curl_multi_remove_handle($mh,$ch1); + curl_multi_remove_handle($mh,$ch2); + curl_multi_close($mh); + + echo $results1; + echo $results2; + +?> \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_multi_getcontent_error3.php.expectf b/hphp/test/zend/bad/ext-curl/curl_multi_getcontent_error3.php.expectf new file mode 100644 index 000000000..43f65446c --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_multi_getcontent_error3.php.expectf @@ -0,0 +1,2 @@ +HipHop Warning: %a +CURL2 \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_multi_getcontent_error4.php b/hphp/test/zend/bad/ext-curl/curl_multi_getcontent_error4.php new file mode 100644 index 000000000..ae96c4664 --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_multi_getcontent_error4.php @@ -0,0 +1,39 @@ +0); + + + $results1=curl_multi_getcontent($ch1); //incorrect parameter type + $results2=curl_multi_getcontent($ch2); + + //CLOSE + //curl_multi_remove_handle($mh,$ch1); + curl_multi_remove_handle($mh,$ch2); + curl_multi_close($mh); + + echo $results1; + echo $results2; + +?> \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_multi_getcontent_error4.php.expectf b/hphp/test/zend/bad/ext-curl/curl_multi_getcontent_error4.php.expectf new file mode 100644 index 000000000..4f2a3d117 --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_multi_getcontent_error4.php.expectf @@ -0,0 +1,9 @@ +HipHop Notice: %a +HipHop Warning: %a +HipHop Notice: %a +HipHop Warning: %a +HipHop Notice: %a +HipHop Warning: %a +HipHop Notice: %a +HipHop Warning: %a +CURL2 \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_multi_init_basic.php b/hphp/test/zend/bad/ext-curl/curl_multi_init_basic.php new file mode 100644 index 000000000..220e56c01 --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_multi_init_basic.php @@ -0,0 +1,18 @@ + +===DONE=== \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_multi_init_basic.php.expectf b/hphp/test/zend/bad/ext-curl/curl_multi_init_basic.php.expectf new file mode 100644 index 000000000..b5273d828 --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_multi_init_basic.php.expectf @@ -0,0 +1,4 @@ +*** Testing curl_multi_init(void); *** +resource(%d) of type (curl_multi) +resource(%d) of type (Unknown) +===DONE=== \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_multi_segfault.php b/hphp/test/zend/bad/ext-curl/curl_multi_segfault.php new file mode 100644 index 000000000..02f420c3d --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_multi_segfault.php @@ -0,0 +1,42 @@ + +===DONE=== \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_multi_segfault.php.expectf b/hphp/test/zend/bad/ext-curl/curl_multi_segfault.php.expectf new file mode 100644 index 000000000..e7c042967 --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_multi_segfault.php.expectf @@ -0,0 +1,2 @@ +bool(true) +===DONE=== \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_setopt_CURLOPT_READFUNCTION.php b/hphp/test/zend/bad/ext-curl/curl_setopt_CURLOPT_READFUNCTION.php new file mode 100644 index 000000000..065a7fe8d --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_setopt_CURLOPT_READFUNCTION.php @@ -0,0 +1,39 @@ + +===DONE=== \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_setopt_CURLOPT_READFUNCTION.php.expectf b/hphp/test/zend/bad/ext-curl/curl_setopt_CURLOPT_READFUNCTION.php.expectf new file mode 100644 index 000000000..c2a14983b --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_setopt_CURLOPT_READFUNCTION.php.expectf @@ -0,0 +1,2 @@ +string(27) "custom:contents of tempfile" +===DONE=== \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_setopt_basic002.php b/hphp/test/zend/bad/ext-curl/curl_setopt_basic002.php new file mode 100644 index 000000000..d78468e67 --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_setopt_basic002.php @@ -0,0 +1,38 @@ + \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_setopt_basic002.php.expectf b/hphp/test/zend/bad/ext-curl/curl_setopt_basic002.php.expectf new file mode 100644 index 000000000..4bed66cab --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_setopt_basic002.php.expectf @@ -0,0 +1,4 @@ +*** Testing curl_setopt with CURLOPT_STDERR +string(%d) "%S" +string(%d) "%S" +* Closing connection #%d \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_setopt_basic003.php b/hphp/test/zend/bad/ext-curl/curl_setopt_basic003.php new file mode 100644 index 000000000..9dbfbeb6e --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_setopt_basic003.php @@ -0,0 +1,29 @@ + \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_setopt_basic003.php.expectf b/hphp/test/zend/bad/ext-curl/curl_setopt_basic003.php.expectf new file mode 100644 index 000000000..83b7fe6d1 --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_setopt_basic003.php.expectf @@ -0,0 +1,4 @@ +*** curl_setopt() call with CURLOPT_HTTPHEADER +HipHop Warning: %a +bool(false) +bool(true) \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_setopt_basic004.php b/hphp/test/zend/bad/ext-curl/curl_setopt_basic004.php new file mode 100644 index 000000000..2667030a3 --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_setopt_basic004.php @@ -0,0 +1,31 @@ + \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_setopt_basic004.php.expectf b/hphp/test/zend/bad/ext-curl/curl_setopt_basic004.php.expectf new file mode 100644 index 000000000..9e4bd312b --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_setopt_basic004.php.expectf @@ -0,0 +1,4 @@ +*** curl_setopt() call with CURLOPT_RETURNTRANSFER set to 1 +string(%d) "%a" +*** curl_setopt() call with CURLOPT_RETURNTRANSFER set to 0 +bool(true) \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_setopt_error.php b/hphp/test/zend/bad/ext-curl/curl_setopt_error.php new file mode 100644 index 000000000..f0ce50ad0 --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_setopt_error.php @@ -0,0 +1,17 @@ + \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_setopt_error.php.expectf b/hphp/test/zend/bad/ext-curl/curl_setopt_error.php.expectf new file mode 100644 index 000000000..f9d12ffa3 --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_setopt_error.php.expectf @@ -0,0 +1,10 @@ +*** curl_setopt() call with incorrect parameters +HipHop Warning: %a +HipHop Warning: %a +HipHop Warning: %a +HipHop Warning: %a +HipHop Warning: %a +HipHop Warning: %a +HipHop Warning: %a +HipHop Warning: %a +HipHop Warning: %a \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_version_error.php b/hphp/test/zend/bad/ext-curl/curl_version_error.php new file mode 100644 index 000000000..85385838a --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_version_error.php @@ -0,0 +1,15 @@ + +===Done=== \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_version_error.php.expectf b/hphp/test/zend/bad/ext-curl/curl_version_error.php.expectf new file mode 100644 index 000000000..f2aa0a9ba --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_version_error.php.expectf @@ -0,0 +1,6 @@ +*** Testing curl_version() : error conditions *** + +-- Testing curl_version() function with more than expected no. of arguments -- +HipHop Warning: %a +NULL +===Done=== \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_version_variation1.php b/hphp/test/zend/bad/ext-curl/curl_version_variation1.php new file mode 100644 index 000000000..750c7f0c9 --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_version_variation1.php @@ -0,0 +1,84 @@ + +===Done=== \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_version_variation1.php.expectf b/hphp/test/zend/bad/ext-curl/curl_version_variation1.php.expectf new file mode 100644 index 000000000..7014ad9b1 --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_version_variation1.php.expectf @@ -0,0 +1,60 @@ +*** Testing curl_version() function: with unexpected inputs for 'age' argument *** +-- Iteration 1 -- +bool(true) +-- Iteration 2 -- +bool(true) +-- Iteration 3 -- +bool(true) +-- Iteration 4 -- +bool(true) +-- Iteration 5 -- +bool(true) +-- Iteration 6 -- +bool(true) +-- Iteration 7 -- +bool(true) +-- Iteration 8 -- +bool(true) +-- Iteration 9 -- +bool(true) +-- Iteration 10 -- +HipHop Warning: %a +bool(false) +-- Iteration 11 -- +HipHop Warning: %a +bool(false) +-- Iteration 12 -- +HipHop Warning: %a +bool(false) +-- Iteration 13 -- +HipHop Warning: %a +bool(false) +-- Iteration 14 -- +HipHop Warning: %a +bool(false) +-- Iteration 15 -- +HipHop Notice: %a +bool(true) +-- Iteration 16 -- +bool(true) +-- Iteration 17 -- +bool(true) +-- Iteration 18 -- +bool(true) +-- Iteration 19 -- +bool(true) +-- Iteration 20 -- +bool(true) +-- Iteration 21 -- +bool(true) +-- Iteration 22 -- +HipHop Warning: %a +bool(false) +-- Iteration 23 -- +HipHop Warning: %a +bool(false) +-- Iteration 24 -- +bool(true) +-- Iteration 25 -- +bool(true) +===Done=== \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_writeheader_callback.php b/hphp/test/zend/bad/ext-curl/curl_writeheader_callback.php new file mode 100644 index 000000000..af19f3b24 --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_writeheader_callback.php @@ -0,0 +1,18 @@ + \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-curl/curl_writeheader_callback.php.expectf b/hphp/test/zend/bad/ext-curl/curl_writeheader_callback.php.expectf new file mode 100644 index 000000000..7bc74ea2b --- /dev/null +++ b/hphp/test/zend/bad/ext-curl/curl_writeheader_callback.php.expectf @@ -0,0 +1 @@ +HTTP/1.1 %d %s \ No newline at end of file diff --git a/hphp/test/zend/good/ext-curl/bug45161.php b/hphp/test/zend/good/ext-curl/bug45161.php new file mode 100644 index 000000000..fb1dfd0e0 --- /dev/null +++ b/hphp/test/zend/good/ext-curl/bug45161.php @@ -0,0 +1,31 @@ + \ No newline at end of file diff --git a/hphp/test/zend/good/ext-curl/bug45161.php.expectf b/hphp/test/zend/good/ext-curl/bug45161.php.expectf new file mode 100644 index 000000000..465701e34 --- /dev/null +++ b/hphp/test/zend/good/ext-curl/bug45161.php.expectf @@ -0,0 +1 @@ +PASS \ No newline at end of file diff --git a/hphp/test/zend/good/ext-curl/bug46711.php b/hphp/test/zend/good/ext-curl/bug46711.php new file mode 100644 index 000000000..691e3ea1c --- /dev/null +++ b/hphp/test/zend/good/ext-curl/bug46711.php @@ -0,0 +1,17 @@ + TRUE, + CURLOPT_BINARYTRANSFER => TRUE +); + +curl_setopt( $ch, CURLOPT_AUTOREFERER , TRUE ); + +foreach( $opt as $option => $value ) { + curl_setopt( $ch, $option, $value ); +} + +var_dump($opt); // with this bug, $opt[58] becomes NULL + +?> \ No newline at end of file diff --git a/hphp/test/zend/good/ext-curl/bug46711.php.expectf b/hphp/test/zend/good/ext-curl/bug46711.php.expectf new file mode 100644 index 000000000..70b6c40d1 --- /dev/null +++ b/hphp/test/zend/good/ext-curl/bug46711.php.expectf @@ -0,0 +1,6 @@ +array(2) { + [58]=> + bool(true) + [19914]=> + bool(true) +} \ No newline at end of file diff --git a/hphp/test/zend/good/ext-curl/bug46739.php b/hphp/test/zend/good/ext-curl/bug46739.php new file mode 100644 index 000000000..d310bfdda --- /dev/null +++ b/hphp/test/zend/good/ext-curl/bug46739.php @@ -0,0 +1,8 @@ + \ No newline at end of file diff --git a/hphp/test/zend/good/ext-curl/bug46739.php.expectf b/hphp/test/zend/good/ext-curl/bug46739.php.expectf new file mode 100644 index 000000000..c2c88d097 --- /dev/null +++ b/hphp/test/zend/good/ext-curl/bug46739.php.expectf @@ -0,0 +1 @@ +set \ No newline at end of file diff --git a/hphp/test/zend/good/ext-curl/bug52202.php b/hphp/test/zend/good/ext-curl/bug52202.php new file mode 100644 index 000000000..7d8b6e600 --- /dev/null +++ b/hphp/test/zend/good/ext-curl/bug52202.php @@ -0,0 +1,7 @@ + \ No newline at end of file diff --git a/hphp/test/zend/good/ext-curl/bug62839.php.expectf b/hphp/test/zend/good/ext-curl/bug62839.php.expectf new file mode 100644 index 000000000..84ce3dcb4 --- /dev/null +++ b/hphp/test/zend/good/ext-curl/bug62839.php.expectf @@ -0,0 +1 @@ +DONE! \ No newline at end of file diff --git a/hphp/test/zend/good/ext-curl/curl_basic_007.php b/hphp/test/zend/good/ext-curl/curl_basic_007.php new file mode 100644 index 000000000..227a4dc64 --- /dev/null +++ b/hphp/test/zend/good/ext-curl/curl_basic_007.php @@ -0,0 +1,14 @@ + \ No newline at end of file diff --git a/hphp/test/zend/good/ext-curl/curl_basic_007.php.expectf b/hphp/test/zend/good/ext-curl/curl_basic_007.php.expectf new file mode 100644 index 000000000..1c7ef3d28 --- /dev/null +++ b/hphp/test/zend/good/ext-curl/curl_basic_007.php.expectf @@ -0,0 +1,2 @@ +%string|unicode%(%d) "No URL set!%w" +int(3) \ No newline at end of file diff --git a/hphp/test/zend/good/ext-curl/curl_basic_008.php b/hphp/test/zend/good/ext-curl/curl_basic_008.php new file mode 100644 index 000000000..5f36be595 --- /dev/null +++ b/hphp/test/zend/good/ext-curl/curl_basic_008.php @@ -0,0 +1,13 @@ + \ No newline at end of file diff --git a/hphp/test/zend/good/ext-curl/curl_basic_008.php.expectf b/hphp/test/zend/good/ext-curl/curl_basic_008.php.expectf new file mode 100644 index 000000000..2e0c5438e --- /dev/null +++ b/hphp/test/zend/good/ext-curl/curl_basic_008.php.expectf @@ -0,0 +1,2 @@ +%unicode|string%(%d) "%r(Couldn't resolve host|Could not resolve host:)%r %Swww.%s" +int(6) \ No newline at end of file diff --git a/hphp/test/zend/good/ext-curl/curl_basic_009.php b/hphp/test/zend/good/ext-curl/curl_basic_009.php new file mode 100644 index 000000000..d0735347e --- /dev/null +++ b/hphp/test/zend/good/ext-curl/curl_basic_009.php @@ -0,0 +1,13 @@ + \ No newline at end of file diff --git a/hphp/test/zend/good/ext-curl/curl_basic_009.php.expectf b/hphp/test/zend/good/ext-curl/curl_basic_009.php.expectf new file mode 100644 index 000000000..b4c44389c --- /dev/null +++ b/hphp/test/zend/good/ext-curl/curl_basic_009.php.expectf @@ -0,0 +1,2 @@ +%unicode|string%(%d) "%Srotocol%s" +int(1) \ No newline at end of file diff --git a/hphp/test/zend/good/ext-curl/curl_basic_010.php b/hphp/test/zend/good/ext-curl/curl_basic_010.php new file mode 100644 index 000000000..e17ad11eb --- /dev/null +++ b/hphp/test/zend/good/ext-curl/curl_basic_010.php @@ -0,0 +1,14 @@ + \ No newline at end of file diff --git a/hphp/test/zend/good/ext-curl/curl_basic_010.php.expectf b/hphp/test/zend/good/ext-curl/curl_basic_010.php.expectf new file mode 100644 index 000000000..17776e416 --- /dev/null +++ b/hphp/test/zend/good/ext-curl/curl_basic_010.php.expectf @@ -0,0 +1,2 @@ +%unicode|string%(%d) "%r(Couldn't resolve proxy|Could not resolve proxy:|Could not resolve host:)%r %s" +int(5) \ No newline at end of file diff --git a/hphp/test/zend/good/ext-curl/curl_basic_015.php b/hphp/test/zend/good/ext-curl/curl_basic_015.php new file mode 100644 index 000000000..de4a2697a --- /dev/null +++ b/hphp/test/zend/good/ext-curl/curl_basic_015.php @@ -0,0 +1,6 @@ + +===DONE=== \ No newline at end of file diff --git a/hphp/test/zend/good/ext-curl/curl_basic_015.php.expectf b/hphp/test/zend/good/ext-curl/curl_basic_015.php.expectf new file mode 100644 index 000000000..e7c042967 --- /dev/null +++ b/hphp/test/zend/good/ext-curl/curl_basic_015.php.expectf @@ -0,0 +1,2 @@ +bool(true) +===DONE=== \ No newline at end of file diff --git a/hphp/test/zend/good/ext-curl/curl_copy_handle_basic.php b/hphp/test/zend/good/ext-curl/curl_copy_handle_basic.php new file mode 100644 index 000000000..ce5840448 --- /dev/null +++ b/hphp/test/zend/good/ext-curl/curl_copy_handle_basic.php @@ -0,0 +1,16 @@ + +===DONE=== \ No newline at end of file diff --git a/hphp/test/zend/good/ext-curl/curl_copy_handle_basic.php.expectf b/hphp/test/zend/good/ext-curl/curl_copy_handle_basic.php.expectf new file mode 100644 index 000000000..bd5bbdde7 --- /dev/null +++ b/hphp/test/zend/good/ext-curl/curl_copy_handle_basic.php.expectf @@ -0,0 +1,3 @@ +*** Testing curl_copy_handle(): basic *** +bool(true) +===DONE=== \ No newline at end of file diff --git a/hphp/test/zend/good/ext-curl/curl_copy_handle_variation1.php b/hphp/test/zend/good/ext-curl/curl_copy_handle_variation1.php new file mode 100644 index 000000000..5fa08d77d --- /dev/null +++ b/hphp/test/zend/good/ext-curl/curl_copy_handle_variation1.php @@ -0,0 +1,18 @@ + +===DONE=== \ No newline at end of file diff --git a/hphp/test/zend/good/ext-curl/curl_copy_handle_variation1.php.expectf b/hphp/test/zend/good/ext-curl/curl_copy_handle_variation1.php.expectf new file mode 100644 index 000000000..17d8df6a2 --- /dev/null +++ b/hphp/test/zend/good/ext-curl/curl_copy_handle_variation1.php.expectf @@ -0,0 +1,3 @@ +*** Testing curl_copy_handle(): basic *** +bool(false) +===DONE=== \ No newline at end of file diff --git a/hphp/test/zend/good/ext-curl/curl_copy_handle_variation2.php b/hphp/test/zend/good/ext-curl/curl_copy_handle_variation2.php new file mode 100644 index 000000000..e222bb1b5 --- /dev/null +++ b/hphp/test/zend/good/ext-curl/curl_copy_handle_variation2.php @@ -0,0 +1,24 @@ + +===DONE=== \ No newline at end of file diff --git a/hphp/test/zend/good/ext-curl/curl_copy_handle_variation2.php.expectf b/hphp/test/zend/good/ext-curl/curl_copy_handle_variation2.php.expectf new file mode 100644 index 000000000..011b37e2a --- /dev/null +++ b/hphp/test/zend/good/ext-curl/curl_copy_handle_variation2.php.expectf @@ -0,0 +1,6 @@ +*** Testing curl_copy_handle(): add options after copy *** +bool(true) +bool(false) +bool(true) +bool(false) +===DONE=== \ No newline at end of file diff --git a/hphp/test/zend/good/ext-curl/curl_error_basic.php b/hphp/test/zend/good/ext-curl/curl_error_basic.php new file mode 100644 index 000000000..f1c476130 --- /dev/null +++ b/hphp/test/zend/good/ext-curl/curl_error_basic.php @@ -0,0 +1,22 @@ + \ No newline at end of file diff --git a/hphp/test/zend/good/ext-curl/curl_error_basic.php.expectf b/hphp/test/zend/good/ext-curl/curl_error_basic.php.expectf new file mode 100644 index 000000000..ce582bba5 --- /dev/null +++ b/hphp/test/zend/good/ext-curl/curl_error_basic.php.expectf @@ -0,0 +1,2 @@ +== Testing curl_error with a fake URL == +string(%d) "%sfakeURL%S" \ No newline at end of file diff --git a/hphp/test/zend/good/ext-curl/curl_multi_select_basic1.php b/hphp/test/zend/good/ext-curl/curl_multi_select_basic1.php new file mode 100644 index 000000000..0e96a49da --- /dev/null +++ b/hphp/test/zend/good/ext-curl/curl_multi_select_basic1.php @@ -0,0 +1,16 @@ + +===DONE=== \ No newline at end of file diff --git a/hphp/test/zend/good/ext-curl/curl_multi_select_basic1.php.expectf b/hphp/test/zend/good/ext-curl/curl_multi_select_basic1.php.expectf new file mode 100644 index 000000000..53c8e75d9 --- /dev/null +++ b/hphp/test/zend/good/ext-curl/curl_multi_select_basic1.php.expectf @@ -0,0 +1,2 @@ +%r(0|-1)%r +===DONE=== \ No newline at end of file diff --git a/hphp/test/zend/good/ext-curl/curl_setopt_array_basic.php b/hphp/test/zend/good/ext-curl/curl_setopt_array_basic.php new file mode 100644 index 000000000..29337d7db --- /dev/null +++ b/hphp/test/zend/good/ext-curl/curl_setopt_array_basic.php @@ -0,0 +1,43 @@ + $url, + CURLOPT_RETURNTRANSFER => 1 +); + +ob_start(); // start output buffering + +curl_setopt_array($ch, $options); +$returnContent = curl_exec($ch); +curl_close($ch); + +var_dump($returnContent); +isset($tempname) and is_file($tempname) and @unlink($tempname); + +?> \ No newline at end of file diff --git a/hphp/test/zend/good/ext-curl/curl_setopt_array_basic.php.expectf b/hphp/test/zend/good/ext-curl/curl_setopt_array_basic.php.expectf new file mode 100644 index 000000000..29e065d12 --- /dev/null +++ b/hphp/test/zend/good/ext-curl/curl_setopt_array_basic.php.expectf @@ -0,0 +1,3 @@ +== Starting test curl_setopt_array($ch, $options); == +string(25) "Hello World! +Hello World!" \ No newline at end of file diff --git a/hphp/test/zend/good/ext-curl/curl_write_callback.php b/hphp/test/zend/good/ext-curl/curl_write_callback.php new file mode 100644 index 000000000..77ee49c01 --- /dev/null +++ b/hphp/test/zend/good/ext-curl/curl_write_callback.php @@ -0,0 +1,24 @@ + \ No newline at end of file diff --git a/hphp/test/zend/good/ext-curl/curl_write_callback.php.expectf b/hphp/test/zend/good/ext-curl/curl_write_callback.php.expectf new file mode 100644 index 000000000..30d74d258 --- /dev/null +++ b/hphp/test/zend/good/ext-curl/curl_write_callback.php.expectf @@ -0,0 +1 @@ +test \ No newline at end of file diff --git a/hphp/test/zend/good/ext-curl/curl_write_file.php b/hphp/test/zend/good/ext-curl/curl_write_file.php new file mode 100644 index 000000000..041bc09ca --- /dev/null +++ b/hphp/test/zend/good/ext-curl/curl_write_file.php @@ -0,0 +1,26 @@ + \ No newline at end of file diff --git a/hphp/test/zend/good/ext-curl/curl_write_file.php.expectf b/hphp/test/zend/good/ext-curl/curl_write_file.php.expectf new file mode 100644 index 000000000..30d74d258 --- /dev/null +++ b/hphp/test/zend/good/ext-curl/curl_write_file.php.expectf @@ -0,0 +1 @@ +test \ No newline at end of file diff --git a/hphp/test/zend/good/ext-curl/curl_write_return.php b/hphp/test/zend/good/ext-curl/curl_write_return.php new file mode 100644 index 000000000..218494dbf --- /dev/null +++ b/hphp/test/zend/good/ext-curl/curl_write_return.php @@ -0,0 +1,20 @@ + \ No newline at end of file diff --git a/hphp/test/zend/good/ext-curl/curl_write_return.php.expectf b/hphp/test/zend/good/ext-curl/curl_write_return.php.expectf new file mode 100644 index 000000000..30d74d258 --- /dev/null +++ b/hphp/test/zend/good/ext-curl/curl_write_return.php.expectf @@ -0,0 +1 @@ +test \ No newline at end of file diff --git a/hphp/test/zend/good/ext-curl/curl_write_stdout.php b/hphp/test/zend/good/ext-curl/curl_write_stdout.php new file mode 100644 index 000000000..351478658 --- /dev/null +++ b/hphp/test/zend/good/ext-curl/curl_write_stdout.php @@ -0,0 +1,18 @@ + \ No newline at end of file diff --git a/hphp/test/zend/good/ext-curl/curl_write_stdout.php.expectf b/hphp/test/zend/good/ext-curl/curl_write_stdout.php.expectf new file mode 100644 index 000000000..30d74d258 --- /dev/null +++ b/hphp/test/zend/good/ext-curl/curl_write_stdout.php.expectf @@ -0,0 +1 @@ +test \ No newline at end of file diff --git a/hphp/tools/import_zend_test.py b/hphp/tools/import_zend_test.py index 4254b3c7b..6625790e9 100755 --- a/hphp/tools/import_zend_test.py +++ b/hphp/tools/import_zend_test.py @@ -82,7 +82,6 @@ no_import = ( 'usleep_error.php', # not imported yet, but will be - '/ext/curl', '/ext/exif', '/ext/gd', '/ext/hash',