v5:proxy:proxy_index
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revisionLast revisionBoth sides next revision | ||
v5:proxy:proxy_index [2017/07/10 19:06] – created mnewnham | v5:proxy:proxy_index [2020/01/04 16:44] – [Introduction] security warning dregad | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== ADOdb Proxy Server ====== | ====== ADOdb Proxy Server ====== | ||
+ | <WRAP important> | ||
+ | This functionality is deprecated as of ADOdb 5.21.0 and will be removed in a later release, unless the community contributes with necessary security enhancements, | ||
+ | </ | ||
+ | |||
===== Introduction ===== | ===== Introduction ===== | ||
The ADOdb Proxy server provides a simple method of extending a database connection to provide a simple REST server via http. It provides a limited number of ADOdb commands that can be executed across an http channel against any supported database. | The ADOdb Proxy server provides a simple method of extending a database connection to provide a simple REST server via http. It provides a limited number of ADOdb commands that can be executed across an http channel against any supported database. | ||
+ | |||
+ | <WRAP alert> | ||
+ | **Security warning - use with extreme caution !** | ||
+ | Depending on how it is setup, this feature can potentially expose the database to attacks, particularly if used with a privileged user account. | ||
+ | </ | ||
===== Server Side Usage ===== | ===== Server Side Usage ===== | ||
* The machine that acts as a database server must have a PHP configuration installed that allows it to serve PHP connections to the necessary database. | * The machine that acts as a database server must have a PHP configuration installed that allows it to serve PHP connections to the necessary database. | ||
* The http server must have a CGI configuration defined that allows it to serve PHP requests. | * The http server must have a CGI configuration defined that allows it to serve PHP requests. | ||
- | * A single | + | * A single |
- | * ogram is provided that acts as a server side dispatcher, **// | + | |
Modify the server.php as required to provide a database connection | Modify the server.php as required to provide a database connection | ||
Line 28: | Line 36: | ||
===== Client Side Usage ===== | ===== Client Side Usage ===== | ||
- | Configuration of the client side differs only slightly from the normal ADOdb configuration. | + | Configuration of the client side differs only slightly from the normal ADOdb configuration. |
<code php> | <code php> | ||
Line 59: | Line 67: | ||
* Create an SQL command | * Create an SQL command | ||
*/ | */ | ||
- | $SQL = " | + | $sql = " |
/* | /* | ||
Line 67: | Line 75: | ||
while ($r = $result-> | while ($r = $result-> | ||
print_r($r); | print_r($r); | ||
+ | |||
+ | |||
</ | </ | ||
===== Limitations ===== | ===== Limitations ===== | ||
+ | * Access currently limited to http protocol | ||
+ | * No access to meta functions | ||
+ | * No rollback or transactional control | ||
+ | * No parameter binding allowed | ||
+ | * server.php must be modified in-situ | ||
+ |
v5/proxy/proxy_index.txt · Last modified: 2021/08/22 13:17 by dregad