Hi, I downloaded the script from http://www.gerd-tentler.de/tools/filemanager/ and have set it up. However I can't get one of the features to work. When trying to download a file again I get errors. Here is a link to one of the downloads so you can see the errors for yourself. http://adschemes.com/ftp/66666666666666666666666666778/get_file.php?file=eXtplorer_2.0.0_RC2.zip It should download the file like on the scripts website but mine gets errors. Can anyone see why? Main part of script on my server is http://adschemes.com/ftp/66666666666666666666666666778/filemanager.php Cheers Web-Master
ok first things first Warning: Cannot modify header information - headers already sent by (output started at /home/adscheme/public_html/ftp/66666666666666666666666666778/get_file.php:1) in /home/adscheme/public_html/ftp/66666666666666666666666666778/get_file.php on line 35 you either need to turn off output buffering, or find out where the data is coming from first (ie a blank line at the top of one of your scripts) second Warning: readfile(eXtplorer_2.0.0_RC2.zip) [function.readfile]: failed to open stream: No such file or directory in /home/adscheme/public_html/ftp/66666666666666666666666666778/get_file.php on line 36 that is saying the file you are trying to download doesn't exsist, you need to make sure the webserver has write permission to the downloads/uploads directory, in an ftp client, there should be an option to "chmod" the files - make it 777 and it should fix that hopefully.
Is this the same case with this then? http://adschemes.com/ftp/66666666666666666666666666/get_file.php?file=Highway+to+Hell.mp3
sure its <? /********************************************************************************************************* This code is part of the FileManager software (www.gerd-tentler.de/tools/filemanager), copyright by Gerd Tentler. Obtain permission before selling this code or hosting it on a commercial website or redistributing it over the Internet or in any other medium. In all cases copyright must remain intact. *********************************************************************************************************/ error_reporting(E_WARNING); //======================================================================================================== // Start session and get session variables; needs PHP 4 or higher //======================================================================================================== if(function_exists('session_start')) session_start(); $fmCurDir = $_SESSION['fmCurDir']; //======================================================================================================== // Set variables, if they are not registered globally; needs PHP 4.1.0 or higher //======================================================================================================== if(isset($_REQUEST['file'])) $file = $_REQUEST['file']; if(isset($_SERVER['HTTP_HOST'])) $HTTP_HOST = $_SERVER['HTTP_HOST']; //======================================================================================================== // Includes //======================================================================================================== if($HTTP_HOST == 'localhost' || $HTTP_HOST == '127.0.0.1' || ereg('^192\.168\.0\.[0-9]+$', $HTTP_HOST)) { include('config_local.inc.php'); } else { include('config_main.inc.php'); } if(!isset($language)) $language = 'en'; include("languages/lang_$language.inc"); include('fmlib.inc.php'); //======================================================================================================== // Main //======================================================================================================== // make sure that filename contains no path $file = basename($file); $filename = $file; if($ftp_server) { if($ftp = fm_connect()) { $file = fm_get("$fmCurDir/$file"); @ftp_quit($ftp); } } else $file = "$fmCurDir/$file"; if(file_exists($file)) { if($replSpacesDownload) $filename = str_replace(' ', '_', $filename); if($lowerCaseDownload) $filename = strtolower($filename); header('Content-Type: application/octetstream'); header('Content-Disposition: attachment; filename="' . $filename . '"'); header('Pragma: no-cache'); header('Expires: 0'); readfile($file); } else { ?> <html> <head> <link rel="stylesheet" href="filemanager.css" type="text/css"> </head> <body> <? fm_view_error($msg['errOpen'] . ": $filename"); ?> </body> </html> <? } ?>
just a question: put this print_r(headers_list());die();on line 2, and show us the output. <? /**** Could come from your PHP. Can you tell us what php version you have, and ... if you have access to php.ini?