Annotation of embedaddon/php/ext/curl/tests/curl_setopt_basic001.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: curl_setopt basic tests.
! 3: --CREDITS--
! 4: Paul Sohier
! 5: #phptestfest utrecht
! 6: --INI--
! 7: safe_mode=On
! 8: --SKIPIF--
! 9: <?php if (!extension_loaded("curl") || false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) print "skip"; ?>
! 10: --FILE--
! 11: <?php
! 12:
! 13: $host = getenv('PHP_CURL_HTTP_REMOTE_SERVER');
! 14:
! 15: // start testing
! 16: echo "*** Testing curl_setopt with CURLOPT_FOLLOWLOCATION in safemode\n";
! 17:
! 18: $url = "{$host}/";
! 19: $ch = curl_init();
! 20:
! 21: ob_start(); // start output buffering
! 22: curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
! 23:
! 24: $curl_content = curl_exec($ch);
! 25: curl_close($ch);
! 26:
! 27: var_dump( $curl_content );
! 28: ?>
! 29: --EXPECTF--
! 30: Deprecated: Directive 'safe_mode' is deprecated in PHP 5.3 and greater in Unknown on line 0
! 31: *** Testing curl_setopt with CURLOPT_FOLLOWLOCATION in safemode
! 32:
! 33: Warning: curl_setopt(): CURLOPT_FOLLOWLOCATION cannot be activated when safe_mode is enabled or an open_basedir is set in %s on line %d
! 34: bool(false)
! 35:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>