Не запусткается пример с HttpRequest

mstdmstd

Новичок
Всем привет,
Пытаюсь запустить последний пример отсюда http://php.net/manual/en/httprequest.send.php
PHP:
Example how to use HttpRequest to post data and receive the response:
<?php
//set up variables
$theData = '<?xml version="1.0"?>
<note>
    <to>php.net</to>
    <from>lymber</from>
    <heading>php http request</heading>
    <body>i love php!</body>
</note>';
$url = 'http://www.example.com';
$credentials = '[email protected]:password';
$header_array = array('Expect' => '',
                'From' => 'User A');
$ssl_array = array('version' => SSL_VERSION_SSLv3);
$options = array(headers => $header_array,
                httpauth => $credentials,
                httpauthtype => HTTP_AUTH_BASIC,
                protocol => HTTP_VERSION_1_1,
                ssl => $ssl_array);
                
//create the httprequest object                
$httpRequest_OBJ = new httpRequest($url, HTTP_METH_POST, $options);
//add the content type
$httpRequest_OBJ->setContentType = 'Content-Type: text/xml';
//add the raw post data
$httpRequest_OBJ->setRawPostData ($theData);
//send the http request
$result = $httpRequest_OBJ->send();
//print out the result
echo "<pre>"; print_r($result); echo "</pre>";
?>
и в логе получаю ошибки
[Fri Mar 08 20:59:53 2013] [error] [client 127.0.0.1] PHP Notice: Use of undefined constant SSL_VERSION_SSLv3 - assumed 'SSL_VERSION_SSLv3' in /mnt/diskD_Work/wwwroot/cashcrate-externals/get_publisher_reporting.php on line 16
[Fri Mar 08 20:59:53 2013] [error] [client 127.0.0.1] PHP Stack trace:
[Fri Mar 08 20:59:53 2013] [error] [client 127.0.0.1] PHP 1. {main}() /mnt/diskD_Work/wwwroot/cashcrate-externals/get_publisher_reporting.php:0
[Fri Mar 08 20:59:53 2013] [error] [client 127.0.0.1] PHP Notice: Use of undefined constant headers - assumed 'headers' in /mnt/diskD_Work/wwwroot/cashcrate-externals/get_publisher_reporting.php on line 17
[Fri Mar 08 20:59:53 2013] [error] [client 127.0.0.1] PHP Stack trace:
[Fri Mar 08 20:59:53 2013] [error] [client 127.0.0.1] PHP 1. {main}() /mnt/diskD_Work/wwwroot/cashcrate-externals/get_publisher_reporting.php:0
[Fri Mar 08 20:59:53 2013] [error] [client 127.0.0.1] PHP Notice: Use of undefined constant httpauth - assumed 'httpauth' in /mnt/diskD_Work/wwwroot/cashcrate-externals/get_publisher_reporting.php on line 18
[Fri Mar 08 20:59:53 2013] [error] [client 127.0.0.1] PHP Stack trace:
[Fri Mar 08 20:59:53 2013] [error] [client 127.0.0.1] PHP 1. {main}() /mnt/diskD_Work/wwwroot/cashcrate-externals/get_publisher_reporting.php:0
[Fri Mar 08 20:59:53 2013] [error] [client 127.0.0.1] PHP Notice: Use of undefined constant httpauthtype - assumed 'httpauthtype' in /mnt/diskD_Work/wwwroot/cashcrate-externals/get_publisher_reporting.php on line 19
[Fri Mar 08 20:59:53 2013] [error] [client 127.0.0.1] PHP Stack trace:
[Fri Mar 08 20:59:53 2013] [error] [client 127.0.0.1] PHP 1. {main}() /mnt/diskD_Work/wwwroot/cashcrate-externals/get_publisher_reporting.php:0
[Fri Mar 08 20:59:53 2013] [error] [client 127.0.0.1] PHP Notice: Use of undefined constant HTTP_AUTH_BASIC - assumed 'HTTP_AUTH_BASIC' in /mnt/diskD_Work/wwwroot/cashcrate-externals/get_publisher_reporting.php on line 19
[Fri Mar 08 20:59:53 2013] [error] [client 127.0.0.1] PHP Stack trace:
[Fri Mar 08 20:59:53 2013] [error] [client 127.0.0.1] PHP 1. {main}() /mnt/diskD_Work/wwwroot/cashcrate-externals/get_publisher_reporting.php:0
[Fri Mar 08 20:59:53 2013] [error] [client 127.0.0.1] PHP Notice: Use of undefined constant protocol - assumed 'protocol' in /mnt/diskD_Work/wwwroot/cashcrate-externals/get_publisher_reporting.php on line 20
[Fri Mar 08 20:59:53 2013] [error] [client 127.0.0.1] PHP Stack trace:
[Fri Mar 08 20:59:53 2013] [error] [client 127.0.0.1] PHP 1. {main}() /mnt/diskD_Work/wwwroot/cashcrate-externals/get_publisher_reporting.php:0
[Fri Mar 08 20:59:53 2013] [error] [client 127.0.0.1] PHP Notice: Use of undefined constant HTTP_VERSION_1_1 - assumed 'HTTP_VERSION_1_1' in /mnt/diskD_Work/wwwroot/cashcrate-externals/get_publisher_reporting.php on line 20
[Fri Mar 08 20:59:53 2013] [error] [client 127.0.0.1] PHP Stack trace:
[Fri Mar 08 20:59:53 2013] [error] [client 127.0.0.1] PHP 1. {main}() /mnt/diskD_Work/wwwroot/cashcrate-externals/get_publisher_reporting.php:0
[Fri Mar 08 20:59:53 2013] [error] [client 127.0.0.1] PHP Notice: Use of undefined constant ssl - assumed 'ssl' in /mnt/diskD_Work/wwwroot/cashcrate-externals/get_publisher_reporting.php on line 21
[Fri Mar 08 20:59:53 2013] [error] [client 127.0.0.1] PHP Stack trace:
[Fri Mar 08 20:59:53 2013] [error] [client 127.0.0.1] PHP 1. {main}() /mnt/diskD_Work/wwwroot/cashcrate-externals/get_publisher_reporting.php:0
[Fri Mar 08 20:59:53 2013] [error] [client 127.0.0.1] PHP Fatal error: Class 'httpRequest' not found in /mnt/diskD_Work/wwwroot/cashcrate-externals/get_publisher_reporting.php on line 24
[Fri Mar 08 20:59:53 2013] [error] [client 127.0.0.1] PHP Stack trace:
[Fri Mar 08 20:59:53 2013] [error] [client 127.0.0.1] PHP 1. {main}() /mnt/diskD_Work/wwwroot/cashcrate-externals/get_publisher_reporting.php:0
У меня какие-то либы не установлены ? Какие? В нете нашел упоминание про пакеты pecl_http, php-pear.
Но в моем ALT Linux 6.0.2 KDesktop таких пакетов нет. Или они как-то иначе называются?
 

fixxxer

К.О.
Партнер клуба
Откуда нам знать, как во всяких болгеносах пакеты называются.

Ну хотя бы пакет типа php-pear там есть? Ставишь его и делаешь pecl install что-надо.
 
Сверху