Databases Reference
In-Depth Information
For security reasons, the exact path and name of the application cannot be set from
within phpMyAdmin as a transformation option. The application names are set
directly inside one of the phpMyAdmin scripts.
First, in the phpMyAdmin installation directory, we edit the
text_plain__external.inc.php ile in libraries/transformations/ ,
and find the following section:
$allowed_programs = array();
//$allowed_programs[0] = '/usr/local/bin/tidy';
//$allowed_programs[1] = '/usr/local/bin/validate';
No external application is configured by default; we have to explicitly add our own.
The names of the transformation scripts are constructed
using the following format: the MIME type, a
double underscore, and then a part indicating which
transformation occurs.
Each allowed program must be described here, with an index number, starting from
0, and its complete path. Then we save the modifications to this script and put it back
on the server if needed. The remaining setup is completed from the panel where we
chose the options for the other browser transformations.
Of course, we choose text/plain: external in the transformations menu.
As the first option, we place the application number. (For example, 0 would be for
the tidy application.) The second option holds the parameters we need to pass to this
application. If we want phpMyAdmin to apply the htmlspecialchars() function to
the results, we put 1 as the third parameter. (This is done by default.) We could put a
0 there to avoid protecting the output with htmlspecialchars() .
If we want to avoid reformatting the cell's lines, we put 1 as the fourth parameter.
This will use the NOWRAP modifier, and is done by default.
External Application Example: In-Cell Sort
This example shows how we can sort the text contents of one cell. We start by
modifying the text_plain__external.inc.php script, as mentioned in the above
section, to add the sort program:
$allowed_programs[0] = '/bin/sort';
Note that our new program bears the index number 0 .
 
Search WWH ::




Custom Search