Database Reference
In-Depth Information
The text/plain: external transformation enables us to send a cell's data to
another application that will be started on the web server, capture this application's
output, and display it in the cell's position.
This feature is supported only on a Linux or UNIX server (under Microsoft
Windows, output and error redirection cannot be easily captured by the PHP
process). Furthermore, PHP should not be running in safe mode. Hence, the feature
may not be available on hosted servers.
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, and 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 takes place.
Every program that is allowed, along with its complete path, must be described here,
with an index number starting from 0. 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 will now 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—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.
 
Search WWH ::




Custom Search