urfaclient на php
Добрый день бьюсь все с запуском URFA client php но при выполнении example.php вылезает
Array ( )
****************************************
Notice: fwrite() [function.fwrite]: send of 1 bytes failed with errno=32 Broken pipe in /usr/local/www/apache22/data/urfa/URFAClient_Packet.php on line 153
Notice: fwrite() [function.fwrite]: send of 2 bytes failed with errno=32 Broken pipe in /usr/local/www/apache22/data/urfa/URFAClient_Packet.php on line 154
Notice: fwrite() [function.fwrite]: send of 2 bytes failed with errno=32 Broken pipe in /usr/local/www/apache22/data/urfa/URFAClient_Packet.php on line 157
Notice: fwrite() [function.fwrite]: send of 2 bytes failed with errno=32 Broken pipe in /usr/local/www/apache22/data/urfa/URFAClient_Packet.php on line 158
Notice: fwrite() [function.fwrite]: send of 4 bytes failed with errno=32 Broken pipe in /usr/local/www/apache22/data/urfa/URFAClient_Packet.php on line 159
Fatal error: Uncaught exception 'Exception' with message 'Error code 0' in /usr/local/www/apache22/data/urfa/URFAClient_Packet.php:27 Stack trace: #0 /usr/local/www/apache22/data/urfa/URFAClient_Connection.php(82): URFAClient_Packet->read() #1 /usr/local/www/apache22/data/urfa/URFAClient_User5.php(264): URFAClient_Connection->urfa_call(-16419) #2 /usr/local/www/apache22/data/urfa/example.php(26): URFAClient_User5->rpcf_user5_get_services() #3 {main} thrown in /usr/local/www/apache22/data/urfa/URFAClient_Packet.php on line 27
поиск по форуму ник чему не привел, никто не подскажет в чем может быть проблемма?
Array ( )
****************************************
Notice: fwrite() [function.fwrite]: send of 1 bytes failed with errno=32 Broken pipe in /usr/local/www/apache22/data/urfa/URFAClient_Packet.php on line 153
Notice: fwrite() [function.fwrite]: send of 2 bytes failed with errno=32 Broken pipe in /usr/local/www/apache22/data/urfa/URFAClient_Packet.php on line 154
Notice: fwrite() [function.fwrite]: send of 2 bytes failed with errno=32 Broken pipe in /usr/local/www/apache22/data/urfa/URFAClient_Packet.php on line 157
Notice: fwrite() [function.fwrite]: send of 2 bytes failed with errno=32 Broken pipe in /usr/local/www/apache22/data/urfa/URFAClient_Packet.php on line 158
Notice: fwrite() [function.fwrite]: send of 4 bytes failed with errno=32 Broken pipe in /usr/local/www/apache22/data/urfa/URFAClient_Packet.php on line 159
Fatal error: Uncaught exception 'Exception' with message 'Error code 0' in /usr/local/www/apache22/data/urfa/URFAClient_Packet.php:27 Stack trace: #0 /usr/local/www/apache22/data/urfa/URFAClient_Connection.php(82): URFAClient_Packet->read() #1 /usr/local/www/apache22/data/urfa/URFAClient_User5.php(264): URFAClient_Connection->urfa_call(-16419) #2 /usr/local/www/apache22/data/urfa/example.php(26): URFAClient_User5->rpcf_user5_get_services() #3 {main} thrown in /usr/local/www/apache22/data/urfa/URFAClient_Packet.php on line 27
поиск по форуму ник чему не привел, никто не подскажет в чем может быть проблемма?
Стандартного ответа тут нет. Ошибка системная, можно поискать в гугле "errno 32 broken pipe".artemus писал(а):Notice: fwrite() [function.fwrite]: send of 1 bytes failed with errno=32 Broken pipe in /usr/local/www/apache22/data/urfa/URFAClient_Packet.php on line 153
поиск по форуму ник чему не привел, никто не подскажет в чем может быть проблемма?
Здесь обсуждалось viewtopic.php?t=6514&highlight=rpcfblockaccountmf.viper писал(а):Вопрос по rpcf_block_account
Насколько полно работает эта функция?
делаю rpcf_block_account(1,0), проверяю - ставит блок 256 ...
Как я понимаю эта функция только блокирует аккаунт, если да, то есть ли функция чтобы разблокировать ?
Пробовал через save_account тоже самое (ds писал(а):Здесь обсуждалось viewtopic.php?t=6514&highlight=rpcfblockaccountmf.viper писал(а):Вопрос по rpcf_block_account
Насколько полно работает эта функция?
делаю rpcf_block_account(1,0), проверяю - ставит блок 256 ...
Как я понимаю эта функция только блокирует аккаунт, если да, то есть ли функция чтобы разблокировать ?
ребят, кто может напишите функцию rpcf_get_dhs_report 0x5015
заранее спасибо.
Код: Выделить всё
<function name="rpcf_get_dhs_report" id="0x5015">
<input>
<integer name="user_id" />
<integer name="account_id" />
<integer name="apid" />
<integer name="t_start" />
<integer name="t_end" />
</input>
<output>
<integer name="dhs_log_size" />
<for name="i" from="0" count="dhs_log_size">
<integer name="id" array_index="i" />
<integer name="account_id" array_index="i" />
<integer name="slink_id" array_index="i" />
<integer name="recv_date" array_index="i" />
<integer name="last_update_date" array_index="i" />
<string name="Called_Station_Id" array_index="i" />
<string name="Calling_Station_Id" array_index="i" />
<integer name="framed_ip" array_index="i" />
<integer name="nas_port" array_index="i" />
<string name="acct_session_id" array_index="i" />
<integer name="nas_port_type" array_index="i" />
<string name="uname" array_index="i" />
<integer name="service_type" array_index="i" />
<integer name="framed_protocol" array_index="i" />
<integer name="nas_ip" array_index="i" />
<string name="nas_id" array_index="i" />
<integer name="acct_status_type" array_index="i" />
<long name="acct_inp_pack" array_index="i" />
<long name="acct_inp_oct" array_index="i" />
<long name="acct_inp_giga" array_index="i" />
<long name="acct_out_pack" array_index="i" />
<long name="acct_out_oct" array_index="i" />
<long name="acct_out_giga" array_index="i" />
<long name="acct_sess_time" array_index="i" />
<integer name="acct_term_cause" array_index="i" />
<double name="total_cost" array_index="i" />
</for>
</output>
</function>
starchik писал(а):ребят, кто может напишите функцию rpcf_get_dhs_report 0x5015
Код: Выделить всё
function get_dhs_report($param) { // 0x5015
$ret=array();
if (!$this->connection->urfa_call(0x5015)) {
print "Error calling function ". __FUNCTION__ ."\n";
return FALSE;
}
$packet = $this->connection->getPacket();
$packet->DataSetInt( $param['user_id'] );
$packet->DataSetInt( $param['account_id'] );
$packet->DataSetInt( $param['apid'] );
$packet->DataSetInt( $param['t_start'] );
$packet->DataSetInt( $param['t_end'] );
$this->connection->urfa_send_param($packet);
if ( $x = $this->connection->urfa_get_data() ) {
$ret['dhs_log_size'] = $x->DataGetInt();
for ( $i = 0; $i < $ret['dhs_log_size']; $i++ ) {
$ari = array();
$ari['id'] = $x->DataGetInt();
$ari['account_id'] = $x->DataGetInt();
$ari['slink_id'] = $x->DataGetInt();
$ari['recv_date'] = $x->DataGetInt();
$ari['last_update_date'] = $x->DataGetInt();
$ari['Called_Station_Id'] = $x->DataGetString();
$ari['Calling_Station_Id'] = $x->DataGetString();
$ari['framed_ip'] = $x->DataGetInt();
$ari['nas_port'] = $x->DataGetInt();
$ari['acct_session_id'] = $x->DataGetString();
$ari['nas_port_type'] = $x->DataGetInt();
$ari['uname'] = $x->DataGetString();
$ari['service_type'] = $x->DataGetInt();
$ari['framed_protocol'] = $x->DataGetInt();
$ari['nas_ip'] = $x->DataGetInt();
$ari['nas_id'] = $x->DataGetString();
$ari['acct_status_type'] = $x->DataGetInt();
$ari['acct_inp_pack'] = $x->DataGetLong();
$ari['acct_inp_oct'] = $x->DataGetLong();
$ari['acct_inp_giga'] = $x->DataGetLong();
$ari['acct_out_pack'] = $x->DataGetLong();
$ari['acct_out_oct'] = $x->DataGetLong();
$ari['acct_out_giga'] = $x->DataGetLong();
$ari['acct_sess_time'] = $x->DataGetLong();
$ari['acct_term_cause'] = $x->DataGetInt();
$ari['total_cost'] = $x->DataGetDouble();
$ret['dhs_log'][] = $ari;
}
}
return $ret;
}
спасибо 
а кто знает что должно передаваться в это переменной?
кажется понял, это ID расчетного периода.
rpcf_get_discount_periods(); // 0x2600 возвращает вот такое значение
как отсюда выдернуть текущий discount_period_id ?
вопрос снят.

а кто знает что должно передаваться в это переменной?
Код: Выделить всё
$param['apid']
rpcf_get_discount_periods(); // 0x2600 возвращает вот такое значение
Код: Выделить всё
Array ( [count] => 2 [discount_periods] => Array ( [0] => Array ( [static_id] => 0 [discount_period_id] => 1 [start_date] => 0 [end_date] => 2000000000 [periodic_type] => 1 [custom_duration] => 0 [next_discount_period_id] => 0 [canonical_length] => 2000000000 ) [1] => Array ( [static_id] => 1 [discount_period_id] => 21 [start_date] => 1272657600 [end_date] => 1275336000 [periodic_type] => 3 [custom_duration] => 1 [next_discount_period_id] => 0 [canonical_length] => 2678400 ) ) )
вопрос снят.