Databases Reference
In-Depth Information
As we know which character set this column is encoded with (see Chapter 17),
we can compare its contents with a chart describing each character. For instance,
http://en.wikipedia.org/wiki/Latin1 describes the latin1 character set.
SQL Pretty Printing
Let's say we are using a table to store the text of a course about SQL. In one column,
we might have put sample SQL statements. With the text/plain: sql transformation,
these SQL statements will be displayed in color with syntax highlighting, when
browsing this table.
External Applications
The transformations that have been described previously are implemented directly
from within phpMyAdmin. However, some transformations are better done via
existing external applications.
The text/plain: external transformation enables us to send the 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 only supported 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, so the feature might
not be available on hosted servers. A minimum PHP version of 4.3.0 is required for
this feature to work.
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 file 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.
 
Search WWH ::




Custom Search