diff --git a/db_details_importdocsql.php3 b/db_details_importdocsql.php3
index 3a9358208..d5f82ecbe 100644
--- a/db_details_importdocsql.php3
+++ b/db_details_importdocsql.php3
@@ -174,9 +174,11 @@ if (isset($do) && $do == 'import') {
// function is_writeable() is valid on PHP3 and 4
if (!is_writeable($tmp_subdir)) {
- // if we cannot move the file, let PHP report the error
- error_reporting(E_ALL);
$docsql_text = PMA_readFile($sql_file, $sql_file_compression);
+ if ($docsql_text == FALSE) {
+ echo $strFileCouldNotBeRead;
+ exit();
+ }
}
else {
$sql_file_new = $tmp_subdir . basename($sql_file);
diff --git a/ldi_check.php3 b/ldi_check.php3
index f317c12c4..95d9ebaef 100755
--- a/ldi_check.php3
+++ b/ldi_check.php3
@@ -71,8 +71,9 @@ if (isset($btnLDI) && isset($local_textfile) && $local_textfile != '') {
// function is_writeable() is valid on PHP3 and 4
if (!is_writeable($tmp_subdir)) {
- // if we cannot move the file, let PHP report the error
- error_reporting(E_ALL);
+ echo $strWebServerUploadDirectoryError . ': ' . $tmp_subdir
+ . '
';
+ exit();
} else {
$textfile_new = $tmp_subdir . basename($textfile);
if (PMA_PHP_INT_VERSION < 40003) {
@@ -100,8 +101,11 @@ if (isset($btnLDI) && empty($textfile)) {
$replace = '';
}
- error_reporting(E_ALL);
- chmod($textfile, 0644);
+ // the error message does not correspond exactly to the error...
+ if (!@chmod($textfile, 0644)) {
+ echo $strFileCouldNotBeRead . ' ' . $textfile . '
';
+ exit();
+ }
// Kanji encoding convert appended by Y.Kawada
if (function_exists('PMA_kanji_file_conv')) {
diff --git a/read_dump.php3 b/read_dump.php3
index 2385c787d..406bbafba 100644
--- a/read_dump.php3
+++ b/read_dump.php3
@@ -100,9 +100,11 @@ if ($sql_file != 'none') {
// function is_writeable() is valid on PHP3 and 4
if (!is_writeable($tmp_subdir)) {
- // if we cannot move the file, let PHP report the error
- error_reporting(E_ALL);
$sql_query = PMA_readFile($sql_file, $sql_file_compression);
+ if ($sql_query == FALSE) {
+ echo $strFileCouldNotBeRead;
+ exit();
+ }
}
else {
$sql_file_new = $tmp_subdir . basename($sql_file);
diff --git a/tbl_properties_links.php3 b/tbl_properties_links.php3
index f236c787b..cd728e173 100755
--- a/tbl_properties_links.php3
+++ b/tbl_properties_links.php3
@@ -6,7 +6,8 @@
/**
* Sets error reporting level
*/
-error_reporting(E_ALL);
+// (removed to avoid path disclosure, not sure about why this was here)
+// error_reporting(E_ALL);
// Check parameters