From 16fe2685e8b691ab79d8b4b84ce31f1e49e241e3 Mon Sep 17 00:00:00 2001 From: Mehdi Achour Date: Fri, 15 Jun 2007 00:16:44 +0000 Subject: [PATCH] WS, prepare for new doc style git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@237703 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/regex/functions/ereg-replace.xml | 170 +++---- reference/regex/functions/ereg.xml | 142 +++--- reference/regex/functions/eregi-replace.xml | 64 +-- reference/regex/functions/eregi.xml | 66 +-- reference/regex/functions/split.xml | 176 +++---- reference/regex/functions/spliti.xml | 10 +- reference/regex/functions/sql-regcase.xml | 72 ++- reference/sem/functions/ftok.xml | 62 ++- reference/sem/functions/msg-get-queue.xml | 68 ++- reference/sem/functions/msg-receive.xml | 224 +++++---- reference/sem/functions/msg-remove-queue.xml | 54 +- reference/sem/functions/msg-send.xml | 114 +++-- reference/sem/functions/msg-set-queue.xml | 72 ++- reference/sem/functions/msg-stat-queue.xml | 198 ++++---- reference/sem/functions/sem-acquire.xml | 72 +-- reference/sem/functions/sem-get.xml | 88 ++-- reference/sem/functions/sem-release.xml | 62 +-- reference/sem/functions/sem-remove.xml | 62 +-- reference/sem/functions/shm-attach.xml | 68 +-- reference/sem/functions/shm-detach.xml | 54 +- reference/sem/functions/shm-get-var.xml | 46 +- reference/sem/functions/shm-put-var.xml | 64 ++- reference/sem/functions/shm-remove-var.xml | 46 +- reference/sem/functions/shm-remove.xml | 42 +- .../functions/session-cache-expire.xml | 88 ++-- .../functions/session-cache-limiter.xml | 114 ++--- .../session/functions/session-decode.xml | 46 +- .../session/functions/session-destroy.xml | 94 ++-- .../session/functions/session-encode.xml | 46 +- .../functions/session-get-cookie-params.xml | 116 +++-- .../functions/session-is-registered.xml | 74 ++- .../session/functions/session-module-name.xml | 38 +- reference/session/functions/session-name.xml | 88 ++-- .../session/functions/session-register.xml | 204 ++++---- .../session/functions/session-save-path.xml | 62 +-- .../functions/session-set-cookie-params.xml | 82 ++-- .../functions/session-set-save-handler.xml | 166 ++++--- reference/session/functions/session-start.xml | 168 +++---- .../session/functions/session-unregister.xml | 102 ++-- reference/session/functions/session-unset.xml | 70 ++- .../session/functions/session-write-close.xml | 59 +-- reference/sockets/functions/socket-accept.xml | 102 ++-- .../sockets/functions/socket-clear-error.xml | 56 +-- reference/sockets/functions/socket-close.xml | 64 +-- .../sockets/functions/socket-connect.xml | 110 ++--- .../functions/socket-create-listen.xml | 106 ++-- .../sockets/functions/socket-create-pair.xml | 352 ++++++------- reference/sockets/functions/socket-create.xml | 382 +++++++-------- .../sockets/functions/socket-get-option.xml | 298 +++++------ .../sockets/functions/socket-getpeername.xml | 105 ++-- .../sockets/functions/socket-getsockname.xml | 105 ++-- .../sockets/functions/socket-last-error.xml | 72 +-- reference/sockets/functions/socket-listen.xml | 116 ++--- reference/sockets/functions/socket-read.xml | 130 ++--- reference/sockets/functions/socket-recv.xml | 40 +- .../sockets/functions/socket-recvfrom.xml | 50 +- reference/sockets/functions/socket-select.xml | 305 ++++++------ reference/sockets/functions/socket-send.xml | 136 +++--- reference/sockets/functions/socket-sendto.xml | 152 +++--- .../sockets/functions/socket-set-block.xml | 66 ++- .../sockets/functions/socket-set-nonblock.xml | 64 +-- .../sockets/functions/socket-set-option.xml | 80 +-- .../sockets/functions/socket-shutdown.xml | 96 ++-- .../sockets/functions/socket-strerror.xml | 90 ++-- reference/sockets/functions/socket-write.xml | 120 ++--- .../functions/ssh2-auth-hostbased-file.xml | 74 ++- reference/ssh2/functions/ssh2-auth-none.xml | 58 ++- .../ssh2/functions/ssh2-auth-password.xml | 50 +- .../ssh2/functions/ssh2-auth-pubkey-file.xml | 56 +-- reference/ssh2/functions/ssh2-connect.xml | 462 +++++++++--------- reference/ssh2/functions/ssh2-exec.xml | 72 ++- .../ssh2/functions/ssh2-fetch-stream.xml | 66 ++- reference/ssh2/functions/ssh2-fingerprint.xml | 68 ++- .../functions/ssh2-methods-negotiated.xml | 57 +-- .../ssh2/functions/ssh2-publickey-list.xml | 12 +- reference/ssh2/functions/ssh2-scp-recv.xml | 66 ++- reference/ssh2/functions/ssh2-scp-send.xml | 64 ++- reference/ssh2/functions/ssh2-sftp-lstat.xml | 70 ++- reference/ssh2/functions/ssh2-sftp-mkdir.xml | 72 ++- .../ssh2/functions/ssh2-sftp-readlink.xml | 58 ++- .../ssh2/functions/ssh2-sftp-realpath.xml | 62 ++- reference/ssh2/functions/ssh2-sftp-rename.xml | 58 ++- reference/ssh2/functions/ssh2-sftp-rmdir.xml | 62 ++- reference/ssh2/functions/ssh2-sftp-stat.xml | 68 ++- .../ssh2/functions/ssh2-sftp-symlink.xml | 62 ++- reference/ssh2/functions/ssh2-sftp-unlink.xml | 56 +-- reference/ssh2/functions/ssh2-sftp.xml | 66 ++- reference/ssh2/functions/ssh2-shell.xml | 90 ++-- reference/ssh2/functions/ssh2-tunnel.xml | 62 ++- .../sybase/functions/sybase-affected-rows.xml | 10 +- reference/sybase/functions/sybase-close.xml | 22 +- reference/sybase/functions/sybase-connect.xml | 26 +- .../sybase/functions/sybase-data-seek.xml | 18 +- .../functions/sybase-deadlock-retry-count.xml | 16 +- .../sybase/functions/sybase-fetch-array.xml | 14 +- .../sybase/functions/sybase-fetch-assoc.xml | 20 +- .../sybase/functions/sybase-fetch-field.xml | 16 +- .../sybase/functions/sybase-fetch-object.xml | 22 +- .../sybase/functions/sybase-fetch-row.xml | 12 +- .../sybase/functions/sybase-field-seek.xml | 14 +- .../sybase/functions/sybase-free-result.xml | 10 +- .../functions/sybase-get-last-message.xml | 12 +- .../functions/sybase-min-client-severity.xml | 18 +- .../functions/sybase-min-error-severity.xml | 18 +- .../functions/sybase-min-message-severity.xml | 18 +- .../functions/sybase-min-server-severity.xml | 16 +- .../sybase/functions/sybase-num-fields.xml | 16 +- .../sybase/functions/sybase-num-rows.xml | 12 +- .../sybase/functions/sybase-pconnect.xml | 26 +- reference/sybase/functions/sybase-query.xml | 16 +- reference/sybase/functions/sybase-result.xml | 18 +- .../sybase/functions/sybase-select-db.xml | 20 +- .../functions/sybase-set-message-handler.xml | 32 +- .../functions/sybase-unbuffered-query.xml | 30 +- 114 files changed, 4579 insertions(+), 4674 deletions(-) diff --git a/reference/regex/functions/ereg-replace.xml b/reference/regex/functions/ereg-replace.xml index 92d49f9990..ba50eb8d40 100644 --- a/reference/regex/functions/ereg-replace.xml +++ b/reference/regex/functions/ereg-replace.xml @@ -1,52 +1,52 @@ - + - - - ereg_replace - Replace regular expression - - - Description - - stringereg_replace - stringpattern - stringreplacement - stringstring - - - This function scans string for matches to - pattern, then replaces the matched text - with replacement. - - - The modified string is returned. (Which may mean that the - original string is returned if there are no matches to be - replaced.) - - - If pattern contains parenthesized - substrings, replacement may contain - substrings of the form - \\digit, which will - be replaced by the text matching the digit'th parenthesized - substring; \\0 will produce the entire - contents of string. Up to nine substrings may be used. - Parentheses may be nested, in which case they are counted by the - opening parenthesis. - - - If no matches are found in string, then - string will be returned unchanged. - - - For example, the following code snippet prints "This was a test" - three times: - - - - <function>ereg_replace</function> example - + + + ereg_replace + Replace regular expression + + + Description + + stringereg_replace + stringpattern + stringreplacement + stringstring + + + This function scans string for matches to + pattern, then replaces the matched text + with replacement. + + + The modified string is returned. (Which may mean that the + original string is returned if there are no matches to be + replaced.) + + + If pattern contains parenthesized + substrings, replacement may contain + substrings of the form + \\digit, which will + be replaced by the text matching the digit'th parenthesized + substring; \\0 will produce the entire + contents of string. Up to nine substrings may be used. + Parentheses may be nested, in which case they are counted by the + opening parenthesis. + + + If no matches are found in string, then + string will be returned unchanged. + + + For example, the following code snippet prints "This was a test" + three times: + + + + <function>ereg_replace</function> example + ]]> - - - - - One thing to take note of is that if you use an integer value as - the replacement parameter, you may not get - the results you expect. This is because - ereg_replace will interpret the number as - the ordinal value of a character, and apply that. For instance: - - - - <function>ereg_replace</function> example - + + + + + One thing to take note of is that if you use an integer value as + the replacement parameter, you may not get + the results you expect. This is because + ereg_replace will interpret the number as + the ordinal value of a character, and apply that. For instance: + + + + <function>ereg_replace</function> example + ]]> - - - - - - Replace URLs with links - + + + + + + Replace URLs with links + [:space:]]+[[:alnum:]/]", "\\0", $text); ?> ]]> - - - - - - preg_replace, which uses a Perl-compatible - regular expression syntax, is often a faster alternative to - ereg_replace. - - - - See also ereg, eregi, - eregi_replace, str_replace, and - preg_match. - - - + + + + + + preg_replace, which uses a Perl-compatible + regular expression syntax, is often a faster alternative to + ereg_replace. + + + + See also ereg, eregi, + eregi_replace, str_replace, and + preg_match. + + + + - - - ereg - Regular expression match - - - Description - - intereg - stringpattern - stringstring - arrayregs - - - - preg_match, which uses a Perl-compatible - regular expression syntax, is often a faster alternative to - ereg. - - - - Searches a string for matches to the regular - expression given in pattern in a case-sensitive - way. - - - If matches are found for parenthesized substrings of - pattern and the function is called with - the third argument regs, the matches will - be stored in the elements of the array - regs. $regs[1] will contain the substring - which starts at the first left parenthesis; $regs[2] will contain - the substring starting at the second, and so on. $regs[0] will - contain a copy of the complete string matched. - - - - Up to (and including) PHP 4.1.0 $regs will be - filled with exactly ten elements, even though more or fewer than - ten parenthesized substrings may actually have matched. This has - no effect on ereg's ability to match more - substrings. If no matches are found, $regs - will not be altered by ereg. - - - - Returns the length of the matched string if a match for pattern was - found in string, or &false; if no matches - were found or an error occurred. - If the optional parameter regs was not passed or - the length of the matched string is 0, this function returns 1. - - - The following code snippet takes a date in ISO format - (YYYY-MM-DD) and prints it in DD.MM.YYYY format: - - - - <function>ereg</function> example - + + + ereg + Regular expression match + + + Description + + intereg + stringpattern + stringstring + arrayregs + + + + preg_match, which uses a Perl-compatible + regular expression syntax, is often a faster alternative to + ereg. + + + + Searches a string for matches to the regular + expression given in pattern in a case-sensitive + way. + + + If matches are found for parenthesized substrings of + pattern and the function is called with + the third argument regs, the matches will + be stored in the elements of the array + regs. $regs[1] will contain the substring + which starts at the first left parenthesis; $regs[2] will contain + the substring starting at the second, and so on. $regs[0] will + contain a copy of the complete string matched. + + + + Up to (and including) PHP 4.1.0 $regs will be + filled with exactly ten elements, even though more or fewer than + ten parenthesized substrings may actually have matched. This has + no effect on ereg's ability to match more + substrings. If no matches are found, $regs + will not be altered by ereg. + + + + Returns the length of the matched string if a match for pattern was + found in string, or &false; if no matches + were found or an error occurred. + If the optional parameter regs was not passed or + the length of the matched string is 0, this function returns 1. + + + The following code snippet takes a date in ISO format + (YYYY-MM-DD) and prints it in DD.MM.YYYY format: + + + + <function>ereg</function> example + ]]> - - - - - See also eregi, ereg_replace, - eregi_replace, preg_match, - strpos, and strstr. - - - + + + + + See also eregi, ereg_replace, + eregi_replace, preg_match, + strpos, and strstr. + + + + - - - eregi_replace - Replace regular expression case insensitive - - - Description - - stringeregi_replace - stringpattern - stringreplacement - stringstring - - - This function is identical to ereg_replace - except that this ignores case distinction when matching - alphabetic characters. - - - - Highlight search results - + + + eregi_replace + Replace regular expression case insensitive + + + Description + + stringeregi_replace + stringpattern + stringreplacement + stringstring + + + This function is identical to ereg_replace + except that this ignores case distinction when matching + alphabetic characters. + + + + Highlight search results + [^<]*)('. quotemeta($_GET['search']) .')'; @@ -30,15 +30,15 @@ $replacement = '\\1\\2'; $body = eregi_replace($pattern, $replacement, $body); ?> ]]> - - - - - See also ereg, eregi, - and ereg_replace. - - - + + + + + See also ereg, eregi, + and ereg_replace. + + + + - - - eregi - Case insensitive regular expression match - - - Description - - interegi - stringpattern - stringstring - arrayregs - - - This function is identical to ereg except - that this ignores case distinction when matching alphabetic - characters. - - - - <function>eregi</function> example - + + + eregi + Case insensitive regular expression match + + + Description + + interegi + stringpattern + stringstring + arrayregs + + + This function is identical to ereg except + that this ignores case distinction when matching alphabetic + characters. + + + + <function>eregi</function> example + ]]> - - - - - See also ereg, ereg_replace, - eregi_replace, stripos, and - stristr. - - - + + + + + See also ereg, ereg_replace, + eregi_replace, stripos, and + stristr. + + + + - - - split - Split string into array by regular expression - - - Description - - arraysplit - stringpattern - stringstring - intlimit - - - - preg_split, which uses a Perl-compatible regular - expression syntax, is often a faster alternative to - split. If you don't require the power of regular - expressions, it is faster to use explode, which - doesn't incur the overhead of the regular expression engine. - - - - Returns an array of strings, each of which is a substring of - string formed by splitting it on - boundaries formed by the case-sensitive regular expression - pattern. If limit - is set, the returned array will contain a maximum of - limit elements with the last element - containing the whole rest of string. If - an error occurs, split returns &false;. - - - To split off the first four fields from a line from - /etc/passwd: - - - - <function>split</function> example - + + + split + Split string into array by regular expression + + + Description + + arraysplit + stringpattern + stringstring + intlimit + + + + preg_split, which uses a Perl-compatible regular + expression syntax, is often a faster alternative to + split. If you don't require the power of regular + expressions, it is faster to use explode, which + doesn't incur the overhead of the regular expression engine. + + + + Returns an array of strings, each of which is a substring of + string formed by splitting it on + boundaries formed by the case-sensitive regular expression + pattern. If limit + is set, the returned array will contain a maximum of + limit elements with the last element + containing the whole rest of string. If + an error occurs, split returns &false;. + + + To split off the first four fields from a line from + /etc/passwd: + + + + <function>split</function> example + ]]> - - - - - If there are n occurrences of - pattern, the returned array will contain - n+1 items. For example, if - there is no occurrence of pattern, an array with - only one element will be returned. Of course, this is also true if - string is empty. - - - To parse a date which may be delimited with slashes, dots, or - hyphens: - - - - <function>split</function> example - + + + + + If there are n occurrences of + pattern, the returned array will contain + n+1 items. For example, if + there is no occurrence of pattern, an array with + only one element will be returned. Of course, this is also true if + string is empty. + + + To parse a date which may be delimited with slashes, dots, or + hyphens: + + + + <function>split</function> example + \n"; ?> ]]> - - - + + + - - For users looking for a way to emulate Perl's @chars = - split('', $str) behaviour, please see the examples for - preg_split or str_split. - + + For users looking for a way to emulate Perl's @chars = + split('', $str) behaviour, please see the examples for + preg_split or str_split. + - - Please note that pattern is a regular - expression. If you want to split on any of the characters which - are considered special by regular expressions, you'll need to - escape them first. If you think split (or - any other regex function, for that matter) is doing something - weird, please read the file regex.7, - included in the regex/ subdirectory of the - PHP distribution. It's in manpage format, so you'll want to do - something along the lines of man - /usr/local/src/regex/regex.7 in order to read it. - + + Please note that pattern is a regular + expression. If you want to split on any of the characters which + are considered special by regular expressions, you'll need to + escape them first. If you think split (or + any other regex function, for that matter) is doing something + weird, please read the file regex.7, + included in the regex/ subdirectory of the + PHP distribution. It's in manpage format, so you'll want to do + something along the lines of man + /usr/local/src/regex/regex.7 in order to read it. + - - See also: preg_split, spliti, - str_split, - explode, implode, - chunk_split, and wordwrap. - + + See also: preg_split, spliti, + str_split, + explode, implode, + chunk_split, and wordwrap. + - - + + + spliti - - Split string into array by regular expression case insensitive - + Split string into array by regular expression case insensitive Description @@ -39,7 +37,7 @@ print_r($chunks); + [0] => [1] => BBB [2] => CCC [3] => DDD @@ -48,7 +46,7 @@ Array ]]> - + See also preg_split, split, explode, and implode. diff --git a/reference/regex/functions/sql-regcase.xml b/reference/regex/functions/sql-regcase.xml index 8ebd1c98e9..bd73e38fb8 100644 --- a/reference/regex/functions/sql-regcase.xml +++ b/reference/regex/functions/sql-regcase.xml @@ -1,50 +1,48 @@ - + - - - sql_regcase - - Make regular expression for case insensitive match - - - - Description - - stringsql_regcase - stringstring - - - Returns a valid regular expression which will match - string, ignoring case. This expression is - string with each alphabetic character converted to a - bracket expression; this bracket expression contains that - character's uppercase and lowercase form. Other characters remain unchanged. - - - - <function>sql_regcase</function> example - + + + sql_regcase + Make regular expression for case insensitive match + + + Description + + stringsql_regcase + stringstring + + + Returns a valid regular expression which will match + string, ignoring case. This expression is + string with each alphabetic character converted to a + bracket expression; this bracket expression contains that + character's uppercase and lowercase form. Other characters remain unchanged. + + + + <function>sql_regcase</function> example + ]]> - - &example.outputs; - + + &example.outputs; + - - - - - This can be used to achieve case insensitive pattern matching in - products which support only case sensitive regular expressions. - - - + + + + + This can be used to achieve case insensitive pattern matching in + products which support only case sensitive regular expressions. + + + + - - - ftok - - Convert a pathname and a project identifier to a System V IPC key - - - - Description - - intftok - stringpathname - stringproj - - - The function converts the pathname of an existing - accessible file and a project identifier (proj) - into a - integer for use with for example - shmop_open and other System V IPC keys. The - proj parameter must be a one character string. - - - On success the return value will be the created key value, otherwise - -1 is returned. - - - See also shmop_open and sem_get. - - - + + + ftok + Convert a pathname and a project identifier to a System V IPC key + + + Description + + intftok + stringpathname + stringproj + + + The function converts the pathname of an existing + accessible file and a project identifier (proj) + into a + integer for use with for example + shmop_open and other System V IPC keys. The + proj parameter must be a one character string. + + + On success the return value will be the created key value, otherwise + -1 is returned. + + + See also shmop_open and sem_get. + + + - - - msg_get_queue - - Create or attach to a message queue - - - - Description - - resourcemsg_get_queue - intkey - intperms - - - msg_get_queue returns an id that can be used to - access the System V message queue with the given - key. The first call creates the message queue with - the optional perms (default: 0666). - A second call to msg_get_queue for the same - key will return a different message queue - identifier, but both identifiers access the same underlying message - queue. - If the message queue already exists, the perms - will be ignored. - - - See also msg_remove_queue, - msg_receive, msg_send, - msg_stat_queue and - msg_set_queue. - - - + + + + msg_get_queue + Create or attach to a message queue + + + Description + + resourcemsg_get_queue + intkey + intperms + + + msg_get_queue returns an id that can be used to + access the System V message queue with the given + key. The first call creates the message queue with + the optional perms (default: 0666). + A second call to msg_get_queue for the same + key will return a different message queue + identifier, but both identifiers access the same underlying message + queue. + If the message queue already exists, the perms + will be ignored. + + + See also msg_remove_queue, + msg_receive, msg_send, + msg_stat_queue and + msg_set_queue. + + + - - - msg_receive - - Receive a message from a message queue - - - - Description - - boolmsg_receive - resourcequeue - intdesiredmsgtype - intmsgtype - intmaxsize - mixedmessage - boolunserialize - intflags - interrorcode - - - msg_receive will receive the first message from the - specified queue of the type specified by - desiredmsgtype. - The type of the message that was received will be stored in - msgtype. - The maximum size of message to be accepted is specified by the - maxsize; if the message in the queue is larger - than this size the function will fail (unless you set - flags as described below). - The received message will be stored in message, - unless there were errors receiving the message, in which case the - optional errorcode will be set to the value of the - system errno variable to help you identify the cause. - - - If desiredmsgtype is 0, the message from the front - of the queue is returned. If desiredmsgtype is - greater than 0, then the first message of that type is returned. - If desiredmsgtype is less than 0, the first - message on the queue with the lowest type less than or equal to the - absolute value of desiredmsgtype will be read. - If no messages match the criteria, your script will wait until a suitable - message arrives on the queue. You can prevent the script from blocking - by specifying MSG_IPC_NOWAIT in the - flags parameter. - - - unserialize defaults to &true;; if it is set to - &true;, the message is treated as though it was serialized using the same - mechanism as the session module. The message will be unserialized and - then returned to your script. This allows you to easily receive arrays - or complex object structures from other PHP scripts, or if you are using - the WDDX serializer, from any WDDX compatible source. - If unserialize is &false;, the message will be - returned as a binary-safe string. - - - The optional flags allows you to pass flags to the - low-level msgrcv system call. It defaults to 0, but you may specify one - or more of the following values (by adding or ORing them together). - - Flag values for msg_receive - - - - MSG_IPC_NOWAIT - If there are no messages of the - desiredmsgtype, return immediately and do not - wait. The function will fail and return an integer value - corresponding to MSG_ENOMSG. - - - - MSG_EXCEPT - Using this flag in combination with a - desiredmsgtype greater than 0 will cause the - function to receive the first message that is not equal to - desiredmsgtype. - - - MSG_NOERROR - - If the message is longer than maxsize, - setting this flag will truncate the message to - maxsize and will not signal an error. - - - - -
-
- - Upon successful completion the message queue data structure is updated as - follows: msg_lrpid is set to the process-ID of the - calling process, msg_qnum is decremented by 1 and - msg_rtime is set to the current time. - - - msg_receive returns &true; on success or &false; on - failure. If the function fails, the optional - errorcode will be set to the value of the system - errno variable. - - - See also msg_remove_queue, - msg_send, - msg_stat_queue and - msg_set_queue. - -
-
+ + + + msg_receive + Receive a message from a message queue + + + Description + + boolmsg_receive + resourcequeue + intdesiredmsgtype + intmsgtype + intmaxsize + mixedmessage + boolunserialize + intflags + interrorcode + + + msg_receive will receive the first message from the + specified queue of the type specified by + desiredmsgtype. + The type of the message that was received will be stored in + msgtype. + The maximum size of message to be accepted is specified by the + maxsize; if the message in the queue is larger + than this size the function will fail (unless you set + flags as described below). + The received message will be stored in message, + unless there were errors receiving the message, in which case the + optional errorcode will be set to the value of the + system errno variable to help you identify the cause. + + + If desiredmsgtype is 0, the message from the front + of the queue is returned. If desiredmsgtype is + greater than 0, then the first message of that type is returned. + If desiredmsgtype is less than 0, the first + message on the queue with the lowest type less than or equal to the + absolute value of desiredmsgtype will be read. + If no messages match the criteria, your script will wait until a suitable + message arrives on the queue. You can prevent the script from blocking + by specifying MSG_IPC_NOWAIT in the + flags parameter. + + + unserialize defaults to &true;; if it is set to + &true;, the message is treated as though it was serialized using the same + mechanism as the session module. The message will be unserialized and + then returned to your script. This allows you to easily receive arrays + or complex object structures from other PHP scripts, or if you are using + the WDDX serializer, from any WDDX compatible source. + If unserialize is &false;, the message will be + returned as a binary-safe string. + + + The optional flags allows you to pass flags to the + low-level msgrcv system call. It defaults to 0, but you may specify one + or more of the following values (by adding or ORing them together). + + Flag values for msg_receive + + + + MSG_IPC_NOWAIT + If there are no messages of the + desiredmsgtype, return immediately and do not + wait. The function will fail and return an integer value + corresponding to MSG_ENOMSG. + + + + MSG_EXCEPT + Using this flag in combination with a + desiredmsgtype greater than 0 will cause the + function to receive the first message that is not equal to + desiredmsgtype. + + + MSG_NOERROR + + If the message is longer than maxsize, + setting this flag will truncate the message to + maxsize and will not signal an error. + + + + +
+
+ + Upon successful completion the message queue data structure is updated as + follows: msg_lrpid is set to the process-ID of the + calling process, msg_qnum is decremented by 1 and + msg_rtime is set to the current time. + + + msg_receive returns &true; on success or &false; on + failure. If the function fails, the optional + errorcode will be set to the value of the system + errno variable. + + + See also msg_remove_queue, + msg_send, + msg_stat_queue and + msg_set_queue. + +
+
- - - msg_remove_queue - - Destroy a message queue - - - - Description - - boolmsg_remove_queue - resourcequeue - - - msg_remove_queue destroys the message queue specified - by the queue. Only use this function when all - processes have finished working with the message queue and you need to - release the system resources held by it. - - - See also msg_get_queue, - msg_receive, - msg_stat_queue and - msg_set_queue. - - - + + + + msg_remove_queue + Destroy a message queue + + + Description + + boolmsg_remove_queue + resourcequeue + + + msg_remove_queue destroys the message queue specified + by the queue. Only use this function when all + processes have finished working with the message queue and you need to + release the system resources held by it. + + + See also msg_get_queue, + msg_receive, + msg_stat_queue and + msg_set_queue. + + + - - - msg_send - - Send a message to a message queue - - - - Description - - boolmsg_send - resourcequeue - intmsgtype - mixedmessage - boolserialize - boolblocking - interrorcode - - - msg_send sends a message of type - msgtype (which MUST be greater than 0) to - the message queue specified by queue. - - - If the message is too large to fit in the queue, your script will wait - until another process reads messages from the queue and frees enough - space for your message to be sent. - This is called blocking; you can prevent blocking by setting the - optional blocking parameter to &false;, in which - case msg_send will immediately return &false; if the - message is too big for the queue, and set the optional - errorcode to MSG_EAGAIN, indicating that you should - try to send your message again a little later on. - - - The optional serialize controls how the - message is sent. serialize - defaults to &true; which means that the message is - serialized using the same mechanism as the session module before being - sent to the queue. This allows complex arrays and objects to be sent to - other PHP scripts, or if you are using the WDDX serializer, to any WDDX - compatible client. - - - Upon successful completion the message queue data structure is updated as - follows: msg_lspid is set to the process-ID of the - calling process, msg_qnum is incremented by 1 and - msg_stime is set to the current time. - - - See also msg_remove_queue, - msg_receive, - msg_stat_queue and - msg_set_queue. - - - + + + + msg_send + Send a message to a message queue + + + Description + + boolmsg_send + resourcequeue + intmsgtype + mixedmessage + boolserialize + boolblocking + interrorcode + + + msg_send sends a message of type + msgtype (which MUST be greater than 0) to + the message queue specified by queue. + + + If the message is too large to fit in the queue, your script will wait + until another process reads messages from the queue and frees enough + space for your message to be sent. + This is called blocking; you can prevent blocking by setting the + optional blocking parameter to &false;, in which + case msg_send will immediately return &false; if the + message is too big for the queue, and set the optional + errorcode to MSG_EAGAIN, indicating that you should + try to send your message again a little later on. + + + The optional serialize controls how the + message is sent. serialize + defaults to &true; which means that the message is + serialized using the same mechanism as the session module before being + sent to the queue. This allows complex arrays and objects to be sent to + other PHP scripts, or if you are using the WDDX serializer, to any WDDX + compatible client. + + + Upon successful completion the message queue data structure is updated as + follows: msg_lspid is set to the process-ID of the + calling process, msg_qnum is incremented by 1 and + msg_stime is set to the current time. + + + See also msg_remove_queue, + msg_receive, + msg_stat_queue and + msg_set_queue. + + + - - - msg_set_queue - - Set information in the message queue data structure - - - - Description - - boolmsg_set_queue - resourcequeue - arraydata - - - msg_set_queue allows you to change the values of the - msg_perm.uid, msg_perm.gid, msg_perm.mode and msg_qbytes fields of the - underlying message queue data structure. - You specify the values you require by setting the value of the keys that - you require in the data array. - - - Changing the data structure will require that PHP be running as the same - user that created the queue, owns the queue (as determined by the - existing msg_perm.xxx fields), or be running with root privileges. - root privileges are required to raise the msg_qbytes values above the - system defined limit. - - - See also msg_remove_queue, - msg_receive, - msg_stat_queue and - msg_get_queue. - - - + + + + msg_set_queue + Set information in the message queue data structure + + + Description + + boolmsg_set_queue + resourcequeue + arraydata + + + msg_set_queue allows you to change the values of the + msg_perm.uid, msg_perm.gid, msg_perm.mode and msg_qbytes fields of the + underlying message queue data structure. + You specify the values you require by setting the value of the keys that + you require in the data array. + + + Changing the data structure will require that PHP be running as the same + user that created the queue, owns the queue (as determined by the + existing msg_perm.xxx fields), or be running with root privileges. + root privileges are required to raise the msg_qbytes values above the + system defined limit. + + + See also msg_remove_queue, + msg_receive, + msg_stat_queue and + msg_get_queue. + + + - - - msg_stat_queue - - Returns information from the message queue data structure - - - - Description - - arraymsg_stat_queue - resourcequeue - - - msg_stat_queue returns the message queue meta data - for the message queue specified by the queue. - This is useful, for example, to determine which process sent the message - that was just received. - - - The return value is an array whose keys and values have the following - meanings: - - Array structure for msg_stat_queue - - - - msg_perm.uid - - The uid of the owner of the queue. - - - - msg_perm.gid - - The gid of the owner of the queue. - - - - msg_perm.mode - - The file access mode of the queue. - - - - msg_stime - - The time that the last message was sent to the queue. - - - - msg_rtime - - The time that the last message was received from the queue. - - - - msg_ctime - - The time that the queue was last changed. - - - - msg_qnum - - The number of messages waiting to be read from the queue. - - - - msg_qbytes - - The number of bytes of space currently available in the queue to - hold sent messages until they are received. - - - - msg_lspid - - The pid of the process that sent the last message to the queue. - - - - msg_lrpid - - The pid of the process that received the last message from the queue. - - - - -
-
- - See also msg_remove_queue, - msg_receive, - msg_get_queue and - msg_set_queue. - -
-
+ + + + msg_stat_queue + Returns information from the message queue data structure + + + Description + + arraymsg_stat_queue + resourcequeue + + + msg_stat_queue returns the message queue meta data + for the message queue specified by the queue. + This is useful, for example, to determine which process sent the message + that was just received. + + + The return value is an array whose keys and values have the following + meanings: + + Array structure for msg_stat_queue + + + + msg_perm.uid + + The uid of the owner of the queue. + + + + msg_perm.gid + + The gid of the owner of the queue. + + + + msg_perm.mode + + The file access mode of the queue. + + + + msg_stime + + The time that the last message was sent to the queue. + + + + msg_rtime + + The time that the last message was received from the queue. + + + + msg_ctime + + The time that the queue was last changed. + + + + msg_qnum + + The number of messages waiting to be read from the queue. + + + + msg_qbytes + + The number of bytes of space currently available in the queue to + hold sent messages until they are received. + + + + msg_lspid + + The pid of the process that sent the last message to the queue. + + + + msg_lrpid + + The pid of the process that received the last message from the queue. + + + + +
+
+ + See also msg_remove_queue, + msg_receive, + msg_get_queue and + msg_set_queue. + +
+
+ - - - sem_acquire - Acquire a semaphore - - - Description - - boolsem_acquire - resourcesem_identifier - - - sem_acquire blocks (if necessary) until the - semaphore can be acquired. A process attempting to acquire a - semaphore which it has already acquired will block forever - if acquiring the semaphore would cause its maximum number - of semaphore to be exceeded. - sem_identifier is a semaphore resource, - obtained from sem_get. - - - &return.success; - - - After processing a request, any semaphores acquired by the - process but not explicitly released will be released automatically - and a warning will be generated. - - - See also - sem_get, and - sem_release. - - - + + + sem_acquire + Acquire a semaphore + + + Description + + boolsem_acquire + resourcesem_identifier + + + sem_acquire blocks (if necessary) until the + semaphore can be acquired. A process attempting to acquire a + semaphore which it has already acquired will block forever + if acquiring the semaphore would cause its maximum number + of semaphore to be exceeded. + sem_identifier is a semaphore resource, + obtained from sem_get. + + + &return.success; + + + After processing a request, any semaphores acquired by the + process but not explicitly released will be released automatically + and a warning will be generated. + + + See also + sem_get, and + sem_release. + + + + - - - sem_get - Get a semaphore id - - - Description - - resourcesem_get - intkey - intmax_acquire - intperm - intauto_release - - - sem_get returns an id that can be used to - access the System V semaphore with the given key. - The semaphore is created if necessary using the permission bits specified in - perm (defaults to 0666). The number of processes that can - acquire the semaphore simultaneously is set to max_acquire - (defaults to 1). Actually this value is set only if the process - finds it is the only process currently attached to the semaphore. - - - Optional parameter auto_release specifies if the - semaphore should be automatically released on request shutdown. - It is available since PHP 4.3.0. - - - Returns a positive semaphore identifier on success, or &false; on - error. - - - A second call to sem_get for the same key - will return a different semaphore identifier, but both - identifiers access the same underlying semaphore. - - - See also sem_acquire, - sem_release, and ftok. - - - + + + sem_get + Get a semaphore id + + + Description + + resourcesem_get + intkey + intmax_acquire + intperm + intauto_release + + + sem_get returns an id that can be used to + access the System V semaphore with the given key. + The semaphore is created if necessary using the permission bits specified in + perm (defaults to 0666). The number of processes that can + acquire the semaphore simultaneously is set to max_acquire + (defaults to 1). Actually this value is set only if the process + finds it is the only process currently attached to the semaphore. + + + Optional parameter auto_release specifies if the + semaphore should be automatically released on request shutdown. + It is available since PHP 4.3.0. + + + Returns a positive semaphore identifier on success, or &false; on + error. + + + A second call to sem_get for the same key + will return a different semaphore identifier, but both + identifiers access the same underlying semaphore. + + + See also sem_acquire, + sem_release, and ftok. + + + + - - - sem_release - Release a semaphore - - - Description - - boolsem_release - resourcesem_identifier - - - sem_release releases the semaphore if it - is currently acquired by the calling process, otherwise - a warning is generated. - - - &return.success; - - - After releasing the semaphore, sem_acquire - may be called to re-acquire it. - - - See also - sem_get and - sem_acquire. - - - + + + sem_release + Release a semaphore + + + Description + + boolsem_release + resourcesem_identifier + + + sem_release releases the semaphore if it + is currently acquired by the calling process, otherwise + a warning is generated. + + + &return.success; + + + After releasing the semaphore, sem_acquire + may be called to re-acquire it. + + + See also + sem_get and + sem_acquire. + + + + - - - sem_remove - Remove a semaphore - - - Description - - boolsem_remove - resourcesem_identifier - - - sem_remove removes the semaphore - sem_identifier if it - has been created by sem_get, - otherwise generates a warning. - - - &return.success; - - - After removing the semaphore, it is no more accessible. - - - See also sem_get, - sem_release and - sem_acquire. - - - + + + sem_remove + Remove a semaphore + + + Description + + boolsem_remove + resourcesem_identifier + + + sem_remove removes the semaphore + sem_identifier if it + has been created by sem_get, + otherwise generates a warning. + + + &return.success; + + + After removing the semaphore, it is no more accessible. + + + See also sem_get, + sem_release and + sem_acquire. + + + + - - - shm_attach - Creates or open a shared memory segment - - - Description - - intshm_attach - intkey - intmemsize - intperm - - - shm_attach returns an id that can be - used to access the System V shared memory with the given key, the - first call creates the shared memory segment with memsize - (default: sysvshm.init_mem in the &php.ini;, otherwise - 10000 bytes) and the optional perm-bits perm - (default: 0666). - - - A second call to shm_attach for the same - key will return a different shared memory - identifier, but both identifiers access the same underlying - shared memory. Memsize and - perm will be ignored. - - - See also ftok, and shm_detach. - - - + + + shm_attach + Creates or open a shared memory segment + + + Description + + intshm_attach + intkey + intmemsize + intperm + + + shm_attach returns an id that can be + used to access the System V shared memory with the given key, the + first call creates the shared memory segment with memsize + (default: sysvshm.init_mem in the &php.ini;, otherwise + 10000 bytes) and the optional perm-bits perm + (default: 0666). + + + A second call to shm_attach for the same + key will return a different shared memory + identifier, but both identifiers access the same underlying + shared memory. Memsize and + perm will be ignored. + + + See also ftok, and shm_detach. + + + + - - - shm_detach - Disconnects from shared memory segment - - - Description - - boolshm_detach - intshm_identifier - - - shm_detach disconnects from the shared - memory given by the shm_identifier created - by shm_attach. Remember, that shared memory - still exist in the Unix system and the data is still present. - - - shm_detach always returns &true;. - - - See also shm_attach, shm_remove, - and shm_remove_var. - - - + + + shm_detach + Disconnects from shared memory segment + + + Description + + boolshm_detach + intshm_identifier + + + shm_detach disconnects from the shared + memory given by the shm_identifier created + by shm_attach. Remember, that shared memory + still exist in the Unix system and the data is still present. + + + shm_detach always returns &true;. + + + See also shm_attach, shm_remove, + and shm_remove_var. + + + + - - - shm_get_var - Returns a variable from shared memory - - - Description - - mixedshm_get_var - intshm_identifier - intvariable_key - - - shm_get_var returns the variable with a given - variable_key, in the shared memory - segment identified by shm_identifier. - shm_identifier was obtained from - shm_attach. The variable is still present - in the shared memory. - - - + + + shm_get_var + Returns a variable from shared memory + + + Description + + mixedshm_get_var + intshm_identifier + intvariable_key + + + shm_get_var returns the variable with a given + variable_key, in the shared memory + segment identified by shm_identifier. + shm_identifier was obtained from + shm_attach. The variable is still present + in the shared memory. + + + + - - - shm_put_var - - Inserts or updates a variable in shared memory - - - - Description - - boolshm_put_var - intshm_identifier - intvariable_key - mixedvariable - - - shm_put_var inserts or updates the - variable with the given - variable_key. - All variable-types are supported. - - - &return.success; - - - Warnings (E_WARNING level) will be issued if - shm_identifier is not a valid SysV shared memory - index or if there was not enough shared memory remaining to complete your - request. - - - + + + shm_put_var + Inserts or updates a variable in shared memory + + + Description + + boolshm_put_var + intshm_identifier + intvariable_key + mixedvariable + + + shm_put_var inserts or updates the + variable with the given + variable_key. + All variable-types are supported. + + + &return.success; + + + Warnings (E_WARNING level) will be issued if + shm_identifier is not a valid SysV shared memory + index or if there was not enough shared memory remaining to complete your + request. + + + + - - - shm_remove_var - Removes a variable from shared memory - - - - Description - - boolshm_remove_var - intshm_identifier - intvariable_key - - - Removes a variable with a given variable_key - and frees the occupied memory. - - - See also shm_remove. - - - + + + shm_remove_var + Removes a variable from shared memory + + + + Description + + boolshm_remove_var + intshm_identifier + intvariable_key + + + Removes a variable with a given variable_key + and frees the occupied memory. + + + See also shm_remove. + + + + - - - shm_remove - Removes shared memory from Unix systems - - - Description - - boolshm_remove - intshm_identifier - - - shm_remove removes the shared memory - shm_identifier. All data will be destroyed. - - - See also shm_remove_var. - - - + + + shm_remove + Removes shared memory from Unix systems + + + Description + + boolshm_remove + intshm_identifier + + + shm_remove removes the shared memory + shm_identifier. All data will be destroyed. + + + See also shm_remove_var. + + + + - - - session_cache_expire - Return current cache expire - - - Description - - intsession_cache_expire - intnew_cache_expire - - - session_cache_expire returns the current setting of - session.cache_expire. The value returned should be read - in minutes, defaults to 180. If new_cache_expire - is given, the current cache expire is replaced with - new_cache_expire. - - - The cache expire is reset to the default value of 180 stored in - session.cache_limiter at request startup time. Thus, - you need to call session_cache_expire for every - request (and before session_start is called). - - - <function>session_cache_expire</function> example - + + + session_cache_expire + Return current cache expire + + + Description + + intsession_cache_expire + intnew_cache_expire + + + session_cache_expire returns the current setting of + session.cache_expire. The value returned should be read + in minutes, defaults to 180. If new_cache_expire + is given, the current cache expire is replaced with + new_cache_expire. + + + The cache expire is reset to the default value of 180 stored in + session.cache_limiter at request startup time. Thus, + you need to call session_cache_expire for every + request (and before session_start is called). + + + <function>session_cache_expire</function> example + "; echo "The cached session pages expire after $cache_expire minutes"; ?> ]]> - - - - - Setting new_cache_expire is of value only, if - session.cache_limiter is set to a value - different from nocache. - - - - See also the configuration settings - session.cache_expire, - session.cache_limiter and session_cache_limiter. - - - + + + + + Setting new_cache_expire is of value only, if + session.cache_limiter is set to a value + different from nocache. + + + + See also the configuration settings + session.cache_expire, + session.cache_limiter and session_cache_limiter. + + + + - - - session_cache_limiter - Get and/or set the current cache limiter - - - Description - - stringsession_cache_limiter - stringcache_limiter - - - session_cache_limiter returns the name of the - current cache limiter. If cache_limiter - is specified, the name of the current cache limiter is changed to the - new value. - - - The cache limiter defines which cache control HTTP headers are sent to - the client. These headers determine the rules by which the page content - may be cached by the client and intermediate proxies. Setting the cache - limiter to nocache disallows any client/proxy caching. - A value of public permits caching by proxies and the - client, whereas private disallows caching by proxies - and permits the client to cache the contents. - - - In private mode, the Expire header sent to the - client may cause confusion for some browsers, including Mozilla. - You can avoid this problem by using - private_no_expire mode. The expire header is never - sent to the client in this mode. - - - - private_no_expire was added in PHP 4.2.0. - - - - The cache limiter is reset to the default value stored in - session.cache_limiter - at request startup time. Thus, you need to call - session_cache_limiter for every - request (and before session_start is called). - - - <function>session_cache_limiter</function> example - + + + session_cache_limiter + Get and/or set the current cache limiter + + + Description + + stringsession_cache_limiter + stringcache_limiter + + + session_cache_limiter returns the name of the + current cache limiter. If cache_limiter + is specified, the name of the current cache limiter is changed to the + new value. + + + The cache limiter defines which cache control HTTP headers are sent to + the client. These headers determine the rules by which the page content + may be cached by the client and intermediate proxies. Setting the cache + limiter to nocache disallows any client/proxy caching. + A value of public permits caching by proxies and the + client, whereas private disallows caching by proxies + and permits the client to cache the contents. + + + In private mode, the Expire header sent to the + client may cause confusion for some browsers, including Mozilla. + You can avoid this problem by using + private_no_expire mode. The expire header is never + sent to the client in this mode. + + + + private_no_expire was added in PHP 4.2.0. + + + + The cache limiter is reset to the default value stored in + session.cache_limiter + at request startup time. Thus, you need to call + session_cache_limiter for every + request (and before session_start is called). + + + <function>session_cache_limiter</function> example + "; ?> ]]> - - - - Also see the session.cache_limiter - configuration directive. - - - + + + + Also see the session.cache_limiter + configuration directive. + + + + - - - session_decode - Decodes session data from a string - - - Description - - boolsession_decode - stringdata - - - session_decode decodes the session data in - data, setting variables stored in the - session. - - - See also - session_encode. - - - + + + session_decode + Decodes session data from a string + + + Description + + boolsession_decode + stringdata + + + session_decode decodes the session data in + data, setting variables stored in the + session. + + + See also + session_encode. + + + + - - - session_destroy - Destroys all data registered to a session - - - Description - - boolsession_destroy - - - - session_destroy destroys all of the data - associated with the current session. It does not unset any of - the global variables associated with the session, or unset the - session cookie. - - - In order to kill the session altogether, like to log the user out, the - session id must also be unset. If a cookie is used to propagate the - session id (default behavior), then the session cookie must be deleted. - setcookie may be used for that. - - - &return.success; - - - - Destroying a session with <varname>$_SESSION</varname> - + + + session_destroy + Destroys all data registered to a session + + + Description + + boolsession_destroy + + + + session_destroy destroys all of the data + associated with the current session. It does not unset any of + the global variables associated with the session, or unset the + session cookie. + + + In order to kill the session altogether, like to log the user out, the + session id must also be unset. If a cookie is used to propagate the + session id (default behavior), then the session cookie must be deleted. + setcookie may be used for that. + + + &return.success; + + + + Destroying a session with <varname>$_SESSION</varname> + ]]> - - - - - - Only use session_unset for older deprecated code - that does not use $_SESSION. - - - - See also - unset and - setcookie. - - - + + + + + + Only use session_unset for older deprecated code + that does not use $_SESSION. + + + + See also + unset and + setcookie. + + + + - - - session_encode - - Encodes the current session data as a string - - - - Description - - stringsession_encode - - - - session_encode returns a string with the - contents of the current session encoded within. - - - See also - session_decode - - - + + + session_encode + Encodes the current session data as a string + + + Description + + stringsession_encode + + + + session_encode returns a string with the + contents of the current session encoded within. + + + See also + session_decode + + + + - - - session_get_cookie_params - - Get the session cookie parameters - - - - Description - - arraysession_get_cookie_params - - - - The session_get_cookie_params function returns an - array with the current session cookie information, the array contains - the following items: - - - - "lifetime" - The lifetime of the cookie in seconds. - - - - - "path" - The path where information is stored. - - - - - "domain" - The domain of the cookie. - - - - - "secure" - The cookie should only be sent over secure connections. - (This item was added in PHP 4.0.4.) - - - - - "httponly" - The cookie can only be accessed through the HTTP protocol - (This item was added in PHP 5.2.0). - - - - - - See also the configuration directives - session.cookie_lifetime, - session.cookie_path, - session.cookie_domain, - session.cookie_secure, - session.cookie_httponly, and - session_set_cookie_params. - - - + + + session_get_cookie_params + Get the session cookie parameters + + + Description + + arraysession_get_cookie_params + + + + The session_get_cookie_params function returns an + array with the current session cookie information, the array contains + the following items: + + + + "lifetime" - The lifetime of the cookie in seconds. + + + + + "path" - The path where information is stored. + + + + + "domain" - The domain of the cookie. + + + + + "secure" - The cookie should only be sent over secure connections. + (This item was added in PHP 4.0.4.) + + + + + "httponly" - The cookie can only be accessed through the HTTP protocol + (This item was added in PHP 5.2.0). + + + + + + See also the configuration directives + session.cookie_lifetime, + session.cookie_path, + session.cookie_domain, + session.cookie_secure, + session.cookie_httponly, and + session_set_cookie_params. + + + + - - - session_is_registered - - Find out whether a global variable is registered in a session - - - - Description - - boolsession_is_registered - stringname - - - session_is_registered returns &true; if there - is a global variable with the name name - registered in the current session. - - - - If $_SESSION (or - $HTTP_SESSION_VARS for PHP 4.0.6 or less) is - used, use isset to check a variable is - registered in $_SESSION. - - - - - If you are using - $_SESSION (or $HTTP_SESSION_VARS), - do not use session_register, - session_is_registered and - session_unregister. - - - - + + + session_is_registered + Find out whether a global variable is registered in a session + + + Description + + boolsession_is_registered + stringname + + + session_is_registered returns &true; if there + is a global variable with the name name + registered in the current session. + + + + If $_SESSION (or + $HTTP_SESSION_VARS for PHP 4.0.6 or less) is + used, use isset to check a variable is + registered in $_SESSION. + + + + + If you are using + $_SESSION (or $HTTP_SESSION_VARS), + do not use session_register, + session_is_registered and + session_unregister. + + + + + - - - session_module_name - Get and/or set the current session module - - - Description - - stringsession_module_name - stringmodule - - - session_module_name returns the name of the - current session module. If module is - specified, that module will be used instead. - - - + + + session_module_name + Get and/or set the current session module + + + Description + + stringsession_module_name + stringmodule + + + session_module_name returns the name of the + current session module. If module is + specified, that module will be used instead. + + + + - - - session_name - Get and/or set the current session name - - - Description - - stringsession_name - stringname - - - session_name returns the name of the current - session. If name is specified, the name of - the current session is changed to its value. - - - The session name references the session id in cookies and - URLs. It should contain only alphanumeric characters; it should - be short and descriptive (i.e. for users with enabled cookie - warnings). The session name is reset to the default value - stored in session.name at request startup - time. Thus, you need to call session_name - for every request (and before session_start - or session_register are called). - - - - The session name can't consist of digits only, at least one letter must - be present. Otherwise a new session id is generated every time. - - - - <function>session_name</function> examples - + + + session_name + Get and/or set the current session name + + + Description + + stringsession_name + stringname + + + session_name returns the name of the current + session. If name is specified, the name of + the current session is changed to its value. + + + The session name references the session id in cookies and + URLs. It should contain only alphanumeric characters; it should + be short and descriptive (i.e. for users with enabled cookie + warnings). The session name is reset to the default value + stored in session.name at request startup + time. Thus, you need to call session_name + for every request (and before session_start + or session_register are called). + + + + The session name can't consist of digits only, at least one letter must + be present. Otherwise a new session id is generated every time. + + + + <function>session_name</function> examples + "; ?> ]]> - - - - See also the session.name - configuration directive. - - - + + + + See also the session.name + configuration directive. + + + + - - - session_register - - Register one or more global variables with the current session - - - - Description - - boolsession_register - mixedname - mixed... - - - session_register accepts a variable number of - arguments, any of which can be either a string holding the name of a - variable or an array consisting of variable names or other arrays. For - each name, session_register registers the global - variable with that name in the current session. - - - - If you want your script to work regardless of register_globals, - you need to instead use the - $_SESSION array - as $_SESSION entries are automatically - registered. If your script uses - session_register, it will not work in - environments where the PHP directive - register_globals - is disabled. - - - - ¬e.registerglobals; - - - - This registers a global variable. If you - want to register a session variable from within a function, you - need to make sure to make it global using the global - keyword or the $GLOBALS[] array, or use the - special session arrays as noted below. - - - - - If you are using $_SESSION - (or $HTTP_SESSION_VARS), do not use - session_register, - session_is_registered, and - session_unregister. - - - - This function returns &true; when all of the variables are successfully - registered with the session. - - - If session_start was not called before this function - is called, an implicit call to session_start with no - parameters will be made. $_SESSION does not mimic - this behavior and requires session_start before use. - - - You can also create a session variable by simply setting the - appropriate member of the $_SESSION - or $HTTP_SESSION_VARS (PHP < 4.1.0) array. - - + + + session_register + Register one or more global variables with the current session + + + Description + + boolsession_register + mixedname + mixed... + + + session_register accepts a variable number of + arguments, any of which can be either a string holding the name of a + variable or an array consisting of variable names or other arrays. For + each name, session_register registers the global + variable with that name in the current session. + + + + If you want your script to work regardless of register_globals, + you need to instead use the + $_SESSION array + as $_SESSION entries are automatically + registered. If your script uses + session_register, it will not work in + environments where the PHP directive + register_globals + is disabled. + + + + ¬e.registerglobals; + + + + This registers a global variable. If you + want to register a session variable from within a function, you + need to make sure to make it global using the global + keyword or the $GLOBALS[] array, or use the + special session arrays as noted below. + + + + + If you are using $_SESSION + (or $HTTP_SESSION_VARS), do not use + session_register, + session_is_registered, and + session_unregister. + + + + This function returns &true; when all of the variables are successfully + registered with the session. + + + If session_start was not called before this function + is called, an implicit call to session_start with no + parameters will be made. $_SESSION does not mimic + this behavior and requires session_start before use. + + + You can also create a session variable by simply setting the + appropriate member of the $_SESSION + or $HTTP_SESSION_VARS (PHP < 4.1.0) array. + + ]]> - - - - - - It is currently impossible to register resource variables in a - session. For example, you cannot create a connection to a - database and store the connection id as a session variable and - expect the connection to still be valid the next time the - session is restored. PHP functions that return a resource are - identified by having a return type of - resource in their function definition. A - list of functions that return resources are available in the - resource types appendix. - - - If $_SESSION (or - $HTTP_SESSION_VARS for PHP 4.0.6 or less) is - used, assign values to - $_SESSION. For example: $_SESSION['var'] = 'ABC'; - - - - See also session_is_registered, - session_unregister, and - $_SESSION. - - - + + + + + + It is currently impossible to register resource variables in a + session. For example, you cannot create a connection to a + database and store the connection id as a session variable and + expect the connection to still be valid the next time the + session is restored. PHP functions that return a resource are + identified by having a return type of + resource in their function definition. A + list of functions that return resources are available in the + resource types appendix. + + + If $_SESSION (or + $HTTP_SESSION_VARS for PHP 4.0.6 or less) is + used, assign values to + $_SESSION. For example: $_SESSION['var'] = 'ABC'; + + + + See also session_is_registered, + session_unregister, and + $_SESSION. + + + + - - - session_save_path - Get and/or set the current session save path - - - Description - - stringsession_save_path - stringpath - + + + session_save_path + Get and/or set the current session save path + + + Description + + stringsession_save_path + stringpath + + + session_save_path returns the path of the current + directory used to save session data. If path + is specified, the path to which data is saved will be changed. + session_save_path needs to be called before + session_start for that purpose. + - session_save_path returns the path of the current - directory used to save session data. If path - is specified, the path to which data is saved will be changed. - session_save_path needs to be called before - session_start for that purpose. - - - On some operating systems, you may want to specify a path on a - filesystem that handles lots of small files efficiently. For - example, on Linux, reiserfs may provide better performance than - ext2fs. - - + On some operating systems, you may want to specify a path on a + filesystem that handles lots of small files efficiently. For + example, on Linux, reiserfs may provide better performance than + ext2fs. - - See also the session.save_path - configuration directive. - - - + + + + See also the session.save_path + configuration directive. + + + + - - - session_set_cookie_params - - Set the session cookie parameters - - - - Description - - voidsession_set_cookie_params - intlifetime - stringpath - stringdomain - boolsecure - boolhttponly - - - Set cookie parameters defined in the &php.ini; file. The effect of this - function only lasts for the duration of the script. Thus, you need to - call session_set_cookie_params for every request and - before session_start is called. - - - - The secure parameter was added in PHP - 4.0.4, while the httponly parameter was added in - PHP 5.2.0. - - - - See also the configuration directives - session.cookie_lifetime, - session.cookie_path, - session.cookie_domain, - session.cookie_secure, - session.cookie_httponly, and - session_get_cookie_params. - - - + + + session_set_cookie_params + Set the session cookie parameters + + + Description + + voidsession_set_cookie_params + intlifetime + stringpath + stringdomain + boolsecure + boolhttponly + + + Set cookie parameters defined in the &php.ini; file. The effect of this + function only lasts for the duration of the script. Thus, you need to + call session_set_cookie_params for every request and + before session_start is called. + + + + The secure parameter was added in PHP + 4.0.4, while the httponly parameter was added in + PHP 5.2.0. + + + + See also the configuration directives + session.cookie_lifetime, + session.cookie_path, + session.cookie_domain, + session.cookie_secure, + session.cookie_httponly, and + session_get_cookie_params. + + + + - - - session_set_save_handler - - Sets user-level session storage functions - - - - Description - - boolsession_set_save_handler - callbackopen - callbackclose - callbackread - callbackwrite - callbackdestroy - callbackgc - - - session_set_save_handler sets the user-level - session storage functions which are used for storing and - retrieving data associated with a session. This is most useful - when a storage method other than those supplied by PHP sessions - is preferred. i.e. Storing the session data in a local database. - &return.success; - - - - The "write" handler is not executed until after the output - stream is closed. Thus, output from debugging statements in the - "write" handler will never be seen in the browser. If debugging - output is necessary, it is suggested that the debug output be - written to a file instead. - - - - The following example provides file based session - storage similar to the PHP sessions default save handler - files. This example could easily be - extended to cover database storage using your favorite PHP - supported database engine. - - - Read function must return string value always to make save - handler work as expected. Return empty string if there is no data - to read. Return values from other handlers are converted to - boolean expression. &true; for success, &false; for failure. - - - - Write and Close handlers are called after destructing objects since PHP - 5.0.5. Thus destructors can use sessions but session handler can't use - objects. In prior versions, they were called in the opposite order. It - is possible to call session_write_close from the - destructor to solve this chicken and egg problem. - - - - - - <function>session_set_save_handler</function> example - - + + + session_set_save_handler + Sets user-level session storage functions + + + Description + + boolsession_set_save_handler + callbackopen + callbackclose + callbackread + callbackwrite + callbackdestroy + callbackgc + + + session_set_save_handler sets the user-level + session storage functions which are used for storing and + retrieving data associated with a session. This is most useful + when a storage method other than those supplied by PHP sessions + is preferred. i.e. Storing the session data in a local database. + &return.success; + + + + The "write" handler is not executed until after the output + stream is closed. Thus, output from debugging statements in the + "write" handler will never be seen in the browser. If debugging + output is necessary, it is suggested that the debug output be + written to a file instead. + + + + The following example provides file based session + storage similar to the PHP sessions default save handler + files. This example could easily be + extended to cover database storage using your favorite PHP + supported database engine. + + + Read function must return string value always to make save + handler work as expected. Return empty string if there is no data + to read. Return values from other handlers are converted to + boolean expression. &true; for success, &false; for failure. + + + + Write and Close handlers are called after destructing objects since PHP + 5.0.5. Thus destructors can use sessions but session handler can't use + objects. In prior versions, they were called in the opposite order. It + is possible to call session_write_close from the + destructor to solve this chicken and egg problem. + + + + + + <function>session_set_save_handler</function> example + + ]]> - - - - - See also the session.save_handler - configuration directive. - - - + + + + + See also the session.save_handler + configuration directive. + + + + - - - session_start - Initialize session data - - - Description - - boolsession_start - - - - session_start creates a session or resumes - the current one based on the current session id that's being - passed via a request, such as GET, POST, or a cookie. - - - This function always returns &true;. - - - - If you are using cookie-based sessions, you must call - session_start before anything is outputted to the - browser. - - - - - A session example: <filename>page1.php</filename> - + + + session_start + Initialize session data + + + Description + + boolsession_start + + + + session_start creates a session or resumes + the current one based on the current session id that's being + passed via a request, such as GET, POST, or a cookie. + + + This function always returns &true;. + + + + If you are using cookie-based sessions, you must call + session_start before anything is outputted to the + browser. + + + + + A session example: <filename>page1.php</filename> + page 2'; echo '
page 2'; ?> ]]> -
-
-
- - After viewing page1.php, the second page - page2.php will magically contain the session - data. Read the session reference - for information on propagating - session ids as it, for example, explains what the constant - SID is all about. - - - - A session example: <filename>page2.php</filename> - + + + + + After viewing page1.php, the second page + page2.php will magically contain the session + data. Read the session reference + for information on propagating + session ids as it, for example, explains what the constant + SID is all about. + + + + A session example: <filename>page2.php</filename> + page 1'; ?> ]]> - - - - - If you want to use a named session, you must call - session_name before calling - session_start. - - - session_start will register internal output - handler for URL rewriting when trans-sid is - enabled. If a user uses ob_gzhandler or like - with ob_start, the order of output handler - is important for proper output. For example, user must register - ob_gzhandler before session start. - - - - Use of zlib.output_compression - is recommended rather than ob_gzhandler - - - - - As of PHP 4.3.3, calling session_start while the - session has already been started will result in an error of level - E_NOTICE. Also, the second session start will - simply be ignored. - - - - See also - $_SESSION, - session.auto_start, and - session_id. - -
-
+
+
+
+ + If you want to use a named session, you must call + session_name before calling + session_start. + + + session_start will register internal output + handler for URL rewriting when trans-sid is + enabled. If a user uses ob_gzhandler or like + with ob_start, the order of output handler + is important for proper output. For example, user must register + ob_gzhandler before session start. + + + + Use of zlib.output_compression + is recommended rather than ob_gzhandler + + + + + As of PHP 4.3.3, calling session_start while the + session has already been started will result in an error of level + E_NOTICE. Also, the second session start will + simply be ignored. + + + + See also + $_SESSION, + session.auto_start, and + session_id. + +
+
+ - - - session_unregister - - Unregister a global variable from the current session - - - - Description - - boolsession_unregister - stringname - - - session_unregister unregisters - the global variable named name from the - current session. - - - This function returns &true; when the variable is successfully - unregistered from the session. - - - - If $_SESSION (or - $HTTP_SESSION_VARS for PHP 4.0.6 or less) is - used, use unset to unregister a session - variable. Do not unset $_SESSION - itself as this will disable the special function of the - $_SESSION superglobal. - - - - - This function does not unset the corresponding global variable for - name, it only prevents the variable from being - saved as part of the session. You must call unset - to remove the corresponding global variable. - - - - - If you are using - $_SESSION (or $HTTP_SESSION_VARS), - do not use session_register, - session_is_registered and - session_unregister. - - - - + + + session_unregister + Unregister a global variable from the current session + + + Description + + boolsession_unregister + stringname + + + session_unregister unregisters + the global variable named name from the + current session. + + + This function returns &true; when the variable is successfully + unregistered from the session. + + + + If $_SESSION (or + $HTTP_SESSION_VARS for PHP 4.0.6 or less) is + used, use unset to unregister a session + variable. Do not unset $_SESSION + itself as this will disable the special function of the + $_SESSION superglobal. + + + + + This function does not unset the corresponding global variable for + name, it only prevents the variable from being + saved as part of the session. You must call unset + to remove the corresponding global variable. + + + + + If you are using + $_SESSION (or $HTTP_SESSION_VARS), + do not use session_register, + session_is_registered and + session_unregister. + + + + + - - - session_unset - - Free all session variables - - - - Description - - voidsession_unset - - + + + session_unset + Free all session variables + + + Description + + voidsession_unset + + + + The session_unset function frees all session variables + currently registered. + + + + If $_SESSION (or + $HTTP_SESSION_VARS for PHP 4.0.6 or less) is + used, use unset to unregister a session + variable, i.e. unset ($_SESSION['varname']);. + + + + - The session_unset function frees all session variables - currently registered. + Do NOT unset the whole $_SESSION with + unset($_SESSION) as this will disable the + registering of session variables through the + $_SESSION superglobal. - - - If $_SESSION (or - $HTTP_SESSION_VARS for PHP 4.0.6 or less) is - used, use unset to unregister a session - variable, i.e. unset ($_SESSION['varname']);. - - - - - - Do NOT unset the whole $_SESSION with - unset($_SESSION) as this will disable the - registering of session variables through the - $_SESSION superglobal. - - - - - + + + + + - - - session_write_close - Write session data and end session - - - Description - - voidsession_write_close - - - - End the current session and store session data. - - - Session data is usually stored after your script terminated - without the need to call session_write_close, but as - session data is locked to prevent concurrent writes only one - script may operate on a session at any time. When using framesets - together with sessions you will experience the frames loading one - by one due to this locking. You can reduce the time needed to - load all the frames by ending the session as soon as all changes - to session variables are done. - - - - + + + session_write_close + Write session data and end session + + + Description + + voidsession_write_close + + + + End the current session and store session data. + + + Session data is usually stored after your script terminated + without the need to call session_write_close, but as + session data is locked to prevent concurrent writes only one + script may operate on a session at any time. When using framesets + together with sessions you will experience the frames loading one + by one due to this locking. You can reduce the time needed to + load all the frames by ending the session as soon as all changes + to session variables are done. + + + + - - - socket_accept - Accepts a connection on a socket - - - Description - - resourcesocket_accept - resourcesocket - - - After the socket socket has been created - using socket_create, bound to a name with - socket_bind, and told to listen for connections - with socket_listen, this function will accept - incoming connections on that socket. Once a successful connection - is made, a new socket resource is returned, which may be used - for communication. If there are multiple connections queued on - the socket, the first will be used. If there are no pending - connections, socket_accept will block until - a connection becomes present. If socket - has been made non-blocking using - socket_set_blocking or - socket_set_nonblock, &false; will be returned. - - - The socket resource returned by - socket_accept may not be used to accept new - connections. The original listening socket - socket, however, remains open and may be - reused. - - - Returns a new socket resource on success, or &false; on error. The actual - error code can be retrieved by calling - socket_last_error. This error code may be passed to - socket_strerror to get a textual explanation of the - error. - - - See also - socket_bind, - socket_connect, - socket_listen, - socket_create, and - socket_strerror. - - - + + + socket_accept + Accepts a connection on a socket + + + Description + + resourcesocket_accept + resourcesocket + + + After the socket socket has been created + using socket_create, bound to a name with + socket_bind, and told to listen for connections + with socket_listen, this function will accept + incoming connections on that socket. Once a successful connection + is made, a new socket resource is returned, which may be used + for communication. If there are multiple connections queued on + the socket, the first will be used. If there are no pending + connections, socket_accept will block until + a connection becomes present. If socket + has been made non-blocking using + socket_set_blocking or + socket_set_nonblock, &false; will be returned. + + + The socket resource returned by + socket_accept may not be used to accept new + connections. The original listening socket + socket, however, remains open and may be + reused. + + + Returns a new socket resource on success, or &false; on error. The actual + error code can be retrieved by calling + socket_last_error. This error code may be passed to + socket_strerror to get a textual explanation of the + error. + + + See also + socket_bind, + socket_connect, + socket_listen, + socket_create, and + socket_strerror. + + + - - - socket_clear_error - Clears the error on the socket or the last error code - - - Description - - voidsocket_clear_error - resourcesocket - - - This function clears the error code on the given socket or the global - last socket error. - - - This function allows explicitly resetting the error code value either of - a socket or of the extension global last error code. This may be useful - to detect within a part of the application if an error occurred or not. - - - See also - socket_last_error and - socket_strerror. - - - + + + + socket_clear_error + Clears the error on the socket or the last error code + + + Description + + voidsocket_clear_error + resourcesocket + + + This function clears the error code on the given socket or the global + last socket error. + + + This function allows explicitly resetting the error code value either of + a socket or of the extension global last error code. This may be useful + to detect within a part of the application if an error occurred or not. + + + See also + socket_last_error and + socket_strerror. + + + + - - - socket_close - Closes a socket resource - - - Description - - voidsocket_close - resourcesocket - - - socket_close closes the socket resource - given by socket. - - - - socket_close can't be used on PHP file resources - created with fopen, popen, - fsockopen, or pfsockopen; it is - meant for sockets created with socket_create or - socket_accept. - - - - See also socket_bind, socket_listen, - socket_create and - socket_strerror. - - - + + + socket_close + Closes a socket resource + + + Description + + voidsocket_close + resourcesocket + + + socket_close closes the socket resource + given by socket. + + + + socket_close can't be used on PHP file resources + created with fopen, popen, + fsockopen, or pfsockopen; it is + meant for sockets created with socket_create or + socket_accept. + + + + See also socket_bind, socket_listen, + socket_create and + socket_strerror. + + + + - - - socket_connect - Initiates a connection on a socket - - - Description - - boolsocket_connect - resourcesocket - stringaddress - intport - - - Initiates a connection using the socket resource - socket, which must be a valid socket - resource created with socket_create. - - - The address parameter is either an IP - address in dotted-quad notation - (e.g. 127.0.0.1), if the socket is of the - AF_INET family; or the pathname of a - Unix domain socket, if the socket family is - AF_UNIX. - - - The port parameter is only used when - connecting to an AF_INET socket, and - designates the port on the remote host to which a connection - should be made. - - - &return.success; The error code can be retrieved with - socket_last_error. This code may be passed to - socket_strerror to get a textual explanation of the - error. - - - - If the socket is non-blocking then this function returns &false; with an - error Operation now in progress. - - - - See also - socket_bind, - socket_listen, - socket_create, - socket_last_error and - socket_strerror. - - - + + + socket_connect + Initiates a connection on a socket + + + Description + + boolsocket_connect + resourcesocket + stringaddress + intport + + + Initiates a connection using the socket resource + socket, which must be a valid socket + resource created with socket_create. + + + The address parameter is either an IP + address in dotted-quad notation + (e.g. 127.0.0.1), if the socket is of the + AF_INET family; or the pathname of a + Unix domain socket, if the socket family is + AF_UNIX. + + + The port parameter is only used when + connecting to an AF_INET socket, and + designates the port on the remote host to which a connection + should be made. + + + &return.success; The error code can be retrieved with + socket_last_error. This code may be passed to + socket_strerror to get a textual explanation of the + error. + + + + If the socket is non-blocking then this function returns &false; with an + error Operation now in progress. + + + + See also + socket_bind, + socket_listen, + socket_create, + socket_last_error and + socket_strerror. + + + + - - - socket_create_listen - Opens a socket on port to accept connections - - - Description - - resourcesocket_create_listen - intport - intbacklog - - - This function is meant to ease the task of creating a new socket which - only listens to accept new connections. - - - socket_create_listen creates a new socket resource of - type AF_INET listening on all - local interfaces on the given port waiting for new connections. - - - The backlog parameter defines the maximum length - the queue of pending connections may grow to. - SOMAXCONN may be passed as - backlog parameter, see - socket_listen for more information. - - - socket_create_listen returns a new socket resource - on success or &false; on error. The error code can be retrieved with - socket_last_error. This code may be passed to - socket_strerror to get a textual explanation of the - error. - - - - If you want to create a socket which only listens on a certain - interface you need to use socket_create, - socket_bind and socket_listen. - - - - See also - socket_create, - socket_bind, - socket_listen, - socket_last_error and - socket_strerror. - - - + + + socket_create_listen + Opens a socket on port to accept connections + + + Description + + resourcesocket_create_listen + intport + intbacklog + + + This function is meant to ease the task of creating a new socket which + only listens to accept new connections. + + + socket_create_listen creates a new socket resource of + type AF_INET listening on all + local interfaces on the given port waiting for new connections. + + + The backlog parameter defines the maximum length + the queue of pending connections may grow to. + SOMAXCONN may be passed as + backlog parameter, see + socket_listen for more information. + + + socket_create_listen returns a new socket resource + on success or &false; on error. The error code can be retrieved with + socket_last_error. This code may be passed to + socket_strerror to get a textual explanation of the + error. + + + + If you want to create a socket which only listens on a certain + interface you need to use socket_create, + socket_bind and socket_listen. + + + + See also + socket_create, + socket_bind, + socket_listen, + socket_last_error and + socket_strerror. + + + + - - - socket_create_pair - Creates a pair of indistinguishable sockets and stores them in an array - - - Description - - boolsocket_create_pair - intdomain - inttype - intprotocol - arrayfd - - - socket_create_pair creates two connected and indistinguishable sockets, and stores - them in fd. This function is commonly used in IPC (InterProcess Communication). - - - The domain parameter specifies the protocol - family to be used by the socket. - - - Available address/protocol families - - - - Domain - Description - - - - - AF_INET - - IPv4 Internet based protocols. TCP and UDP are common protocols of - this protocol family. Supported only in windows. - - - - AF_INET6 - - IPv6 Internet based protocols. TCP and UDP are common protocols of - this protocol family. Support added in PHP 5.0.0. - Supported only in windows. - - - - AF_UNIX - - Local communication protocol family. High efficiency and low - overhead make it a great form of IPC (Interprocess Communication). - - - - -
- - The type parameter selects the type of communication - to be used by the socket. - - - Available socket types - - - - Type - Description - - - - - SOCK_STREAM - - Provides sequenced, reliable, full-duplex, connection-based byte streams. - An out-of-band data transmission mechanism may be supported. - The TCP protocol is based on this socket type. - - - - SOCK_DGRAM - - Supports datagrams (connectionless, unreliable messages of a fixed maximum length). - The UDP protocol is based on this socket type. - - - - SOCK_SEQPACKET - - Provides a sequenced, reliable, two-way connection-based data transmission path for - datagrams of fixed maximum length; a consumer is required to read an - entire packet with each read call. - - - - SOCK_RAW - - Provides raw network protocol access. This special type of socket - can be used to manually construct any type of protocol. A common use - for this socket type is to perform ICMP requests (like ping, - traceroute, etc). - - - - SOCK_RDM - - Provides a reliable datagram layer that does not guarantee ordering. - This is most likely not implemented on your operating system. - - - - -
- - The protocol parameter sets the specific - protocol within the specified domain to be used - when communicating on the returned socket. The proper value can be retrieved by - name by using getprotobyname. If - the desired protocol is TCP, or UDP the corresponding constants - SOL_TCP, and SOL_UDP - can also be used. - - - Common protocols - - - - Name - Description - - - - - icmp - - The Internet Control Message Protocol is used primarily by gateways - and hosts to report errors in datagram communication. The "ping" - command (present in most modern operating systems) is an example - application of ICMP. - - - - udp - - The User Datagram Protocol is a connectionless, unreliable, - protocol with fixed record lengths. Due to these aspects, UDP - requires a minimum amount of protocol overhead. - - - - tcp - - The Transmission Control Protocol is a reliable, connection based, - stream oriented, full duplex protocol. TCP guarantees that all data packets - will be received in the order in which they were sent. If any packet is somehow - lost during communication, TCP will automatically retransmit the packet until - the destination host acknowledges that packet. For reliability and performance - reasons, the TCP implementation itself decides the appropriate octet boundaries - of the underlying datagram communication layer. Therefore, TCP applications must - allow for the possibility of partial record transmission. - - - - -
- - + + + socket_create_pair + Creates a pair of indistinguishable sockets and stores them in an array + + + Description + + boolsocket_create_pair + intdomain + inttype + intprotocol + arrayfd + + + socket_create_pair creates two connected and indistinguishable sockets, and stores + them in fd. This function is commonly used in IPC (InterProcess Communication). + + + The domain parameter specifies the protocol + family to be used by the socket. + + + Available address/protocol families + + + + Domain + Description + + + + + AF_INET + + IPv4 Internet based protocols. TCP and UDP are common protocols of + this protocol family. Supported only in windows. + + + + AF_INET6 + + IPv6 Internet based protocols. TCP and UDP are common protocols of + this protocol family. Support added in PHP 5.0.0. + Supported only in windows. + + + + AF_UNIX + + Local communication protocol family. High efficiency and low + overhead make it a great form of IPC (Interprocess Communication). + + + + +
+ + The type parameter selects the type of communication + to be used by the socket. + + + Available socket types + + + + Type + Description + + + + + SOCK_STREAM + + Provides sequenced, reliable, full-duplex, connection-based byte streams. + An out-of-band data transmission mechanism may be supported. + The TCP protocol is based on this socket type. + + + + SOCK_DGRAM + + Supports datagrams (connectionless, unreliable messages of a fixed maximum length). + The UDP protocol is based on this socket type. + + + + SOCK_SEQPACKET + + Provides a sequenced, reliable, two-way connection-based data transmission path for + datagrams of fixed maximum length; a consumer is required to read an + entire packet with each read call. + + + + SOCK_RAW + + Provides raw network protocol access. This special type of socket + can be used to manually construct any type of protocol. A common use + for this socket type is to perform ICMP requests (like ping, + traceroute, etc). + + + + SOCK_RDM + + Provides a reliable datagram layer that does not guarantee ordering. + This is most likely not implemented on your operating system. + + + + +
+ + The protocol parameter sets the specific + protocol within the specified domain to be used + when communicating on the returned socket. The proper value can be retrieved by + name by using getprotobyname. If + the desired protocol is TCP, or UDP the corresponding constants + SOL_TCP, and SOL_UDP + can also be used. + + + Common protocols + + + + Name + Description + + + + + icmp + + The Internet Control Message Protocol is used primarily by gateways + and hosts to report errors in datagram communication. The "ping" + command (present in most modern operating systems) is an example + application of ICMP. + + + + udp + + The User Datagram Protocol is a connectionless, unreliable, + protocol with fixed record lengths. Due to these aspects, UDP + requires a minimum amount of protocol overhead. + + + + tcp + + The Transmission Control Protocol is a reliable, connection based, + stream oriented, full duplex protocol. TCP guarantees that all data packets + will be received in the order in which they were sent. If any packet is somehow + lost during communication, TCP will automatically retransmit the packet until + the destination host acknowledges that packet. For reliability and performance + reasons, the TCP implementation itself decides the appropriate octet boundaries + of the underlying datagram communication layer. Therefore, TCP applications must + allow for the possibility of partial record transmission. + + + + +
+ + <function>socket_create_pair</function> example ]]> - - - - + + + + <function>socket_create_pair</function> IPC example ]]> - - -
-
+
+
+
+
+ - - - socket_create - Create a socket (endpoint for communication) - - - Description - - resourcesocket_create - intdomain - inttype - intprotocol - - - Creates and returns a socket resource, also referred to as an endpoint - of communication. A typical network connection is made up of 2 sockets, one - performing the role of the client, and another performing the role of the server. - - - The domain parameter specifies the protocol - family to be used by the socket. - - - Available address/protocol families - - - - Domain - Description - - - - - AF_INET - - IPv4 Internet based protocols. TCP and UDP are common protocols of - this protocol family. - - - - AF_INET6 - - IPv6 Internet based protocols. TCP and UDP are common protocols of - this protocol family. Support added in PHP 5.0.0. - - - - AF_UNIX - - Local communication protocol family. High efficiency and low - overhead make it a great form of IPC (Interprocess Communication). - - - - -
- - The type parameter selects the type of communication - to be used by the socket. - - - Available socket types - - - - Type - Description - - - - - SOCK_STREAM - - Provides sequenced, reliable, full-duplex, connection-based byte streams. - An out-of-band data transmission mechanism may be supported. - The TCP protocol is based on this socket type. - - - - SOCK_DGRAM - - Supports datagrams (connectionless, unreliable messages of a fixed maximum length). - The UDP protocol is based on this socket type. - - - - SOCK_SEQPACKET - - Provides a sequenced, reliable, two-way connection-based data transmission path for - datagrams of fixed maximum length; a consumer is required to read an - entire packet with each read call. - - - - SOCK_RAW - - Provides raw network protocol access. This special type of socket - can be used to manually construct any type of protocol. A common use - for this socket type is to perform ICMP requests (like ping, - traceroute, etc). - - - - SOCK_RDM - - Provides a reliable datagram layer that does not guarantee ordering. - This is most likely not implemented on your operating system. - - - - -
- - The protocol parameter sets the specific - protocol within the specified domain to be used - when communicating on the returned socket. The proper value can be retrieved by - name by using getprotobyname. If - the desired protocol is TCP, or UDP the corresponding constants - SOL_TCP, and SOL_UDP - can also be used. - - - Common protocols - - - - Name - Description - - - - - icmp - - The Internet Control Message Protocol is used primarily by gateways - and hosts to report errors in datagram communication. The "ping" - command (present in most modern operating systems) is an example - application of ICMP. - - - - udp - - The User Datagram Protocol is a connectionless, unreliable, - protocol with fixed record lengths. Due to these aspects, UDP - requires a minimum amount of protocol overhead. - - - - tcp - - The Transmission Control Protocol is a reliable, connection based, - stream oriented, full duplex protocol. TCP guarantees that all data packets - will be received in the order in which they were sent. If any packet is somehow - lost during communication, TCP will automatically retransmit the packet until - the destination host acknowledges that packet. For reliability and performance - reasons, the TCP implementation itself decides the appropriate octet boundaries - of the underlying datagram communication layer. Therefore, TCP applications must - allow for the possibility of partial record transmission. - - - - -
- - socket_create Returns a socket resource on success, or &false; - on error. The actual error code can be retrieved by calling socket_last_error. - This error code may be passed to socket_strerror to get a textual - explanation of the error. - - - - If an invalid domain or - type is given, socket_create - defaults to AF_INET and - SOCK_STREAM respectively and additionally emits an - E_WARNING message. - - - - See also - socket_accept, - socket_bind, - socket_connect, - socket_listen, - socket_last_error, and - socket_strerror. - -
-
+ + + socket_create + Create a socket (endpoint for communication) + + + Description + + resourcesocket_create + intdomain + inttype + intprotocol + + + Creates and returns a socket resource, also referred to as an endpoint + of communication. A typical network connection is made up of 2 sockets, one + performing the role of the client, and another performing the role of the server. + + + The domain parameter specifies the protocol + family to be used by the socket. + + + Available address/protocol families + + + + Domain + Description + + + + + AF_INET + + IPv4 Internet based protocols. TCP and UDP are common protocols of + this protocol family. + + + + AF_INET6 + + IPv6 Internet based protocols. TCP and UDP are common protocols of + this protocol family. Support added in PHP 5.0.0. + + + + AF_UNIX + + Local communication protocol family. High efficiency and low + overhead make it a great form of IPC (Interprocess Communication). + + + + +
+ + The type parameter selects the type of communication + to be used by the socket. + + + Available socket types + + + + Type + Description + + + + + SOCK_STREAM + + Provides sequenced, reliable, full-duplex, connection-based byte streams. + An out-of-band data transmission mechanism may be supported. + The TCP protocol is based on this socket type. + + + + SOCK_DGRAM + + Supports datagrams (connectionless, unreliable messages of a fixed maximum length). + The UDP protocol is based on this socket type. + + + + SOCK_SEQPACKET + + Provides a sequenced, reliable, two-way connection-based data transmission path for + datagrams of fixed maximum length; a consumer is required to read an + entire packet with each read call. + + + + SOCK_RAW + + Provides raw network protocol access. This special type of socket + can be used to manually construct any type of protocol. A common use + for this socket type is to perform ICMP requests (like ping, + traceroute, etc). + + + + SOCK_RDM + + Provides a reliable datagram layer that does not guarantee ordering. + This is most likely not implemented on your operating system. + + + + +
+ + The protocol parameter sets the specific + protocol within the specified domain to be used + when communicating on the returned socket. The proper value can be retrieved by + name by using getprotobyname. If + the desired protocol is TCP, or UDP the corresponding constants + SOL_TCP, and SOL_UDP + can also be used. + + + Common protocols + + + + Name + Description + + + + + icmp + + The Internet Control Message Protocol is used primarily by gateways + and hosts to report errors in datagram communication. The "ping" + command (present in most modern operating systems) is an example + application of ICMP. + + + + udp + + The User Datagram Protocol is a connectionless, unreliable, + protocol with fixed record lengths. Due to these aspects, UDP + requires a minimum amount of protocol overhead. + + + + tcp + + The Transmission Control Protocol is a reliable, connection based, + stream oriented, full duplex protocol. TCP guarantees that all data packets + will be received in the order in which they were sent. If any packet is somehow + lost during communication, TCP will automatically retransmit the packet until + the destination host acknowledges that packet. For reliability and performance + reasons, the TCP implementation itself decides the appropriate octet boundaries + of the underlying datagram communication layer. Therefore, TCP applications must + allow for the possibility of partial record transmission. + + + + +
+ + socket_create Returns a socket resource on success, or &false; + on error. The actual error code can be retrieved by calling socket_last_error. + This error code may be passed to socket_strerror to get a textual + explanation of the error. + + + + If an invalid domain or + type is given, socket_create + defaults to AF_INET and + SOCK_STREAM respectively and additionally emits an + E_WARNING message. + + + + See also + socket_accept, + socket_bind, + socket_connect, + socket_listen, + socket_last_error, and + socket_strerror. + +
+
+ - - - socket_get_option - Gets socket options for the socket - - - Description - - mixedsocket_get_option - resourcesocket - intlevel - intoptname - - - The socket_get_option function retrieves the value for - the option specified by the optname parameter for the - socket specified by the socket parameter. socket_get_option - will return &false; on failure. - - - The level parameter specifies the protocol level at - which the option resides. For example, to retrieve options at the socket level, - a level parameter of SOL_SOCKET would be used. Other - levels, such as TCP, can be used by specifying the protocol number of that level. - Protocol numbers can be found by using the getprotobyname function. - - - Available Socket Options - - - - Option - Description - - - - - SO_DEBUG - - Reports whether debugging information is being recorded. - - - - SO_ACCEPTCONN - - Reports whether socket listening is enabled. - - - - SO_BROADCAST - - Reports whether transmission of broadcast messages is supported. - - - - SO_REUSEADDR - - Reports whether local addresses can be reused. - - - - SO_KEEPALIVE - - Reports whether connections are kept active with periodic transmission - of messages. If the connected socket fails to respond to these messages, - the connection is broken and processes writing to that socket are notified - with a SIGPIPE signal. - - - - SO_LINGER - - Reports whether the socket lingers on socket_close if data is present. - - - - SO_OOBINLINE - - Reports whether the socket leaves out-of-band data inline. - - - - SO_SNDBUF - - Reports send buffer size information. - - - - SO_RCVBUF - - Reports recieve buffer size information. - - - - SO_ERROR - - Reports information about error status and clears it. - - - - SO_TYPE - - Reports the socket type. - - - - SO_DONTROUTE - - Reports whether outgoing messages bypass the standard routing facilities. - - - - SO_RCVLOWAT - - Reports the minimum number of bytes to process for socket input operations. - ( Defaults to 1 ) - - - - SO_RCVTIMEO - - Reports the timeout value for input operations. - - - - SO_SNDLOWAT - - Reports the minimum number of bytes to process for socket output operations. - - - - SO_SNDTIMEO - - Reports the timeout value specifying the amount of time that an output - function blocks because flow control prevents data from being sent. - - - - -
- - - This function used to be called socket_getopt() prior - to PHP 4.3.0 - - -
-
+ + + socket_get_option + Gets socket options for the socket + + + Description + + mixedsocket_get_option + resourcesocket + intlevel + intoptname + + + The socket_get_option function retrieves the value for + the option specified by the optname parameter for the + socket specified by the socket parameter. socket_get_option + will return &false; on failure. + + + The level parameter specifies the protocol level at + which the option resides. For example, to retrieve options at the socket level, + a level parameter of SOL_SOCKET would be used. Other + levels, such as TCP, can be used by specifying the protocol number of that level. + Protocol numbers can be found by using the getprotobyname function. + + + Available Socket Options + + + + Option + Description + + + + + SO_DEBUG + + Reports whether debugging information is being recorded. + + + + SO_ACCEPTCONN + + Reports whether socket listening is enabled. + + + + SO_BROADCAST + + Reports whether transmission of broadcast messages is supported. + + + + SO_REUSEADDR + + Reports whether local addresses can be reused. + + + + SO_KEEPALIVE + + Reports whether connections are kept active with periodic transmission + of messages. If the connected socket fails to respond to these messages, + the connection is broken and processes writing to that socket are notified + with a SIGPIPE signal. + + + + SO_LINGER + + Reports whether the socket lingers on socket_close if data is present. + + + + SO_OOBINLINE + + Reports whether the socket leaves out-of-band data inline. + + + + SO_SNDBUF + + Reports send buffer size information. + + + + SO_RCVBUF + + Reports recieve buffer size information. + + + + SO_ERROR + + Reports information about error status and clears it. + + + + SO_TYPE + + Reports the socket type. + + + + SO_DONTROUTE + + Reports whether outgoing messages bypass the standard routing facilities. + + + + SO_RCVLOWAT + + Reports the minimum number of bytes to process for socket input operations. + ( Defaults to 1 ) + + + + SO_RCVTIMEO + + Reports the timeout value for input operations. + + + + SO_SNDLOWAT + + Reports the minimum number of bytes to process for socket output operations. + + + + SO_SNDTIMEO + + Reports the timeout value specifying the amount of time that an output + function blocks because flow control prevents data from being sent. + + + + +
+ + + This function used to be called socket_getopt() prior + to PHP 4.3.0 + + +
+
+ - - - socket_getpeername - - Queries the remote side of the given socket which may either result in host/port - or in a Unix filesystem path, dependent on its type - - - - Description - - boolsocket_getpeername - resourcesocket - stringaddr - intport - - - If the given socket is of type AF_INET - or AF_INET6, socket_getpeername - will return the peers (remote) IP address in appropriate notation (e.g. - 127.0.0.1 or fe80::1) in the - address parameter and, if the optional - port parameter is present, also the associated port. - - - If the given socket is of type AF_UNIX, - socket_getpeername will return the Unix filesystem - path (e.g. /var/run/daemon.sock) in the - address parameter. - - - - socket_getpeername should not be used with - AF_UNIX sockets created with socket_accept. - Only sockets created with socket_connect or a primary - server socket following a call to socket_bind will return - meaningful values. - - - - &return.success; socket_getpeername may also return - &false; if the socket type is not any of AF_INET, - AF_INET6, or AF_UNIX, in which - case the last socket error code is not updated. - - - See also - socket_getsockname, - socket_last_error and - socket_strerror. - - - + + + socket_getpeername + Queries the remote side of the given socket which may either result in host/port or in a Unix filesystem path, dependent on its type + + + Description + + boolsocket_getpeername + resourcesocket + stringaddr + intport + + + If the given socket is of type AF_INET + or AF_INET6, socket_getpeername + will return the peers (remote) IP address in appropriate notation (e.g. + 127.0.0.1 or fe80::1) in the + address parameter and, if the optional + port parameter is present, also the associated port. + + + If the given socket is of type AF_UNIX, + socket_getpeername will return the Unix filesystem + path (e.g. /var/run/daemon.sock) in the + address parameter. + + + + socket_getpeername should not be used with + AF_UNIX sockets created with socket_accept. + Only sockets created with socket_connect or a primary + server socket following a call to socket_bind will return + meaningful values. + + + + &return.success; socket_getpeername may also return + &false; if the socket type is not any of AF_INET, + AF_INET6, or AF_UNIX, in which + case the last socket error code is not updated. + + + See also + socket_getsockname, + socket_last_error and + socket_strerror. + + + + - - - socket_getsockname - - Queries the local side of the given socket which may either result in host/port - or in a Unix filesystem path, dependent on its type - - - - Description - - boolsocket_getsockname - resourcesocket - stringaddr - intport - - - If the given socket is of type AF_INET - or AF_INET6, socket_getsockname - will return the local IP address in appropriate notation (e.g. - 127.0.0.1 or fe80::1) in the - address parameter and, if the optional - port parameter is present, also the associated port. - - - If the given socket is of type AF_UNIX, - socket_getsockname will return the Unix filesystem - path (e.g. /var/run/daemon.sock) in the - address parameter. - - - - socket_getsockname should not be used with - AF_UNIX sockets created with socket_connect. - Only sockets created with socket_accept or a primary - server socket following a call to socket_bind will return - meaningful values. - - - - &return.success; socket_getsockname may also return - &false; if the socket type is not any of AF_INET, - AF_INET6, or AF_UNIX, in which - case the last socket error code is not updated. - - - See also - socket_getpeername, - socket_last_error and - socket_strerror. - - - + + + socket_getsockname + Queries the local side of the given socket which may either result in host/port or in a Unix filesystem path, dependent on its type + + + Description + + boolsocket_getsockname + resourcesocket + stringaddr + intport + + + If the given socket is of type AF_INET + or AF_INET6, socket_getsockname + will return the local IP address in appropriate notation (e.g. + 127.0.0.1 or fe80::1) in the + address parameter and, if the optional + port parameter is present, also the associated port. + + + If the given socket is of type AF_UNIX, + socket_getsockname will return the Unix filesystem + path (e.g. /var/run/daemon.sock) in the + address parameter. + + + + socket_getsockname should not be used with + AF_UNIX sockets created with socket_connect. + Only sockets created with socket_accept or a primary + server socket following a call to socket_bind will return + meaningful values. + + + + &return.success; socket_getsockname may also return + &false; if the socket type is not any of AF_INET, + AF_INET6, or AF_UNIX, in which + case the last socket error code is not updated. + + + See also + socket_getpeername, + socket_last_error and + socket_strerror. + + + + - - - socket_last_error - Returns the last error on the socket - - - Description - - intsocket_last_error - resourcesocket - - - This function returns a socket error code. - - - If a socket resource is passed to this function, the last error which - occurred on this particular socket is returned. If the socket resource is - omitted, the error code of the last failed socket function is returned. - The latter is in particular helpful for functions like - socket_create which don't return a socket on - failure and socket_select which can fail for reasons - not directly tied to a particular socket. The error code is suitable to - be fed to socket_strerror which returns a string - describing the given error code. - + + + socket_last_error + Returns the last error on the socket + + + Description + + intsocket_last_error + resourcesocket + + + This function returns a socket error code. + + + If a socket resource is passed to this function, the last error which + occurred on this particular socket is returned. If the socket resource is + omitted, the error code of the last failed socket function is returned. + The latter is in particular helpful for functions like + socket_create which don't return a socket on + failure and socket_select which can fail for reasons + not directly tied to a particular socket. The error code is suitable to + be fed to socket_strerror which returns a string + describing the given error code. + ]]> - - - - - socket_last_error does not clear the error code, use - socket_clear_error for this purpose. - - - - + + + + + socket_last_error does not clear the error code, use + socket_clear_error for this purpose. + + + + + - - - socket_listen - Listens for a connection on a socket - - - Description - - boolsocket_listen - resourcesocket - intbacklog - - - After the socket socket has been created - using socket_create and bound to a name with - socket_bind, it may be told to listen for incoming - connections on socket. - - - A maximum of backlog incoming connections will be - queued for processing. If a connection request arrives with the queue - full the client may receive an error with an indication of - ECONNREFUSED, or, if the underlying protocol supports - retransmission, the request may be ignored so that retries may succeed. - - - - The maximum number passed to the backlog - parameter highly depends on the underlying platform. On Linux, it is - silently truncated to SOMAXCONN. On win32, if - passed SOMAXCONN, the underlying service provider - responsible for the socket will set the backlog to a maximum - reasonable value. There is no standard provision to - find out the actual backlog value on this platform. - - - - socket_listen is applicable only to sockets of - type SOCK_STREAM or - SOCK_SEQPACKET. - - - &return.success; The error code can be retrieved with - socket_last_error. This code may be passed to - socket_strerror to get a textual explanation of the - error. - - - See also - socket_accept, - socket_bind, - socket_connect, - socket_create and - socket_strerror. - - - + + + socket_listen + Listens for a connection on a socket + + + Description + + boolsocket_listen + resourcesocket + intbacklog + + + After the socket socket has been created + using socket_create and bound to a name with + socket_bind, it may be told to listen for incoming + connections on socket. + + + A maximum of backlog incoming connections will be + queued for processing. If a connection request arrives with the queue + full the client may receive an error with an indication of + ECONNREFUSED, or, if the underlying protocol supports + retransmission, the request may be ignored so that retries may succeed. + + + + The maximum number passed to the backlog + parameter highly depends on the underlying platform. On Linux, it is + silently truncated to SOMAXCONN. On win32, if + passed SOMAXCONN, the underlying service provider + responsible for the socket will set the backlog to a maximum + reasonable value. There is no standard provision to + find out the actual backlog value on this platform. + + + + socket_listen is applicable only to sockets of + type SOCK_STREAM or + SOCK_SEQPACKET. + + + &return.success; The error code can be retrieved with + socket_last_error. This code may be passed to + socket_strerror to get a textual explanation of the + error. + + + See also + socket_accept, + socket_bind, + socket_connect, + socket_create and + socket_strerror. + + + + - - - socket_read - Reads a maximum of length bytes from a socket - - - Description - - stringsocket_read - resourcesocket - intlength - inttype - - - The function socket_read reads from the socket - resource socket created by the - socket_create or - socket_accept functions. The maximum number of bytes read - is specified by the length parameter. Otherwise - you can use \r, \n, or \0 to end reading - (depending on the type parameter, see below). - - - socket_read returns the data as a string on success, or - &false; on error (including if the remote host has closed the - connection). The error code can be retrieved with - socket_last_error. This code may be passed to - socket_strerror to get a textual representation of - the error. - - - - socket_read returns a zero length string ("") - when there is no more data to read. - - - - Optional type parameter is a named constant: - - - - PHP_BINARY_READ - use the system recv() function. - Safe for reading binary data. (Default in PHP >= 4.1.0) - - - - - PHP_NORMAL_READ - reading stops at \n or \r. (Default in PHP <= 4.0.6) - - - - - - See also - socket_accept, - socket_bind, - socket_connect, - socket_listen, - socket_last_error, - socket_strerror and - socket_write. - - - + + + socket_read + Reads a maximum of length bytes from a socket + + + Description + + stringsocket_read + resourcesocket + intlength + inttype + + + The function socket_read reads from the socket + resource socket created by the + socket_create or + socket_accept functions. The maximum number of bytes read + is specified by the length parameter. Otherwise + you can use \r, \n, or \0 to end reading + (depending on the type parameter, see below). + + + socket_read returns the data as a string on success, or + &false; on error (including if the remote host has closed the + connection). The error code can be retrieved with + socket_last_error. This code may be passed to + socket_strerror to get a textual representation of + the error. + + + + socket_read returns a zero length string ("") + when there is no more data to read. + + + + Optional type parameter is a named constant: + + + + PHP_BINARY_READ - use the system recv() function. + Safe for reading binary data. (Default in PHP >= 4.1.0) + + + + + PHP_NORMAL_READ - reading stops at \n or \r. (Default in PHP <= 4.0.6) + + + + + + See also + socket_accept, + socket_bind, + socket_connect, + socket_listen, + socket_last_error, + socket_strerror and + socket_write. + + + + - - - socket_recv - Receives data from a connected socket - - - Description - - intsocket_recv - resourcesocket - stringbuf - intlen - intflags - - - &warn.undocumented.func; - - - + + + socket_recv + Receives data from a connected socket + + + Description + + intsocket_recv + resourcesocket + stringbuf + intlen + intflags + + + &warn.undocumented.func; + + + + - - - socket_recvfrom - Receives data from a socket, connected or not - - - Description - - intsocket_recvfrom - resourcesocket - stringbuf - intlen - intflags - stringname - intport - - - &warn.undocumented.func; - - - socket_recvfrom has been binary safe since PHP 4.3.0 - - - + + + socket_recvfrom + Receives data from a socket, connected or not + + + Description + + intsocket_recvfrom + resourcesocket + stringbuf + intlen + intflags + stringname + intport + + + &warn.undocumented.func; + + + socket_recvfrom has been binary safe since PHP 4.3.0 + + + + - - - socket_select - - Runs the select() system call on the given arrays of sockets - with a specified timeout - - - - Description - - intsocket_select - arrayread - arraywrite - arrayexcept - inttv_sec - inttv_usec - - - socket_select accepts arrays of sockets and - waits for them to change status. Those coming with BSD sockets background - will recognize that those socket resource arrays are in fact the - so-called file descriptor sets. Three independent arrays of socket - resources are watched. - - - The sockets listed in the read array will be watched to - see if characters become available for reading (more precisely, to see if - a read will not block - in particular, a socket resource is also ready on - end-of-file, in which case a socket_read will return - a zero length string). - - - The sockets listed in the write array will be - watched to see if a write will not block. - - - The sockets listed in the except array will be - watched for exceptions. - - - - On exit, the arrays are modified to indicate which socket resource - actually changed status. - - - - You do not need to pass every array to - socket_select. You can leave it out and use an - empty array or &null; instead. Also do not forget that those arrays are - passed by reference and will be modified after - socket_select returns. - - - - <function>socket_select</function> example - + + + socket_select + Runs the select() system call on the given arrays of sockets with a specified timeout + + + Description + + intsocket_select + arrayread + arraywrite + arrayexcept + inttv_sec + inttv_usec + + + socket_select accepts arrays of sockets and + waits for them to change status. Those coming with BSD sockets background + will recognize that those socket resource arrays are in fact the + so-called file descriptor sets. Three independent arrays of socket + resources are watched. + + + The sockets listed in the read array will be watched to + see if characters become available for reading (more precisely, to see if + a read will not block - in particular, a socket resource is also ready on + end-of-file, in which case a socket_read will return + a zero length string). + + + The sockets listed in the write array will be + watched to see if a write will not block. + + + The sockets listed in the except array will be + watched for exceptions. + + + + On exit, the arrays are modified to indicate which socket resource + actually changed status. + + + + You do not need to pass every array to + socket_select. You can leave it out and use an + empty array or &null; instead. Also do not forget that those arrays are + passed by reference and will be modified after + socket_select returns. + + + + <function>socket_select</function> example + ]]> - - - - - - Due a limitation in the current Zend Engine it is not possible to pass a - constant modifier like &null; directly as a parameter to a function - which expects this parameter to be passed by reference. Instead use a - temporary variable or an expression with the leftmost member being a - temporary variable: - - Using &null; with <function>socket_select</function> - + + + + + + Due a limitation in the current Zend Engine it is not possible to pass a + constant modifier like &null; directly as a parameter to a function + which expects this parameter to be passed by reference. Instead use a + temporary variable or an expression with the leftmost member being a + temporary variable: + + Using &null; with <function>socket_select</function> + ]]> - - - - - - The tv_sec and tv_usec - together form the timeout parameter. The - timeout is an upper bound on the amount of time - elapsed before socket_select return. - tv_sec may be zero , causing - socket_select to return immediately. This is useful - for polling. If tv_sec is &null; (no timeout), - socket_select can block indefinitely. - - - On success socket_select returns the number of - socket resources contained in the modified arrays, which may be zero if - the timeout expires before anything interesting happens. On error &false; - is returned. The error code can be retrieved with - socket_last_error. - - - - Be sure to use the === operator when checking for an - error. Since the socket_select may return 0 the - comparison with == would evaluate to &true;: - - Understanding <function>socket_select</function>'s result - + + + + + + The tv_sec and tv_usec + together form the timeout parameter. The + timeout is an upper bound on the amount of time + elapsed before socket_select return. + tv_sec may be zero , causing + socket_select to return immediately. This is useful + for polling. If tv_sec is &null; (no timeout), + socket_select can block indefinitely. + + + On success socket_select returns the number of + socket resources contained in the modified arrays, which may be zero if + the timeout expires before anything interesting happens. On error &false; + is returned. The error code can be retrieved with + socket_last_error. + + + + Be sure to use the === operator when checking for an + error. Since the socket_select may return 0 the + comparison with == would evaluate to &true;: + + Understanding <function>socket_select</function>'s result + ]]> - - - - - - - Be aware that some socket implementations need to be handled very - carefully. A few basic rules: - - - - You should always try to use socket_select - without timeout. Your program should have nothing to do if there is - no data available. Code that depends on timeouts is not usually - portable and difficult to debug. - - - - - No socket resource must be added to any set if you do not intend to - check its result after the socket_select call, - and respond appropriately. After socket_select - returns, all socket resources in all arrays must be checked. Any - socket resource that is available for writing must be written to, and - any socket resource available for reading must be read from. - - - - - If you read/write to a socket returns in the arrays be aware that - they do not necessarily read/write the full amount of data you have - requested. Be prepared to even only be able to read/write a single - byte. - - - - - It's common to most socket implementations that the only exception - caught with the except array is out-of-bound - data received on a socket. - - - - - - - See also - socket_read, - socket_write, - socket_last_error and - socket_strerror. - - - + + + + + + + Be aware that some socket implementations need to be handled very + carefully. A few basic rules: + + + + You should always try to use socket_select + without timeout. Your program should have nothing to do if there is + no data available. Code that depends on timeouts is not usually + portable and difficult to debug. + + + + + No socket resource must be added to any set if you do not intend to + check its result after the socket_select call, + and respond appropriately. After socket_select + returns, all socket resources in all arrays must be checked. Any + socket resource that is available for writing must be written to, and + any socket resource available for reading must be read from. + + + + + If you read/write to a socket returns in the arrays be aware that + they do not necessarily read/write the full amount of data you have + requested. Be prepared to even only be able to read/write a single + byte. + + + + + It's common to most socket implementations that the only exception + caught with the except array is out-of-bound + data received on a socket. + + + + + + + See also + socket_read, + socket_write, + socket_last_error and + socket_strerror. + + + + - - - socket_send - Sends data to a connected socket - - - Description - - intsocket_send - resourcesocket - stringbuf - intlen - intflags - - - The function socket_send sends - len bytes to the socket - socket from buf - - - The value of flags can be any - ORed combination of the following: - - possible values for <parameter>flags</parameter> - - - - 0x1 - - Process OOB (out-of-band) data - - - - 0x2 - - Peek at incoming message - - - - 0x4 - - Bypass routing, use direct interface - - - - 0x8 - - Data completes record - - - - 0x100 - - Data completes transaction - - - - -
-
- - See also - socket_sendmsg and - socket_sendto. - -
-
+ + + socket_send + Sends data to a connected socket + + + Description + + intsocket_send + resourcesocket + stringbuf + intlen + intflags + + + The function socket_send sends + len bytes to the socket + socket from buf + + + The value of flags can be any + ORed combination of the following: + + possible values for <parameter>flags</parameter> + + + + 0x1 + + Process OOB (out-of-band) data + + + + 0x2 + + Peek at incoming message + + + + 0x4 + + Bypass routing, use direct interface + + + + 0x8 + + Data completes record + + + + 0x100 + + Data completes transaction + + + + +
+
+ + See also + socket_sendmsg and + socket_sendto. + +
+
+ - - - socket_sendto - Sends a message to a socket, whether it is connected or not - - - Description - - intsocket_sendto - resourcesocket - stringbuf - intlen - intflags - stringaddr - intport - - - The function socket_sendto sends - len bytes from buf - through the socket socket to the - port at the address addr - - - The value of flags can be one of the - following: - - possible values for <parameter>flags</parameter> - - - - 0x1 - - Process OOB (out-of-band) data. - - - - 0x2 - - Peek at incoming message. - - - - 0x4 - - Bypass routing, use direct interface. - - - - 0x8 - - Data completes record. - - - - 0x100 - - Data completes transaction. - - - - -
-
- - <function>socket_sendto</function> Example - + + + socket_sendto + Sends a message to a socket, whether it is connected or not + + + Description + + intsocket_sendto + resourcesocket + stringbuf + intlen + intflags + stringaddr + intport + + + The function socket_sendto sends + len bytes from buf + through the socket socket to the + port at the address addr + + + The value of flags can be one of the + following: + + possible values for <parameter>flags</parameter> + + + + 0x1 + + Process OOB (out-of-band) data. + + + + 0x2 + + Peek at incoming message. + + + + 0x4 + + Bypass routing, use direct interface. + + + + 0x8 + + Data completes record. + + + + 0x100 + + Data completes transaction. + + + + +
+
+ + <function>socket_sendto</function> Example + ]]> - - - - See also - socket_send and - socket_sendmsg. - -
-
+
+
+ + See also + socket_send and + socket_sendmsg. + +
+
- - - socket_set_block - - Sets blocking mode on a socket resource - - - - Description - - boolsocket_set_block - resourcesocket - - - The socket_set_block function removes the O_NONBLOCK flag - on the socket specified by the socket parameter. - - - - <function>socket_set_block</function> example - + + + + socket_set_block + Sets blocking mode on a socket resource + + + Description + + boolsocket_set_block + resourcesocket + + + The socket_set_block function removes the O_NONBLOCK flag + on the socket specified by the socket parameter. + + + + <function>socket_set_block</function> example + ]]> - - - - - &return.success; - - - See also socket_set_nonblock and - socket_set_option - - - + + + + + &return.success; + + + See also socket_set_nonblock and + socket_set_option + + + + - - - socket_set_nonblock - Sets nonblocking mode for file descriptor fd - - - Description - - boolsocket_set_nonblock - resourcesocket - - - The socket_set_nonblock function sets the O_NONBLOCK flag - on the socket specified by the socket parameter. - - - - <function>socket_set_nonblock</function> example - + + + socket_set_nonblock + Sets nonblocking mode for file descriptor fd + + + Description + + boolsocket_set_nonblock + resourcesocket + + + The socket_set_nonblock function sets the O_NONBLOCK flag + on the socket specified by the socket parameter. + + + + <function>socket_set_nonblock</function> example + ]]> - - - - - &return.success; - - - See also socket_set_block and - socket_set_option - - - + + + + + &return.success; + + + See also socket_set_block and + socket_set_option + + + + - - - socket_set_option - Sets socket options for the socket - - - Description - - boolsocket_set_option - resourcesocket - intlevel - intoptname - mixedoptval - - - The socket_set_option function sets the option specified by the optname - parameter, at the protocol level specified by the level parameter, to the - value pointed to by the optval parameter for the socket - specified by the socket parameter. socket_set_option - will return &false; on failure. - - - The level parameter specifies the protocol level at - which the option resides. For example, to retrieve options at the socket level, - a level parameter of SOL_SOCKET would be used. Other - levels, such as TCP, can be used by specifying the protocol number of that level. - Protocol numbers can be found by using the getprotobyname function. - - - The available socket options are the same as those for the socket_get_option function. - - - - This function used to be called socket_setopt prior - to PHP 4.3.0. - - - - + + + socket_set_option + Sets socket options for the socket + + + Description + + boolsocket_set_option + resourcesocket + intlevel + intoptname + mixedoptval + + + The socket_set_option function sets the option specified by the optname + parameter, at the protocol level specified by the level parameter, to the + value pointed to by the optval parameter for the socket + specified by the socket parameter. socket_set_option + will return &false; on failure. + + + The level parameter specifies the protocol level at + which the option resides. For example, to retrieve options at the socket level, + a level parameter of SOL_SOCKET would be used. Other + levels, such as TCP, can be used by specifying the protocol number of that level. + Protocol numbers can be found by using the getprotobyname function. + + + The available socket options are the same as those for the socket_get_option function. + + + + This function used to be called socket_setopt prior + to PHP 4.3.0. + + + + + - - - socket_shutdown - Shuts down a socket for receiving, sending, or both - - - Description - - boolsocket_shutdown - resourcesocket - inthow - - - The socket_shutdown function allows you to stop - incoming, outgoing or all data (the default) from being sent through the - socket - - - The value of how can be one of the following: - - possible values for <parameter>how</parameter> - - - - 0 - - Shutdown socket reading - - - - 1 - - Shutdown socket writing - - - - 2 - - Shutdown socket reading and writing - - - - -
-
-
-
+ + + socket_shutdown + Shuts down a socket for receiving, sending, or both + + + Description + + boolsocket_shutdown + resourcesocket + inthow + + + The socket_shutdown function allows you to stop + incoming, outgoing or all data (the default) from being sent through the + socket + + + The value of how can be one of the following: + + possible values for <parameter>how</parameter> + + + + 0 + + Shutdown socket reading + + + + 1 + + Shutdown socket writing + + + + 2 + + Shutdown socket reading and writing + + + + +
+
+
+
+ - - - socket_strerror - Return a string describing a socket error - - - Description - - stringsocket_strerror - interrno - - - socket_strerror takes as its - errno parameter a socket error code as returned by - socket_last_error and returns the corresponding - explanatory text. This makes it a bit more pleasant to figure out why - something didn't work; for instance, instead of having to track down a - system include file to find out what '-111' means, you just pass it to - socket_strerror, and it tells you what happened. - - - - <function>socket_strerror</function> example - + + + socket_strerror + Return a string describing a socket error + + + Description + + stringsocket_strerror + interrno + + + socket_strerror takes as its + errno parameter a socket error code as returned by + socket_last_error and returns the corresponding + explanatory text. This makes it a bit more pleasant to figure out why + something didn't work; for instance, instead of having to track down a + system include file to find out what '-111' means, you just pass it to + socket_strerror, and it tells you what happened. + + + + <function>socket_strerror</function> example + ]]> - - - The expected output from the above example (assuming the script - is not run with root privileges): - - - socket_bind() failed: reason: Permission denied - - - + - See also - socket_accept, - socket_bind, - socket_connect, - socket_listen, and - socket_create. + The expected output from the above example (assuming the script + is not run with root privileges): - - + + + + + + + See also + socket_accept, + socket_bind, + socket_connect, + socket_listen, and + socket_create. + + + + - - - socket_write - Write to a socket - - - Description - - intsocket_write - resourcesocket - stringbuffer - intlength - - - The function socket_write writes to the socket - socket from - buffer. - - - The optional parameter length can specify an - alternate length of bytes written to the socket. If this length is - greater then the buffer length, it is silently truncated to the length of - the buffer. - - - Returns the number of bytes successfully written to the socket or &false; - one error. The error code can be retrieved with - socket_last_error. This code may be passed to - socket_strerror to get a textual explanation of the - error. - - - - socket_write does not necessarily write all bytes - from the given buffer. It's valid that, depending on the network - buffers etc., only a certain amount of data, even one byte, is written - though your buffer is greater. You have to watch out so you don't - unintentionally forget to transmit the rest of your data. - - - - - It is perfectly valid for socket_write to - return zero which means no bytes have been written. Be sure to use the - === operator to check for &false; in case of an - error. - - - - See also - socket_accept, - socket_bind, - socket_connect, - socket_listen, - socket_read and - socket_strerror. - - - + + + socket_write + Write to a socket + + + Description + + intsocket_write + resourcesocket + stringbuffer + intlength + + + The function socket_write writes to the socket + socket from + buffer. + + + The optional parameter length can specify an + alternate length of bytes written to the socket. If this length is + greater then the buffer length, it is silently truncated to the length of + the buffer. + + + Returns the number of bytes successfully written to the socket or &false; + one error. The error code can be retrieved with + socket_last_error. This code may be passed to + socket_strerror to get a textual explanation of the + error. + + + + socket_write does not necessarily write all bytes + from the given buffer. It's valid that, depending on the network + buffers etc., only a certain amount of data, even one byte, is written + though your buffer is greater. You have to watch out so you don't + unintentionally forget to transmit the rest of your data. + + + + + It is perfectly valid for socket_write to + return zero which means no bytes have been written. Be sure to use the + === operator to check for &false; in case of an + error. + + + + See also + socket_accept, + socket_bind, + socket_connect, + socket_listen, + socket_read and + socket_strerror. + + + - - - ssh2_auth_hostbased_file - - Authenticate using a public hostkey - - - - Description - - boolssh2_auth_hostbased_file - resourcesession - stringusername - stringhostname - stringpubkeyfile - stringprivkeyfile - stringpassphrase - stringlocal_username - + + + + ssh2_auth_hostbased_file + Authenticate using a public hostkey + + + Description + + boolssh2_auth_hostbased_file + resourcesession + stringusername + stringhostname + stringpubkeyfile + stringprivkeyfile + stringpassphrase + stringlocal_username + - - Authenticate using a public hostkey read from a file. If privkeyfile - is encrypted (which it should be), the passphrase must be provided. - If local_username is omitted, then the value for - username will be used for it. - + + Authenticate using a public hostkey read from a file. If privkeyfile + is encrypted (which it should be), the passphrase must be provided. + If local_username is omitted, then the value for + username will be used for it. + - - Authentication using a public hostkey - + + Authentication using a public hostkey + 'ssh-rsa')); @@ -44,17 +42,17 @@ if (ssh2_auth_hostbased_file($connection, 'remoteusername', 'myhost.example.com' } ?> ]]> - - + + - - - ssh2_auth_hostbased_file requires libssh2 >= 0.7 and PHP/SSH2 >= 0.7 - - + + + ssh2_auth_hostbased_file requires libssh2 >= 0.7 and PHP/SSH2 >= 0.7 + + - - + + + - - - ssh2_auth_none - - Authenticate as "none" - - - - Description - - mixedssh2_auth_none - resourcesession - stringusername - + + + ssh2_auth_none + Authenticate as "none" + + + Description + + mixedssh2_auth_none + resourcesession + stringusername + - - Attempt "none" authentication which usually will (and should) fail. - As part of the failure, this function will return an array of accepted - authentication methods. If the server does accept "none" as an - authentication method for username, this function - will simply return &true;. - + + Attempt "none" authentication which usually will (and should) fail. + As part of the failure, this function will return an array of accepted + authentication methods. If the server does accept "none" as an + authentication method for username, this function + will simply return &true;. + - - Using <function>ssh2_auth_none</function> to retreive - a list of authentication methods. - + + Using <function>ssh2_auth_none</function> to retreive + a list of authentication methods. + ]]> - - + + - - + + + - - - ssh2_auth_password - - Authenticate over SSH using a plain password - - - - Description - - boolssh2_auth_password - resourcesession - stringusername - stringpassword - + + + ssh2_auth_password + Authenticate over SSH using a plain password + + + Description + + boolssh2_auth_password + resourcesession + stringusername + stringpassword + - - Authenticate over SSH using a plain password - + + Authenticate over SSH using a plain password + - - Authenticating with a password - + + Authenticating with a password + ]]> - - + + - - + + + - - - ssh2_auth_pubkey_file - - Authenticate using a public key - - - - Description - - boolssh2_auth_pubkey_file - resourcesession - stringusername - stringpubkeyfile - stringprivkeyfile - stringpassphrase - + + + ssh2_auth_pubkey_file + Authenticate using a public key + + + Description + + boolssh2_auth_pubkey_file + resourcesession + stringusername + stringpubkeyfile + stringprivkeyfile + stringpassphrase + - - Authenticate using a public key read from a file. If privkeyfile - is encrypted (which it should be), the passphrase must be provided. - + + Authenticate using a public key read from a file. If privkeyfile + is encrypted (which it should be), the passphrase must be provided. + - - Authentication using a public key - + + Authentication using a public key + 'ssh-rsa')); @@ -40,11 +38,11 @@ if (ssh2_auth_pubkey_file($connection, 'username', } ?> ]]> - - + + - - + + + - - - ssh2_connect - - Connect to an SSH server - - - - Description - - resourcessh2_connect - stringhost - intport - arraymethods - arraycallbacks - + + + ssh2_connect + Connect to an SSH server + + + Description + + resourcessh2_connect + stringhost + intport + arraymethods + arraycallbacks + - - Establish a connection to a remote SSH server and return a resource on success, &false; on error. - + + Establish a connection to a remote SSH server and return a resource on success, &false; on error. + - - methods may be an associative array with up to four parameters - as described below. - + + methods may be an associative array with up to four parameters + as described below. + - - - <parameter>methods</parameter> may be an associative array - with any or all of the following parameters. - - - - Index - Meaning - Supported Values* - - - - - kex - - List of key exchange methods to advertise, comma separated - in order of preference. - - - diffie-hellman-group1-sha1, - diffie-hellman-group14-sha1, and - diffie-hellman-group-exchange-sha1 - - - - hostkey - - List of hostkey methods to advertise, come separated - in order of preference. - - - ssh-rsa and - ssh-dss - - - - client_to_server - - Associative array containing crypt, compression, and - message authentication code (MAC) method preferences - for messages sent from client to server. - - - - - server_to_client - - Associative array containing crypt, compression, and - message authentication code (MAC) method preferences - for messages sent from client to server. - - - - - -
-
+ + + <parameter>methods</parameter> may be an associative array + with any or all of the following parameters. + + + + Index + Meaning + Supported Values* + + + + + kex + + List of key exchange methods to advertise, comma separated + in order of preference. + + + diffie-hellman-group1-sha1, + diffie-hellman-group14-sha1, and + diffie-hellman-group-exchange-sha1 + + + + hostkey + + List of hostkey methods to advertise, come separated + in order of preference. + + + ssh-rsa and + ssh-dss + + + + client_to_server + + Associative array containing crypt, compression, and + message authentication code (MAC) method preferences + for messages sent from client to server. + + + + + server_to_client + + Associative array containing crypt, compression, and + message authentication code (MAC) method preferences + for messages sent from client to server. + + + + + +
+
- - * - Supported Values are dependent on methods supported by underlying library. - See libssh2 documentation for additional - information. - + + * - Supported Values are dependent on methods supported by underlying library. + See libssh2 documentation for additional + information. + - - - - <parameter>client_to_server</parameter> and - <parameter>server_to_client</parameter> may be an associative array - with any or all of the following parameters. - - - - - Index - Meaning - Supported Values* - - - - - crypt - List of crypto methods to advertise, comma separated - in order of preference. - - rijndael-cbc@lysator.liu.se, - aes256-cbc, - aes192-cbc, - aes128-cbc, - 3des-cbc, - blowfish-cbc, - cast128-cbc, - arcfour, and - none** - - - - comp - List of compression methods to advertise, comma separated - in order of preference. - - zlib and - none - - - - mac - List of MAC methods to advertise, come separated - in order of preference. - - hmac-sha1, - hmac-sha1-96, - hmac-ripemd160, - hmac-ripemd160@openssh.com, and - none** - - - - -
-
+ + + + <parameter>client_to_server</parameter> and + <parameter>server_to_client</parameter> may be an associative array + with any or all of the following parameters. + + + + + Index + Meaning + Supported Values* + + + + + crypt + List of crypto methods to advertise, comma separated + in order of preference. + + rijndael-cbc@lysator.liu.se, + aes256-cbc, + aes192-cbc, + aes128-cbc, + 3des-cbc, + blowfish-cbc, + cast128-cbc, + arcfour, and + none** + + + + comp + List of compression methods to advertise, comma separated + in order of preference. + + zlib and + none + + + + mac + List of MAC methods to advertise, come separated + in order of preference. + + hmac-sha1, + hmac-sha1-96, + hmac-ripemd160, + hmac-ripemd160@openssh.com, and + none** + + + + +
+
- - Crypt and MAC method "<literal>none</literal>" - - For security reasons, none is disabled by the underlying - libssh2 library unless explicitly enabled - during build time by using the appropriate ./configure options. See documentation - for the underlying library for more information. - - + + Crypt and MAC method "<literal>none</literal>" + + For security reasons, none is disabled by the underlying + libssh2 library unless explicitly enabled + during build time by using the appropriate ./configure options. See documentation + for the underlying library for more information. + + - - - <parameter>callbackss</parameter> may be an associative array - with any or all of the following parameters. - - - - Index - Meaning - Prototype - - - - - ignore - - Name of function to call when an - SSH2_MSG_IGNORE - packet is received - - void ignore_cb($message) - - - debug - - Name of function to call when an - SSH2_MSG_DEBUG - packet is received - - void debug_cb($message, $language, $always_display) - - - macerror - - Name of function to call when a - packet is received but the message authentication - code failed. If the callback returns &true;, - the mismatch will be ignored, otherwise the - connection will be terminated. - - bool macerror_cb($packet) - - - disconnect - - Name of function to call when an - SSH2_MSG_DISCONNECT - packet is received - - void disconnect_cb($reason, $message, $language) - - - -
-
+ + + <parameter>callbackss</parameter> may be an associative array + with any or all of the following parameters. + + + + Index + Meaning + Prototype + + + + + ignore + + Name of function to call when an + SSH2_MSG_IGNORE + packet is received + + void ignore_cb($message) + + + debug + + Name of function to call when an + SSH2_MSG_DEBUG + packet is received + + void debug_cb($message, $language, $always_display) + + + macerror + + Name of function to call when a + packet is received but the message authentication + code failed. If the callback returns &true;, + the mismatch will be ignored, otherwise the + connection will be terminated. + + bool macerror_cb($packet) + + + disconnect + + Name of function to call when an + SSH2_MSG_DISCONNECT + packet is received + + void disconnect_cb($reason, $message, $language) + + + +
+
- - - Open a connection forcing 3des-cbc when sending packets, - any strength aes cipher when receiving packets, - no compression in either direction, - and Group1 key exchange. - - + + + Open a connection forcing 3des-cbc when sending packets, + any strength aes cipher when receiving packets, + no compression in either direction, + and Group1 key exchange. + + ]]> - - + + - - Once connected, the client should verify the server's hostkey - using ssh2_fingerprint, then authenticate - using either password or public key. - + + Once connected, the client should verify the server's hostkey + using ssh2_fingerprint, then authenticate + using either password or public key. + - - See Also: - ssh2_fingerprint, - ssh2_auth_none, - ssh2_auth_password, and - ssh2_auth_pubkey_file - + + See Also: + ssh2_fingerprint, + ssh2_auth_none, + ssh2_auth_password, and + ssh2_auth_pubkey_file + -
-
+
+
+ - - - ssh2_exec - - Execute a command on a remote server - - - - Description - - resourcessh2_exec - resourcesession - stringcommand - stringpty - arrayenv - intwidth - intheight - intwidth_height_type - + + + ssh2_exec + Execute a command on a remote server + + + Description + + resourcessh2_exec + resourcesession + stringcommand + stringpty + arrayenv + intwidth + intheight + intwidth_height_type + - - Execute a command at the remote end and allocate a channel for it. - Returns a stream on success or &false; on failure. - + + Execute a command at the remote end and allocate a channel for it. + Returns a stream on success or &false; on failure. + - - Executing a command - + + Executing a command + ]]> - - + + - - See Also: - ssh2_connect, - ssh2_shell, and - ssh2_tunnel - - - + + See Also: + ssh2_connect, + ssh2_shell, and + ssh2_tunnel + + + + - - - ssh2_fetch_stream - - Fetch an extended data stream - - - - Description - - resourcessh2_fetch_stream - resourcechannel - intstreamid - + + + ssh2_fetch_stream + Fetch an extended data stream + + + Description + + resourcessh2_fetch_stream + resourcechannel + intstreamid + - - Fetches an alternate substream associated with an SSH2 channel stream - identified by streamid. The SSH2 protocol - currently defines only one substream, STDERR, which has a substream ID - of SSH2_STREAM_STDERR (defined as 1). - + + Fetches an alternate substream associated with an SSH2 channel stream + identified by streamid. The SSH2 protocol + currently defines only one substream, STDERR, which has a substream ID + of SSH2_STREAM_STDERR (defined as 1). + - - Opening a shell and retrieving the stderr stream associated with it. - + + Opening a shell and retrieving the stderr stream associated with it. + ]]> - - + + - - See Also: - ssh2_shell, - ssh2_exec, and - ssh2_connect - + + See Also: + ssh2_shell, + ssh2_exec, and + ssh2_connect + - - + + + - - - ssh2_fingerprint - - Retreive fingerprint of remote server - - - - Description - - stringssh2_fingerprint - resourcesession - intflags - + + + ssh2_fingerprint + Retreive fingerprint of remote server + + + Description + + stringssh2_fingerprint + resourcesession + intflags + - - Returns a server hostkey hash from an active session. - Defaults to MD5 fingerprint encoded as ASCII hex values. - + + Returns a server hostkey hash from an active session. + Defaults to MD5 fingerprint encoded as ASCII hex values. + - - flags may be either of - SSH2_FINGERPRINT_MD5 or - SSH2_FINGERPRINT_SHA1 logically ORed with - SSH2_FINGERPRINT_HEX or - SSH2_FINGERPRINT_RAW. - Defaults to SSH2_FINGERPRINT_MD5 | - SSH2_FINGERPRINT_HEX. - + + flags may be either of + SSH2_FINGERPRINT_MD5 or + SSH2_FINGERPRINT_SHA1 logically ORed with + SSH2_FINGERPRINT_HEX or + SSH2_FINGERPRINT_RAW. + Defaults to SSH2_FINGERPRINT_MD5 | + SSH2_FINGERPRINT_HEX. + - - Checking the fingerprint against a known value - + + Checking the fingerprint against a known value + ]]> - - + + - - + + + - - - ssh2_methods_negotiated - - Return list of negotiated methods - - - - Description - - arrayssh2_methods_negotiated - resourcesession - + + + ssh2_methods_negotiated + Return list of negotiated methods + + + Description + + arrayssh2_methods_negotiated + resourcesession + - - Returns list of negotiated methods. - + + Returns list of negotiated methods. + - - Determining what methods were negotiated - + + + Determining what methods were negotiated + ]]> - - + + + - - See Also: - ssh2_connect - + + See Also: + ssh2_connect + - - + + + + @@ -57,7 +57,7 @@ name Name of algorithm used by this publickey, for example: - ssh-dss or ssh-rsa. + ssh-dss or ssh-rsa. blob @@ -65,10 +65,10 @@ attrs - Attributes assigned to this publickey. - The most common attribute, and the only one supported by - publickey version 1 servers, is comment, - which may be any freeform string. + Attributes assigned to this publickey. The most common + attribute, and the only one supported by publickey version 1 + servers, is comment, which may be any freeform + string. diff --git a/reference/ssh2/functions/ssh2-scp-recv.xml b/reference/ssh2/functions/ssh2-scp-recv.xml index d056129f75..4f7c9efbdd 100644 --- a/reference/ssh2/functions/ssh2-scp-recv.xml +++ b/reference/ssh2/functions/ssh2-scp-recv.xml @@ -1,29 +1,26 @@ - + - - - ssh2_scp_recv - - Request a file via SCP - - - - Description - - boolssh2_scp_recv - resourcesession - stringremote_file - stringlocal_file - - - - Copy a file from the remote server to the local filesystem using the SCP protocol. - - - - Downloading a file via SCP - + + + ssh2_scp_recv + Request a file via SCP + + + Description + + boolssh2_scp_recv + resourcesession + stringremote_file + stringlocal_file + + + Copy a file from the remote server to the local filesystem using the SCP protocol. + + + + Downloading a file via SCP + ]]> - - - - - See Also: - ssh2_scp_send, and - copy - - - - + + + + + See Also: + ssh2_scp_send, and + copy + + + + - - - ssh2_scp_send - - Send a file via SCP - - - - Description - - boolssh2_scp_send - resourcesession - stringlocal_file - stringremote_file - intcreate_mode - + + + ssh2_scp_send + Send a file via SCP + + + Description + + boolssh2_scp_send + resourcesession + stringlocal_file + stringremote_file + intcreate_mode + - - Copy a file from the local filesystem to the remote server using the SCP protocol. - The file will be created with the mode specified by create_mode. - + + Copy a file from the local filesystem to the remote server using the SCP protocol. + The file will be created with the mode specified by create_mode. + - - Uploading a file via SCP - + + Uploading a file via SCP + ]]> - - + + - - See Also: - ssh2_scp_recv, and - copy - + + See Also: + ssh2_scp_recv, and + copy + - - + + + - - - ssh2_sftp_lstat - - Stat a symbolic link - - - - Description - - arrayssh2_sftp_lstat - resourcesftp - stringpath - + + + ssh2_sftp_lstat + Stat a symbolic link + + + Description + + arrayssh2_sftp_lstat + resourcesftp + stringpath + - - Stats a symbolic link on the remote filesystem without - following the link. This function is similar to using the - lstat function with the - ssh2.sftp:// wrapper in PHP5 - and returns the same values. See the documentation for - stat for details on the values which may be returned. - + + Stats a symbolic link on the remote filesystem without + following the link. This function is similar to using the + lstat function with the + ssh2.sftp:// wrapper in PHP5 + and returns the same values. See the documentation for + stat for details on the values which may be returned. + - - Stating a symbolic link via SFTP - + + Stating a symbolic link via SFTP + ]]> - - + + - - See Also: - ssh2_sftp_stat, - lstat, and - stat - + + See Also: + ssh2_sftp_stat, + lstat, and + stat + - - + + + - - - ssh2_sftp_mkdir - - Create a directory - - - - Description - - boolssh2_sftp_mkdir - resourcesftp - stringdirname - intmode - boolrecursive - + + + ssh2_sftp_mkdir + Create a directory + + + Description + + boolssh2_sftp_mkdir + resourcesftp + stringdirname + intmode + boolrecursive + - - Creates a directory on the remote file server with permissions set to - mode. If recursive is &true; - any parent directories required for dirname will - be automatically created as well. - This function is similar to using mkdir with the - ssh2.sftp:// wrapper. - + + Creates a directory on the remote file server with permissions set to + mode. If recursive is &true; + any parent directories required for dirname will + be automatically created as well. + This function is similar to using mkdir with the + ssh2.sftp:// wrapper. + - - Creating a directory on a remote server - + + Creating a directory on a remote server + ]]> - - + + - - See Also: - mkdir, and - ssh2_sftp_rmdir - + + See Also: + mkdir, and + ssh2_sftp_rmdir + - - + + + - - - ssh2_sftp_readlink - - Return the target of a symbolic link - - - - Description - - stringssh2_sftp_readlink - resourcesftp - stringlink - + + + ssh2_sftp_readlink + Return the target of a symbolic link + + + Description + + stringssh2_sftp_readlink + resourcesftp + stringlink + - - Returns the target of a symbolic link. - + + Returns the target of a symbolic link. + - - Reading a symbolic link - + + Reading a symbolic link + ]]> - - + + - - See Also: - readlink, and - ssh2_sftp_symlink - + + See Also: + readlink, and + ssh2_sftp_symlink + - - + + + - - - ssh2_sftp_realpath - - Resolve the realpath of a provided path string - - - - Description - - stringssh2_sftp_realpath - resourcesftp - stringfilename - + + + ssh2_sftp_realpath + Resolve the realpath of a provided path string + + + Description + + stringssh2_sftp_realpath + resourcesftp + stringfilename + - - Translates filename into the effective real path - on the remote filesystem. - + + Translates filename into the effective real path + on the remote filesystem. + - - Resolving a pathname - + + Resolving a pathname + ]]> - - + + - - See Also: - realpath, and - ssh2_sftp_symlink - ssh2_sftp_readlink - + + See Also: + realpath, and + ssh2_sftp_symlink + ssh2_sftp_readlink + - - + + + - - - ssh2_sftp_rename - - Rename a remote file - - - - Description - - boolssh2_sftp_rename - resourcesftp - stringfrom - stringto - + + + ssh2_sftp_rename + Rename a remote file + + + Description + + boolssh2_sftp_rename + resourcesftp + stringfrom + stringto + - - Renames a file on the remote filesystem. - + + Renames a file on the remote filesystem. + - - Renaming a file via sftp - + + Renaming a file via sftp + ]]> - - + + - - See Also: - rename - + + See Also: + rename + - - + + + - - - ssh2_sftp_rmdir - - Remove a directory - - - - Description - - boolssh2_sftp_rmdir - resourcesftp - stringdirname - + + + ssh2_sftp_rmdir + Remove a directory + + + Description + + boolssh2_sftp_rmdir + resourcesftp + stringdirname + - - Removes a directory from the remote file server. - This function is similar to using rmdir with the - ssh2.sftp:// wrapper. - + + Removes a directory from the remote file server. + This function is similar to using rmdir with the + ssh2.sftp:// wrapper. + - - Removing a directory on a remote server - + + Removing a directory on a remote server + ]]> - - + + - - See Also: - rmdir, and - ssh2_sftp_mkdir - + + See Also: + rmdir, and + ssh2_sftp_mkdir + - - + + + - - - ssh2_sftp_stat - - Stat a file on a remote filesystem - - - - Description - - arrayssh2_sftp_stat - resourcesftp - stringpath - + + + ssh2_sftp_stat + Stat a file on a remote filesystem + + + Description + + arrayssh2_sftp_stat + resourcesftp + stringpath + - - Stats a file on the remote filesystem following any symbolic links. - This function is similar to using the stat function - with the ssh2.sftp:// wrapper in PHP5 - and returns the same values. See the documentation for - stat for details on the values which may be returned. - + + Stats a file on the remote filesystem following any symbolic links. + This function is similar to using the stat function + with the ssh2.sftp:// wrapper in PHP5 + and returns the same values. See the documentation for + stat for details on the values which may be returned. + - - Stating a file via SFTP - + + Stating a file via SFTP + ]]> - - + + - - See Also: - ssh2_sftp_lstat, - lstat, and - stat - + + See Also: + ssh2_sftp_lstat, + lstat, and + stat + - - + + + - - - ssh2_sftp_symlink - - Create a symlink - - - - Description - - boolssh2_sftp_symlink - resourcesftp - stringtarget - stringlink - + + + ssh2_sftp_symlink + Create a symlink + + + Description + + boolssh2_sftp_symlink + resourcesftp + stringtarget + stringlink + - - Creates a symbolic link named link on the remote filesystem - pointing to target. - + + Creates a symbolic link named link on the remote filesystem + pointing to target. + - - Creating a symbolic link - + + Creating a symbolic link + ]]> - - + + - - See Also: - symlink, and - ssh2_sftp_readlink - + + See Also: + symlink, and + ssh2_sftp_readlink + - - + + + - - - ssh2_sftp_unlink - - Delete a file - - - - Description - - boolssh2_sftp_unlink - resourcesftp - stringfilename - + + + ssh2_sftp_unlink + Delete a file + + + Description + + boolssh2_sftp_unlink + resourcesftp + stringfilename + - - Deletes a file on the remote filesystem - + + Deletes a file on the remote filesystem + - - Deleting a file - + + Deleting a file + ]]> - - + + - - See Also: - unlink - + + See Also: + unlink + - - + + + - - - ssh2_sftp - - Initialize SFTP subsystem - - - - Description - - resourcessh2_sftp - resourcesession - + + + ssh2_sftp + Initialize SFTP subsystem + + + Description + + resourcessh2_sftp + resourcesession + - - Request the SFTP subsystem from an already connected SSH2 server. - + + Request the SFTP subsystem from an already connected SSH2 server. + - - This method returns an SSH2 SFTP resource for use with - all other ssh2_sftp_*() methods and the - ssh2.sftp:// fopen wrapper. - + + This method returns an SSH2 SFTP resource for use with + all other ssh2_sftp_*() methods and the + ssh2.sftp:// fopen wrapper. + - - Opening a file via SFTP - + + Opening a file via SFTP + ]]> - - + + - - See Also: - ssh2_scp_send, and - ssh2_scp_recv - + + See Also: + ssh2_scp_send, and + ssh2_scp_recv + - - + + + - - - ssh2_shell - - Request an interactive shell - - - - Description - - resourcessh2_shell - resourcesession - stringterm_type - arrayenv - intwidth - intheight - intwidth_height_type - + + + ssh2_shell + Request an interactive shell + + + Description + + resourcessh2_shell + resourcesession + stringterm_type + arrayenv + intwidth + intheight + intwidth_height_type + - - Open a shell at the remote end and allocate a stream for it. - term_type should correspond to one of the entries - in the target system's /etc/termcap file and defaults to vanilla. - env may be passed as an associative array of name/value pairs - to set in the target environment. - + + Open a shell at the remote end and allocate a stream for it. + term_type should correspond to one of the entries + in the target system's /etc/termcap file and defaults to vanilla. + env may be passed as an associative array of name/value pairs + to set in the target environment. + - - width, and height - define the width and height of the virtual terminal allocated for the shell process. - width_height_type should be one of - SSH2_TERM_UNIT_CHARS or - SSH2_TERM_UNIT_PIXELS. - + + width, and height + define the width and height of the virtual terminal allocated for the shell process. + width_height_type should be one of + SSH2_TERM_UNIT_CHARS or + SSH2_TERM_UNIT_PIXELS. + - - Executing a command - + + Executing a command + ]]> - - + + - - See Also: - ssh2_exec, - ssh2_tunnel, and - ssh2_fetch_stream - + + See Also: + ssh2_exec, + ssh2_tunnel, and + ssh2_fetch_stream + - - + + + - - - ssh2_tunnel - - Open a tunnel through a remote server - - - - Description - - resourcessh2_tunnel - resourcesession - stringhost - intport - + + + ssh2_tunnel + Open a tunnel through a remote server + + + Description + + resourcessh2_tunnel + resourcesession + stringhost + intport + - - Open a socket stream to an arbitrary host/port by way of the - currently connected SSH server. - + + Open a socket stream to an arbitrary host/port by way of the + currently connected SSH server. + - - Opening a tunnel to an arbitrary host - + + Opening a tunnel to an arbitrary host + ]]> - - + + - - See Also: - ssh2_connect, and - fsockopen - + + See Also: + ssh2_connect, and + fsockopen + - - + + + @@ -9,10 +9,10 @@ Description - - intsybase_affected_rows - resourcelink_identifier - + + intsybase_affected_rows + resourcelink_identifier + sybase_affected_rows returns the number of rows affected by the last INSERT, UPDATE or DELETE query on the diff --git a/reference/sybase/functions/sybase-close.xml b/reference/sybase/functions/sybase-close.xml index 086d7a36d5..ac50a91f29 100644 --- a/reference/sybase/functions/sybase-close.xml +++ b/reference/sybase/functions/sybase-close.xml @@ -1,5 +1,5 @@ - + @@ -8,13 +8,13 @@ Description - - boolsybase_close - resourcelink_identifier - - + + boolsybase_close + resourcelink_identifier + + sybase_close closes the link to a Sybase - database that's associated with the specified link + database that's associated with the specified link link_identifier. If the link identifier isn't specified, the last opened link is assumed. @@ -22,20 +22,20 @@ &return.success; - + Note that this isn't usually necessary, as non-persistent open links are automatically closed at the end of the script's execution. - + sybase_close will not close persistent links generated by sybase_pconnect. - + See also sybase_connect and sybase_pconnect. - + diff --git a/reference/sybase/functions/sybase-connect.xml b/reference/sybase/functions/sybase-connect.xml index 5c09e975f8..d07fa753d0 100644 --- a/reference/sybase/functions/sybase-connect.xml +++ b/reference/sybase/functions/sybase-connect.xml @@ -1,5 +1,5 @@ - + @@ -8,24 +8,24 @@ Description - - resourcesybase_connect - stringservername - stringusername - stringpassword - stringcharset - stringappname - - + + resourcesybase_connect + stringservername + stringusername + stringpassword + stringcharset + stringappname + + Returns a positive Sybase link identifier on success, or &false; on failure. - + sybase_connect establishes a connection to a Sybase server. The servername argument has to be a valid servername that is defined in the 'interfaces' file. - + In case a second call is made to sybase_connect with the same arguments, no new link will be established, but instead, the link identifier of @@ -52,7 +52,7 @@ sybase_close($link); - See also + See also sybase_pconnect and sybase_close. diff --git a/reference/sybase/functions/sybase-data-seek.xml b/reference/sybase/functions/sybase-data-seek.xml index 8dcce5c165..b769666516 100644 --- a/reference/sybase/functions/sybase-data-seek.xml +++ b/reference/sybase/functions/sybase-data-seek.xml @@ -1,5 +1,5 @@ - + @@ -8,22 +8,22 @@ Description - - boolsybase_data_seek - resourceresult_identifier - introw_number - + + boolsybase_data_seek + resourceresult_identifier + introw_number + &return.success; - + sybase_data_seek moves the internal row pointer of the Sybase result associated with the specified result identifier to pointer to the specified row number. The next call to sybase_fetch_row would return that row. - - See also + + See also sybase_fetch_row. diff --git a/reference/sybase/functions/sybase-deadlock-retry-count.xml b/reference/sybase/functions/sybase-deadlock-retry-count.xml index 2d1152b6ff..7494a407fb 100644 --- a/reference/sybase/functions/sybase-deadlock-retry-count.xml +++ b/reference/sybase/functions/sybase-deadlock-retry-count.xml @@ -1,5 +1,5 @@ - + sybase_deadlock_retry_count @@ -7,18 +7,18 @@ Description - - voidsybase_deadlock_retry_count - intretry_count - - + + voidsybase_deadlock_retry_count + intretry_count + + Using sybase_deadlock_retry_count, the number of retries can be defined in cases of deadlocks. By default, every deadlock is retried - an infinite number of times or until the process is killed by Sybase, the + an infinite number of times or until the process is killed by Sybase, the executing script is killed (for instance, by set_time_limit) or the query succeeds. - + &sybase.ct.only; diff --git a/reference/sybase/functions/sybase-fetch-array.xml b/reference/sybase/functions/sybase-fetch-array.xml index c17342fc65..bef43d5883 100644 --- a/reference/sybase/functions/sybase-fetch-array.xml +++ b/reference/sybase/functions/sybase-fetch-array.xml @@ -1,5 +1,5 @@ - + @@ -8,10 +8,10 @@ Description - - arraysybase_fetch_array - resourceresult - + + arraysybase_fetch_array + resourceresult + Returns an array that corresponds to the fetched row, or &false; if there are no more rows. @@ -29,7 +29,7 @@ provides a significant added value. - + When selecting fields with identical names (for instance, in a join), the associative indices will have a sequential number prepended. See the example for details. @@ -50,7 +50,7 @@ sybase_close($dbh); ]]> - The above example would produce the following output (assuming the two tables only + The above example would produce the following output (assuming the two tables only have each one column called "person_id"): diff --git a/reference/sybase/functions/sybase-fetch-assoc.xml b/reference/sybase/functions/sybase-fetch-assoc.xml index 7b3eac51dc..f4873abb08 100644 --- a/reference/sybase/functions/sybase-fetch-assoc.xml +++ b/reference/sybase/functions/sybase-fetch-assoc.xml @@ -1,5 +1,5 @@ - + sybase_fetch_assoc @@ -7,22 +7,22 @@ Description - - arraysybase_fetch_assoc - resourceresult - + + arraysybase_fetch_assoc + resourceresult + Returns an array that corresponds to the fetched row, or &false; if there are no more rows. - + &sybase.ct.only; - + sybase_fetch_assoc is a version of sybase_fetch_row that uses column names instead of integers for indices in the result array. Columns from - different tables with the same names are returned as + different tables with the same names are returned as name, name1, name2, ..., nameN. @@ -33,8 +33,8 @@ See also - sybase_fetch_array, - sybase_fetch_object and + sybase_fetch_array, + sybase_fetch_object and sybase_fetch_row. diff --git a/reference/sybase/functions/sybase-fetch-field.xml b/reference/sybase/functions/sybase-fetch-field.xml index b4a37d6091..6e25a7782d 100644 --- a/reference/sybase/functions/sybase-fetch-field.xml +++ b/reference/sybase/functions/sybase-fetch-field.xml @@ -1,5 +1,5 @@ - + @@ -8,13 +8,13 @@ Description - - objectsybase_fetch_field - resourceresult - intfield_offset - + + objectsybase_fetch_field + resourceresult + intfield_offset + - Returns an object containing field information. + Returns an object containing field information. sybase_fetch_field can be used in order to @@ -46,7 +46,7 @@ numeric - 1 if the column is numeric - + type - datatype of the column diff --git a/reference/sybase/functions/sybase-fetch-object.xml b/reference/sybase/functions/sybase-fetch-object.xml index 78a1f57f44..e746f00df4 100644 --- a/reference/sybase/functions/sybase-fetch-object.xml +++ b/reference/sybase/functions/sybase-fetch-object.xml @@ -1,5 +1,5 @@ - + @@ -8,20 +8,20 @@ Description - - objectsybase_fetch_object - resourceresult - mixedobject - + + objectsybase_fetch_object + resourceresult + mixedobject + Returns an object with properties that correspond to the fetched row, or &false; if there are no more rows. - + sybase_fetch_object is similar to sybase_fetch_assoc, with one difference - an object is returned, instead of an array. - + Use the second object to specify the type of object you want to return. If this parameter is omitted, the object will be of @@ -69,7 +69,7 @@ object(stdclass)(3) { class Foo { var $foo, $bar, $baz; } - + // {...] $qrh= sybase_query('SELECT foo, bar, baz FROM example'); $foo= sybase_fetch_object($qrh, 'Foo'); @@ -85,8 +85,8 @@ object(stdclass)(3) { sybase_fetch_array, and almost as quick as sybase_fetch_row (the difference is insignificant). - - See also + + See also sybase_fetch_array and sybase_fetch_row. diff --git a/reference/sybase/functions/sybase-fetch-row.xml b/reference/sybase/functions/sybase-fetch-row.xml index 124ddcb8ed..fed5a82f2c 100644 --- a/reference/sybase/functions/sybase-fetch-row.xml +++ b/reference/sybase/functions/sybase-fetch-row.xml @@ -1,5 +1,5 @@ - + @@ -8,10 +8,10 @@ Description - - arraysybase_fetch_row - resourceresult - + + arraysybase_fetch_row + resourceresult + Returns an array that corresponds to the fetched row, or &false; if there are no more rows. @@ -57,7 +57,7 @@ - See also + See also sybase_fetch_array, sybase_fetch_assoc, sybase_fetch_object, diff --git a/reference/sybase/functions/sybase-field-seek.xml b/reference/sybase/functions/sybase-field-seek.xml index 8de0727c67..e3616a021c 100644 --- a/reference/sybase/functions/sybase-field-seek.xml +++ b/reference/sybase/functions/sybase-field-seek.xml @@ -1,5 +1,5 @@ - + @@ -8,11 +8,11 @@ Description - - boolsybase_field_seek - resourceresult - intfield_offset - + + boolsybase_field_seek + resourceresult + intfield_offset + Seeks to the specified field offset. If the next call to sybase_fetch_field won't include a field @@ -22,7 +22,7 @@ &return.success; - See also + See also sybase_fetch_field. diff --git a/reference/sybase/functions/sybase-free-result.xml b/reference/sybase/functions/sybase-free-result.xml index 00a295be46..b00cbfa2f6 100644 --- a/reference/sybase/functions/sybase-free-result.xml +++ b/reference/sybase/functions/sybase-free-result.xml @@ -1,5 +1,5 @@ - + @@ -8,10 +8,10 @@ Description - - boolsybase_free_result - resourceresult - + + boolsybase_free_result + resourceresult + sybase_free_result only needs to be called if you are worried about using too much memory while your script diff --git a/reference/sybase/functions/sybase-get-last-message.xml b/reference/sybase/functions/sybase-get-last-message.xml index bbbde70433..f269ed159e 100644 --- a/reference/sybase/functions/sybase-get-last-message.xml +++ b/reference/sybase/functions/sybase-get-last-message.xml @@ -1,5 +1,5 @@ - + @@ -8,11 +8,11 @@ Description - - stringsybase_get_last_message - - - + + stringsybase_get_last_message + + + sybase_get_last_message returns the last message reported by the server. diff --git a/reference/sybase/functions/sybase-min-client-severity.xml b/reference/sybase/functions/sybase-min-client-severity.xml index c1e93cfe6b..506395c793 100644 --- a/reference/sybase/functions/sybase-min-client-severity.xml +++ b/reference/sybase/functions/sybase-min-client-severity.xml @@ -1,5 +1,5 @@ - + @@ -8,19 +8,19 @@ Description - - voidsybase_min_client_severity - intseverity - - + + voidsybase_min_client_severity + intseverity + + sybase_min_client_severity sets the minimum client severity level. - + &sybase.ct.only; - - See also + + See also sybase_min_server_severity. diff --git a/reference/sybase/functions/sybase-min-error-severity.xml b/reference/sybase/functions/sybase-min-error-severity.xml index 4228301332..28a11f5118 100644 --- a/reference/sybase/functions/sybase-min-error-severity.xml +++ b/reference/sybase/functions/sybase-min-error-severity.xml @@ -1,5 +1,5 @@ - + @@ -8,19 +8,19 @@ Description - - voidsybase_min_error_severity - intseverity - - + + voidsybase_min_error_severity + intseverity + + sybase_min_error_severity sets the minimum error severity level. - + &sybase.db.only; - - See also + + See also sybase_min_message_severity. diff --git a/reference/sybase/functions/sybase-min-message-severity.xml b/reference/sybase/functions/sybase-min-message-severity.xml index 3782b6ee65..d0b409f821 100644 --- a/reference/sybase/functions/sybase-min-message-severity.xml +++ b/reference/sybase/functions/sybase-min-message-severity.xml @@ -1,5 +1,5 @@ - + @@ -8,19 +8,19 @@ Description - - voidsybase_min_message_severity - intseverity - - + + voidsybase_min_message_severity + intseverity + + sybase_min_message_severity sets the minimum message severity level. - + &sybase.db.only; - - See also + + See also sybase_min_error_severity. diff --git a/reference/sybase/functions/sybase-min-server-severity.xml b/reference/sybase/functions/sybase-min-server-severity.xml index bab57aec0a..60d3aa2c9c 100644 --- a/reference/sybase/functions/sybase-min-server-severity.xml +++ b/reference/sybase/functions/sybase-min-server-severity.xml @@ -1,5 +1,5 @@ - + @@ -8,19 +8,19 @@ Description - - voidsybase_min_server_severity - intseverity - - + + voidsybase_min_server_severity + intseverity + + sybase_min_server_severity sets the minimum server severity level. &sybase.ct.only; - - See also + + See also sybase_min_client_severity. diff --git a/reference/sybase/functions/sybase-num-fields.xml b/reference/sybase/functions/sybase-num-fields.xml index 16d50b4000..d9ae25a306 100644 --- a/reference/sybase/functions/sybase-num-fields.xml +++ b/reference/sybase/functions/sybase-num-fields.xml @@ -1,5 +1,5 @@ - + @@ -8,17 +8,17 @@ Description - - intsybase_num_fields - resourceresult - + + intsybase_num_fields + resourceresult + sybase_num_fields returns the number of fields in a result set. - - See also - sybase_query, + + See also + sybase_query, sybase_fetch_field and sybase_num_rows. diff --git a/reference/sybase/functions/sybase-num-rows.xml b/reference/sybase/functions/sybase-num-rows.xml index 6a2d4e1fb3..6bdd3b98ae 100644 --- a/reference/sybase/functions/sybase-num-rows.xml +++ b/reference/sybase/functions/sybase-num-rows.xml @@ -1,5 +1,5 @@ - + @@ -8,16 +8,16 @@ Description - - intsybase_num_rows - resourceresult - + + intsybase_num_rows + resourceresult + sybase_num_rows returns the number of rows in a result set. - See also + See also sybase_num_fields, sybase_query and sybase_fetch_row. diff --git a/reference/sybase/functions/sybase-pconnect.xml b/reference/sybase/functions/sybase-pconnect.xml index e45a01ef04..aafa8a78b0 100644 --- a/reference/sybase/functions/sybase-pconnect.xml +++ b/reference/sybase/functions/sybase-pconnect.xml @@ -1,5 +1,5 @@ - + @@ -8,15 +8,15 @@ Description - - resourcesybase_pconnect - stringservername - stringusername - stringpassword - stringcharset - stringappname - - + + resourcesybase_pconnect + stringservername + stringusername + stringpassword + stringcharset + stringappname + + Returns a positive Sybase persistent link identifier on success, or &false; on error. @@ -24,19 +24,19 @@ sybase_pconnect acts very much like sybase_connect with two major differences. - + First, when connecting, the function would first try to find a (persistent) link that's already open with the same host, username and password. If one is found, an identifier for it will be returned instead of opening a new connection. - + Second, the connection to the SQL server will not be closed when the execution of the script ends. Instead, the link will remain open for future use (sybase_close will not close links established by sybase_pconnect). - + This type of links is therefore called 'persistent'. diff --git a/reference/sybase/functions/sybase-query.xml b/reference/sybase/functions/sybase-query.xml index d095b0a556..ef0efad3aa 100644 --- a/reference/sybase/functions/sybase-query.xml +++ b/reference/sybase/functions/sybase-query.xml @@ -1,5 +1,5 @@ - + @@ -8,11 +8,11 @@ Description - - mixedsybase_query - stringquery - resourcelink_identifier - + + mixedsybase_query + stringquery + resourcelink_identifier + Returns a positive Sybase result identifier on success, &false; on error, or &true; if the query was successful but didn't return any columns. @@ -26,8 +26,8 @@ called, and use it. - See also - sybase_select_db and + See also + sybase_select_db and sybase_connect. diff --git a/reference/sybase/functions/sybase-result.xml b/reference/sybase/functions/sybase-result.xml index b9e8077c6f..aab4722250 100644 --- a/reference/sybase/functions/sybase-result.xml +++ b/reference/sybase/functions/sybase-result.xml @@ -1,5 +1,5 @@ - + @@ -8,13 +8,13 @@ Description - - stringsybase_result - resourceresult - introw - mixedfield - - + + stringsybase_result + resourceresult + introw + mixedfield + + Returns the contents of the cell at the row and offset in the specified Sybase result set. @@ -37,7 +37,7 @@ Recommended high-performance alternatives: - sybase_fetch_row, + sybase_fetch_row, sybase_fetch_array and sybase_fetch_object. diff --git a/reference/sybase/functions/sybase-select-db.xml b/reference/sybase/functions/sybase-select-db.xml index 8ffa46f0a3..c29aa19f49 100644 --- a/reference/sybase/functions/sybase-select-db.xml +++ b/reference/sybase/functions/sybase-select-db.xml @@ -1,5 +1,5 @@ - + @@ -8,12 +8,12 @@ Description - - boolsybase_select_db - stringdatabase_name - resourcelink_identifier - - + + boolsybase_select_db + stringdatabase_name + resourcelink_identifier + + sybase_select_db sets the current active database on the server that's associated with the specified link identifier. If no link identifier is specified, the last opened @@ -21,16 +21,16 @@ establish a link as if sybase_connect was called, and use it. - + &return.success; Every subsequent call to sybase_query will be made on the active database. - + See also - sybase_connect, + sybase_connect, sybase_pconnect and sybase_query diff --git a/reference/sybase/functions/sybase-set-message-handler.xml b/reference/sybase/functions/sybase-set-message-handler.xml index 210fa0b47a..6695cffab2 100644 --- a/reference/sybase/functions/sybase-set-message-handler.xml +++ b/reference/sybase/functions/sybase-set-message-handler.xml @@ -1,5 +1,5 @@ - + sybase_set_message_handler @@ -7,18 +7,18 @@ Description - - boolsybase_set_message_handler - callbackhandler - resourceconnection - - + + boolsybase_set_message_handler + callbackhandler + resourceconnection + + sybase_set_message_handler sets a user function to handle messages generated by the server. You may specify the name of a global function, or use an array to specify an object reference and a - method name. + method name. - + &sybase.ct.only; @@ -32,7 +32,7 @@ - The connection parameter was added in + The connection parameter was added in PHP 4.3.5. @@ -42,11 +42,11 @@ ]]> @@ -58,12 +58,12 @@ @@ -78,14 +78,14 @@ // Return FALSE from this function to indicate you can't handle // this. The error is printed out as a warning, the way you're used // to it if there is no handler installed. - function msg_handler($msgnumber, $severity, $state, $line, $text) + function msg_handler($msgnumber, $severity, $state, $line, $text) { if (257 == $msgnumber) { return false; } var_dump($msgnumber, $severity, $state, $line, $text); } - + sybase_set_message_handler('msg_handler'); ?> ]]> diff --git a/reference/sybase/functions/sybase-unbuffered-query.xml b/reference/sybase/functions/sybase-unbuffered-query.xml index b9c2ce7517..ffa4ea16e4 100644 --- a/reference/sybase/functions/sybase-unbuffered-query.xml +++ b/reference/sybase/functions/sybase-unbuffered-query.xml @@ -1,5 +1,5 @@ - + sybase_unbuffered_query @@ -7,22 +7,22 @@ Description - - resourcesybase_unbuffered_query - stringquery - resourcelink_identifier - boolstore_result - + + resourcesybase_unbuffered_query + stringquery + resourcelink_identifier + boolstore_result + Returns a positive Sybase result identifier on success, or &false; on error. - + &sybase.ct.only; - - - sybase_unbuffered_query sends a query to the - currently active database on the server that's associated with the specified + + + sybase_unbuffered_query sends a query to the + currently active database on the server that's associated with the specified link identifier. If the link identifier isn't specified, the last opened link is assumed. If no link is open, the function tries to establish a link as if sybase_connect was @@ -38,14 +38,14 @@ sybase_num_rows will only return the correct number - of rows if all result sets have been read. To Sybase, the number of rows + of rows if all result sets have been read. To Sybase, the number of rows is not known and is therefore computed by the client implementation. If you don't read all of the resultsets prior to executing the next query, PHP will raise a warning and cancel all of the pending results. To get rid of - this, use sybase_free_result which will cancel pending + this, use sybase_free_result which will cancel pending results of an unbuffered query. @@ -82,7 +82,7 @@ sybase_close($dbh); - See also + See also sybase_query.