403Webshell
Server IP : 103.119.228.120  /  Your IP : 52.15.37.74
Web Server : Apache
System : Linux v8.techscape8.com 3.10.0-1160.119.1.el7.tuxcare.els2.x86_64 #1 SMP Mon Jul 15 12:09:18 UTC 2024 x86_64
User : nobody ( 99)
PHP Version : 5.6.40
Disable Function : shell_exec,symlink,system,exec,proc_get_status,proc_nice,proc_terminate,define_syslog_variables,syslog,openlog,closelog,escapeshellcmd,passthru,ocinum cols,ini_alter,leak,listen,chgrp,apache_note,apache_setenv,debugger_on,debugger_off,ftp_exec,dl,dll,myshellexec,proc_open,socket_bind,proc_close,escapeshellarg,parse_ini_filepopen,fpassthru,exec,passthru,escapeshellarg,escapeshellcmd,proc_close,proc_open,ini_alter,popen,show_source,proc_nice,proc_terminate,proc_get_status,proc_close,pfsockopen,leak,apache_child_terminate,posix_kill,posix_mkfifo,posix_setpgid,posix_setsid,posix_setuid,dl,symlink,shell_exec,system,dl,passthru,escapeshellarg,escapeshellcmd,myshellexec,c99_buff_prepare,c99_sess_put,fpassthru,getdisfunc,fx29exec,fx29exec2,is_windows,disp_freespace,fx29sh_getupdate,fx29_buff_prepare,fx29_sess_put,fx29shexit,fx29fsearch,fx29ftpbrutecheck,fx29sh_tools,fx29sh_about,milw0rm,imagez,sh_name,myshellexec,checkproxyhost,dosyayicek,c99_buff_prepare,c99_sess_put,c99getsource,c99sh_getupdate,c99fsearch,c99shexit,view_perms,posix_getpwuid,posix_getgrgid,posix_kill,parse_perms,parsesort,view_perms_color,set_encoder_input,ls_setcheckboxall,ls_reverse_all,rsg_read,rsg_glob,selfURL,dispsecinfo,unix2DosTime,addFile,system,get_users,view_size,DirFiles,DirFilesWide,DirPrintHTMLHeaders,GetFilesTotal,GetTitles,GetTimeTotal,GetMatchesCount,GetFileMatchesCount,GetResultFiles,fs_copy_dir,fs_copy_obj,fs_move_dir,fs_move_obj,fs_rmdir,SearchText,getmicrotime
MySQL : ON |  cURL : ON |  WGET : ON |  Perl : ON |  Python : ON |  Sudo : ON |  Pkexec : ON
Directory :  /usr/local/ssl/local/ssl/local/ssl/local/ssl/local/ssl/local/share/man/man3/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /usr/local/ssl/local/ssl/local/ssl/local/ssl/local/ssl/local/share/man/man3/DBD::Proxy.3pm
.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.28)
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" Set up some character translations and predefined strings.  \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
.\" nothing in troff, for use with C<>.
.tr \(*W-
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.ie n \{\
.    ds -- \(*W-
.    ds PI pi
.    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
.    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
.    ds L" ""
.    ds R" ""
.    ds C` ""
.    ds C' ""
'br\}
.el\{\
.    ds -- \|\(em\|
.    ds PI \(*p
.    ds L" ``
.    ds R" ''
.    ds C`
.    ds C'
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\"
.\" If the F register is turned on, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD.  Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.\"
.\" Avoid warning from groff about undefined register 'F'.
.de IX
..
.nr rF 0
.if \n(.g .if rF .nr rF 1
.if (\n(rF:(\n(.g==0)) \{
.    if \nF \{
.        de IX
.        tm Index:\\$1\t\\n%\t"\\$2"
..
.        if !\nF==2 \{
.            nr % 0
.            nr F 2
.        \}
.    \}
.\}
.rr rF
.\" ========================================================================
.\"
.IX Title "DBD::Proxy 3"
.TH DBD::Proxy 3 "2014-09-21" "perl v5.16.3" "User Contributed Perl Documentation"
.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
.nh
.SH "NAME"
DBD::Proxy \- A proxy driver for the DBI
.SH "SYNOPSIS"
.IX Header "SYNOPSIS"
.Vb 1
\&  use DBI;
\&
\&  $dbh = DBI\->connect("dbi:Proxy:hostname=$host;port=$port;dsn=$db",
\&                      $user, $passwd);
\&
\&  # See the DBI module documentation for full details
.Ve
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
DBD::Proxy is a Perl module for connecting to a database via a remote
\&\s-1DBI\s0 driver. See DBD::Gofer for an alternative with different trade-offs.
.PP
This is of course not needed for \s-1DBI\s0 drivers which already
support connecting to a remote database, but there are engines which
don't offer network connectivity.
.PP
Another application is offering database access through a firewall, as
the driver offers query based restrictions. For example you can
restrict queries to exactly those that are used in a given \s-1CGI\s0
application.
.PP
Speaking of \s-1CGI,\s0 another application is (or rather, will be) to reduce
the database connect/disconnect overhead from \s-1CGI\s0 scripts by using
proxying the connect_cached method. The proxy server will hold the
database connections open in a cache. The \s-1CGI\s0 script then trades the
database connect/disconnect overhead for the DBD::Proxy
connect/disconnect overhead which is typically much less.
.SH "CONNECTING TO THE DATABASE"
.IX Header "CONNECTING TO THE DATABASE"
Before connecting to a remote database, you must ensure, that a Proxy
server is running on the remote machine. There's no default port, so
you have to ask your system administrator for the port number. See
DBI::ProxyServer for details.
.PP
Say, your Proxy server is running on machine \*(L"alpha\*(R", port 3334, and
you'd like to connect to an \s-1ODBC\s0 database called \*(L"mydb\*(R" as user \*(L"joe\*(R"
with password \*(L"hello\*(R". When using \s-1DBD::ODBC\s0 directly, you'd do a
.PP
.Vb 1
\&  $dbh = DBI\->connect("DBI:ODBC:mydb", "joe", "hello");
.Ve
.PP
With DBD::Proxy this becomes
.PP
.Vb 2
\&  $dsn = "DBI:Proxy:hostname=alpha;port=3334;dsn=DBI:ODBC:mydb";
\&  $dbh = DBI\->connect($dsn, "joe", "hello");
.Ve
.PP
You see, this is mainly the same. The DBD::Proxy module will create a
connection to the Proxy server on \*(L"alpha\*(R" which in turn will connect
to the \s-1ODBC\s0 database.
.PP
Refer to the \s-1DBI\s0 documentation on the \f(CW\*(C`connect\*(C'\fR method for a way
to automatically use DBD::Proxy without having to change your code.
.PP
DBD::Proxy's \s-1DSN\s0 string has the format
.PP
.Vb 1
\&  $dsn = "DBI:Proxy:key1=val1; ... ;keyN=valN;dsn=valDSN";
.Ve
.PP
In other words, it is a collection of key/value pairs. The following
keys are recognized:
.IP "hostname" 4
.IX Item "hostname"
.PD 0
.IP "port" 4
.IX Item "port"
.PD
Hostname and port of the Proxy server; these keys must be present,
no defaults. Example:
.Sp
.Vb 1
\&    hostname=alpha;port=3334
.Ve
.IP "dsn" 4
.IX Item "dsn"
The value of this attribute will be used as a dsn name by the Proxy
server. Thus it must have the format \f(CW\*(C`DBI:driver:...\*(C'\fR, in particular
it will contain colons. The \fIdsn\fR value may contain semicolons, hence
this key *must* be the last and it's value will be the complete
remaining part of the dsn. Example:
.Sp
.Vb 1
\&    dsn=DBI:ODBC:mydb
.Ve
.IP "cipher" 4
.IX Item "cipher"
.PD 0
.IP "key" 4
.IX Item "key"
.IP "usercipher" 4
.IX Item "usercipher"
.IP "userkey" 4
.IX Item "userkey"
.PD
By using these fields you can enable encryption. If you set,
for example,
.Sp
.Vb 1
\&    cipher=$class;key=$key
.Ve
.Sp
(note the semicolon) then DBD::Proxy will create a new cipher object
by executing
.Sp
.Vb 1
\&    $cipherRef = $class\->new(pack("H*", $key));
.Ve
.Sp
and pass this object to the RPC::PlClient module when creating a
client. See RPC::PlClient. Example:
.Sp
.Vb 1
\&    cipher=IDEA;key=97cd2375efa329aceef2098babdc9721
.Ve
.Sp
The usercipher/userkey attributes allow you to use two phase encryption:
The cipher/key encryption will be used in the login and authorisation
phase. Once the client is authorised, he will change to usercipher/userkey
encryption. Thus the cipher/key pair is a \fBhost\fR based secret, typically
less secure than the usercipher/userkey secret and readable by anyone.
The usercipher/userkey secret is \fByour\fR private secret.
.Sp
Of course encryption requires an appropriately configured server. See
\&\*(L"\s-1CONFIGURATION FILE\*(R"\s0 in DBD::ProxyServer.
.IP "debug" 4
.IX Item "debug"
Turn on debugging mode
.IP "stderr" 4
.IX Item "stderr"
This attribute will set the corresponding attribute of the RPC::PlClient
object, thus logging will not use \fIsyslog()\fR, but redirected to stderr.
This is the default under Windows.
.Sp
.Vb 1
\&    stderr=1
.Ve
.IP "logfile" 4
.IX Item "logfile"
Similar to the stderr attribute, but output will be redirected to the
given file.
.Sp
.Vb 1
\&    logfile=/dev/null
.Ve
.IP "RowCacheSize" 4
.IX Item "RowCacheSize"
The DBD::Proxy driver supports this attribute (which is \s-1DBI\s0 standard,
as of \s-1DBI 1.02\s0). It's used to reduce network round-trips by fetching
multiple rows in one go. The current default value is 20, but this may
change.
.IP "proxy_no_finish" 4
.IX Item "proxy_no_finish"
This attribute can be used to reduce network traffic: If the
application is calling \f(CW$sth\fR\->\fIfinish()\fR then the proxy tells the server
to finish the remote statement handle. Of course this slows down things
quite a lot, but is perfectly good for reducing memory usage with
persistent connections.
.Sp
However, if you set the \fIproxy_no_finish\fR attribute to a \s-1TRUE\s0 value,
either in the database handle or in the statement handle, then \fIfinish()\fR
calls will be suppressed. This is what you want, for example, in small
and fast \s-1CGI\s0 applications.
.IP "proxy_quote" 4
.IX Item "proxy_quote"
This attribute can be used to reduce network traffic: By default calls
to \f(CW$dbh\fR\->\fIquote()\fR are passed to the remote driver.  Of course this slows
down things quite a lot, but is the safest default behaviour.
.Sp
However, if you set the \fIproxy_quote\fR attribute to the value '\f(CW\*(C`local\*(C'\fR'
either in the database handle or in the statement handle, and the call
to quote has only one parameter, then the local default \s-1DBI\s0 quote
method will be used (which will be faster but may be wrong).
.SH "KNOWN ISSUES"
.IX Header "KNOWN ISSUES"
.SS "Unproxied method calls"
.IX Subsection "Unproxied method calls"
If a method isn't being proxied, try declaring a stub sub in the appropriate
package (DBD::Proxy::db for a dbh method, and DBD::Proxy::st for an sth method).
For example:
.PP
.Vb 1
\&    sub DBD::Proxy::db::selectall_arrayref;
.Ve
.PP
That will enable selectall_arrayref to be proxied.
.PP
Currently many methods aren't explicitly proxied and so you get the \s-1DBI\s0's
default methods executed on the client.
.PP
Some of those methods, like selectall_arrayref, may then call other methods
that are proxied (selectall_arrayref calls fetchall_arrayref which calls fetch
which is proxied). So things may appear to work but operate more slowly than
the could.
.PP
This may all change in a later version.
.SS "Complex handle attributes"
.IX Subsection "Complex handle attributes"
Sometimes handles are having complex attributes like hash refs or
array refs and not simple strings or integers. For example, with
\&\s-1DBD::CSV,\s0 you would like to write something like
.PP
.Vb 2
\&  $dbh\->{"csv_tables"}\->{"passwd"} =
\&        { "sep_char" => ":", "eol" => "\en";
.Ve
.PP
The above example would advice the \s-1CSV\s0 driver to assume the file
\&\*(L"passwd\*(R" to be in the format of the /etc/passwd file: Colons as
separators and a line feed without carriage return as line
terminator.
.PP
Surprisingly this example doesn't work with the proxy driver. To understand
the reasons, you should consider the following: The Perl compiler is
executing the above example in two steps:
.IP "1." 4
The first step is fetching the value of the key \*(L"csv_tables\*(R" in the
handle \f(CW$dbh\fR. The value returned is complex, a hash ref.
.IP "2." 4
The second step is storing some value (the right hand side of the
assignment) as the key \*(L"passwd\*(R" in the hash ref from step 1.
.PP
This becomes a little bit clearer, if we rewrite the above code:
.PP
.Vb 2
\&  $tables = $dbh\->{"csv_tables"};
\&  $tables\->{"passwd"} = { "sep_char" => ":", "eol" => "\en";
.Ve
.PP
While the examples work fine without the proxy, the fail due to a
subtle difference in step 1: By \s-1DBI\s0 magic, the hash ref
\&\f(CW$dbh\fR\->{'csv_tables'} is returned from the server to the client.
The client creates a local copy. This local copy is the result of
step 1. In other words, step 2 modifies a local copy of the hash ref,
but not the server's hash ref.
.PP
The workaround is storing the modified local copy back to the server:
.PP
.Vb 3
\&  $tables = $dbh\->{"csv_tables"};
\&  $tables\->{"passwd"} = { "sep_char" => ":", "eol" => "\en";
\&  $dbh\->{"csv_tables"} = $tables;
.Ve
.SH "SECURITY WARNING"
.IX Header "SECURITY WARNING"
RPC::PlClient used underneath is not secure due to serializing and
deserializing data with Storable module. Use the proxy driver only in
trusted environment.
.SH "AUTHOR AND COPYRIGHT"
.IX Header "AUTHOR AND COPYRIGHT"
This module is Copyright (c) 1997, 1998
.PP
.Vb 4
\&    Jochen Wiedmann
\&    Am Eisteich 9
\&    72555 Metzingen
\&    Germany
\&
\&    Email: joe@ispsoft.de
\&    Phone: +49 7123 14887
.Ve
.PP
The DBD::Proxy module is free software; you can redistribute it and/or
modify it under the same terms as Perl itself. In particular permission
is granted to Tim Bunce for distributing this as a part of the \s-1DBI.\s0
.SH "SEE ALSO"
.IX Header "SEE ALSO"
\&\s-1DBI\s0, RPC::PlClient, Storable

Youez - 2016 - github.com/yon3zu
LinuXploit