Jump to content

bashy

Members
  • Posts

    20
  • Joined

  • Last visited

Everything posted by bashy

  1. Debian 7 is really stable, for both desktop and headless servers. Looks nice with gnome as well...
  2. Well you best show all of the code being used for this...? So you have header('Content-Length: ' . filesize($name)); added?
  3. LIMIT 5 will limit all the final results? It will only return as many rows as you want where s.sub_cat_id = t.sub_id...
  4. Not sure if you coded this yourself but have you checked PHP errors and checked them? I can see one just skimming it, the code below (copied from yours) has errors. Firstly, where you getting $possible_city from? You also don't close the </option> tag? $possible_city doesn't have a closing ; foreach ($rows as $row) { $city = $row->city; ?> <option> <?php echo $possible_city ?> <?php //end loop through cities for pulldown results } ?>
  5. Looking on PHP manual, try adding header('Content-Length: ' . filesize($name)); Or looking at PHP readfile, there's some added functions by users, found something you might want to change and take a look at $filename = 'dummy.zip'; $filename = realpath($filename); $file_extension = strtolower(substr(strrchr($filename,"."),1)); switch ($file_extension) { case "pdf": $ctype="application/pdf"; break; case "exe": $ctype="application/octet-stream"; break; case "zip": $ctype="application/zip"; break; case "doc": $ctype="application/msword"; break; case "xls": $ctype="application/vnd.ms-excel"; break; case "ppt": $ctype="application/vnd.ms-powerpoint"; break; case "gif": $ctype="image/gif"; break; case "png": $ctype="image/png"; break; case "jpe": case "jpeg": case "jpg": $ctype="image/jpg"; break; default: $ctype="application/force-download"; } if (!file_exists($filename)) { die("NO FILE HERE"); } header("Pragma: public"); header("Expires: 0"); header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header("Cache-Control: private",false); header("Content-Type: $ctype"); header("Content-Disposition: attachment; filename=\"".basename($filename)."\";"); header("Content-Transfer-Encoding: binary"); header("Content-Length: ".@filesize($filename)); set_time_limit(0); @readfile("$filename") or die("File not found.");
  6. Why not turn on header info? curl_setopt($ch, CURLINFO_HEADER_OUT, TRUE); or curl_setopt($ch, CURLOPT_HEADER, TRUE);
  7. You using an API or something? Anyway, just check with an IF statement to see? if (isset($_SESSION['user_id'])) { echo 'You\'re already logged in...'; }
  8. Without knowing what you're checking for in each part of the page, it's hard to give help. Are you checking for existing sessions? How does the external script communicate with other parts?
  9. Have you tried checking where it's looking or tried setting the full dir?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.