Hallo Leute,
ich habe ein mächtiges, richtig grosses Problem
Ich habe folgende Funktion
Nun änderte mein Provider die PHP-Version und diese Abfrage funktioniert nicht mehr und mein Provider stellt sich sturr.
Ich erhalte folgende Fehlermeldung :
Warning: fopen(../mysql/pphl_settings.sql) [function.fopen]: failed to create stream: No such file or directory in /usr/local/httpd/htdocs/kunden/web625/html/libraries/load_sql.lib.php on line 79
Warning: filesize() [function.filesize]: Stat failed for ../mysql/pphl_settings.sql (errno=2 - No such file or directory) in /usr/local/httpd/htdocs/kunden/web625/html/libraries/load_sql.lib.php on line 79
Warning: fread(): supplied argument is not a valid stream resource in /usr/local/httpd/htdocs/kunden/web625/html/libraries/load_sql.lib.php on line 79
Warning: fopen(../mysql/pphl_css.sql) [function.fopen]: failed to create stream: No such file or directory in /usr/local/httpd/htdocs/kunden/web625/html/libraries/load_sql.lib.php on line 79
Warning: filesize() [function.filesize]: Stat failed for ../mysql/pphl_css.sql (errno=2 - No such file or directory) in /usr/local/httpd/htdocs/kunden/web625/html/libraries/load_sql.lib.php on line 79
Warning: fread(): supplied argument is not a valid stream resource in /usr/local/httpd/htdocs/kunden/web625/html/libraries/load_sql.lib.php on line 79
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /usr/local/httpd/htdocs/kunden/web625/html/libraries/load_sql.lib.php:79) in /usr/local/httpd/htdocs/kunden/web625/html/main.php on line 162
Warning: Cannot modify header information - headers already sent by (output started at /usr/local/httpd/htdocs/kunden/web625/html/libraries/load_sql.lib.php:79) in /usr/local/httpd/htdocs/kunden/web625/html/main.php on line 217
Zeile 79 ist folgende :
Ich weis absolut nicht mehr weiter, denn die ganze Zeit lief es.
Gruß Manuela
ich habe ein mächtiges, richtig grosses Problem
Ich habe folgende Funktion
PHP-Code:
function exec_sql_lines($sql_file, $old_string = '', $new_string = '') {
$sql_query = isset($sql_query) ? $sql_query : "";
if(!empty($sql_file) && $sql_file != "none") {
$sql_query = fread(fopen($sql_file, "r"), filesize($sql_file));
/* If magic_quotes_runtime is enabled, most functions that return data from any sort of external source
including databases and text files will have quotes escaped with a backslash.
*/
if (get_magic_quotes_runtime() == 1) $sql_query = stripslashes($sql_query);
/* replace old_string with new_string if they are set */
if($old_string != '') {
$sql_query = ereg_replace($old_string,$new_string,$sql_query);
}
}
$sql_query = trim($sql_query);
if($sql_query != "") {
$sql_query = remove_remarks($sql_query);
$pieces = split_sql_file($sql_query,";");
$cnt_pieces = count($pieces);
/* run multiple queries */
for ($i=0; $i<$cnt_pieces; $i++) {
$sql = trim($pieces[$i]);
if (!empty($sql) and $sql[0] != "#") $result = mysql_query($sql);
}
}
return true;
}
Ich erhalte folgende Fehlermeldung :
Warning: fopen(../mysql/pphl_settings.sql) [function.fopen]: failed to create stream: No such file or directory in /usr/local/httpd/htdocs/kunden/web625/html/libraries/load_sql.lib.php on line 79
Warning: filesize() [function.filesize]: Stat failed for ../mysql/pphl_settings.sql (errno=2 - No such file or directory) in /usr/local/httpd/htdocs/kunden/web625/html/libraries/load_sql.lib.php on line 79
Warning: fread(): supplied argument is not a valid stream resource in /usr/local/httpd/htdocs/kunden/web625/html/libraries/load_sql.lib.php on line 79
Warning: fopen(../mysql/pphl_css.sql) [function.fopen]: failed to create stream: No such file or directory in /usr/local/httpd/htdocs/kunden/web625/html/libraries/load_sql.lib.php on line 79
Warning: filesize() [function.filesize]: Stat failed for ../mysql/pphl_css.sql (errno=2 - No such file or directory) in /usr/local/httpd/htdocs/kunden/web625/html/libraries/load_sql.lib.php on line 79
Warning: fread(): supplied argument is not a valid stream resource in /usr/local/httpd/htdocs/kunden/web625/html/libraries/load_sql.lib.php on line 79
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /usr/local/httpd/htdocs/kunden/web625/html/libraries/load_sql.lib.php:79) in /usr/local/httpd/htdocs/kunden/web625/html/main.php on line 162
Warning: Cannot modify header information - headers already sent by (output started at /usr/local/httpd/htdocs/kunden/web625/html/libraries/load_sql.lib.php:79) in /usr/local/httpd/htdocs/kunden/web625/html/main.php on line 217
Zeile 79 ist folgende :
PHP-Code:
$sql_query = fread(fopen($sql_file, "r"), filesize($sql_file));
Gruß Manuela
Kommentar