Databases Reference
In-Depth Information
Clicking on Go should execute the statements located in the file.
Automatic decompression is also available for the files located in the upload
directory. The file names should have extensions such as .bz2 , .gz , .sql.bz2 , or
.sql.gz .
Using the double extensions ( .sql.bz2 ) is a better way to indicate
that a .sql file was produced and then compressed, as we see all the
steps used to generate this file.
Displaying an upload progress bar
Especially when importing a large file, it's interesting to have a visual feedback
on the progression of upload. Please note that the progress bar we are discussing
here informs us only about the uploading part, which is a subset of the whole
import operation.
Having a JavaScript-enabled browser is a requirement for this feature. Moreover,
the web server's PHP component must have the JSON extension and at least one of
these extensions:
• The well-know APC extension ( http://pecl.php.net/package/APC ),
which is highly recommended anyway for its opcode caching benefits
• The uploadprogress extensio n ( http://pecl.php.net/package/
uploadprogr ess )
phpMyAdmin uses AJAX techniques to fetch progress information, then displays it
as part of the File to import dialog. The number of bytes uploaded, total number of
bytes, and percentage uploaded are displayed under the bar.
Configuring APC
A few php.ini directives play an important role for upload progress. First, the
apc.rfc1867 directive must be set to On or true , otherwise this extension won't
be reporting upload progress to the calling script. When set to On , this extension
updates an APC user cache entry with the upload status information.
Also, the frequency of the updates can be set via the apc.rfc1867_freq directive,
which can take the form of a percentage of the total file size (for example, apc.
rfc1867_freq = "10%" ), or a size in bytes (suffixes k for kilobytes, m for megabytes,
and g for gigabytes are accepted). A value of 0 here indicates us to update as often as
possible, which looks interesting but in reality may slow down the upload.
 
Search WWH ::




Custom Search