mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-31 16:28:55 +00:00

Patch provided by Martin Köditz. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@347551 c90b9560-bf6c-de11-be94-00142212c4b1
142 lines
3.8 KiB
XML
142 lines
3.8 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.ibase-server-info">
|
|
<refnamediv>
|
|
<refname>ibase_server_info</refname>
|
|
<refpurpose>Request information about a database server</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>string</type><methodname>ibase_server_info</methodname>
|
|
<methodparam><type>resource</type><parameter>service_handle</parameter></methodparam>
|
|
<methodparam><type>int</type><parameter>action</parameter></methodparam>
|
|
</methodsynopsis>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>service_handle</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
A previously created connection to the database server.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>action</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
A valid constant.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
Returns mixed types depending on context.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title><function>ibase_service_attach</function> example</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
// Attach to the remote Firebird server
|
|
if (($service = ibase_service_attach('10.1.1.254/3050', 'sysdba', 'masterkey')) != FALSE) {
|
|
|
|
// Successfully attached.
|
|
|
|
// Output the info
|
|
echo "Server version: " . ibase_server_info($service, IBASE_SVC_SERVER_VERSION) . "\n";
|
|
echo "Server implementation: " . ibase_server_info($service, IBASE_SVC_IMPLEMENTATION) . "\n";
|
|
echo "Server users: " . print_r(ibase_server_info($service, IBASE_SVC_GET_USERS), true) . "\n";
|
|
echo "Server directory: " . ibase_server_info($service, IBASE_SVC_GET_ENV) . "\n";
|
|
echo "Server lock path: " . ibase_server_info($service, IBASE_SVC_GET_ENV_LOCK) . "\n";
|
|
echo "Server lib path: " . ibase_server_info($service, IBASE_SVC_GET_ENV_MSG) . "\n";
|
|
echo "Path of user db: " . ibase_server_info($service, IBASE_SVC_USER_DBPATH) . "\n";
|
|
echo "Established connections: " . print_r(ibase_server_info($service, IBASE_SVC_SVR_DB_INFO),true) . "\n";
|
|
|
|
// Detach from server (disconnect)
|
|
ibase_service_detach($service);
|
|
|
|
}
|
|
else {
|
|
// Output message on error
|
|
$conn_error = ibase_errmsg();
|
|
die($conn_error);
|
|
}
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
&example.outputs;
|
|
<screen>
|
|
<![CDATA[
|
|
Server version: LI-V3.0.4.33054 Firebird 3.0
|
|
Server implementation: Firebird/Linux/AMD/Intel/x64
|
|
Server users: Array
|
|
(
|
|
[0] => Array
|
|
(
|
|
[user_name] => SYSDBA
|
|
[first_name] => Sql
|
|
[middle_name] => Server
|
|
[last_name] => Administrator
|
|
[user_id] => 0
|
|
[group_id] => 0
|
|
)
|
|
|
|
)
|
|
|
|
Server directory: /etc/firebird/
|
|
Server lock path: /tmp/firebird/
|
|
Server lib path: /usr/lib64/firebird/lib/
|
|
Path of user db: /var/lib/firebird/secdb/security3.fdb
|
|
Established connections: Array
|
|
(
|
|
[attachments] => 3
|
|
[databases] => 2
|
|
[0] => /srv/firebird/poss.fdb
|
|
[1] => /srv/firebird/employees.fdb
|
|
)
|
|
]]>
|
|
</screen>
|
|
</example>
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
</refentry>
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|