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?
  10. The editor on IPB is pretty bad anyway but; type words -> press bold -> type words -> backspace = WUT
  11. You're $_GET'ing the "about" text? You want $_POST['about'], not sure why you'd want to send that data via the URL. For the SQL injection nightmare with that code, secure it with the below suggestion. You should be looking at using different SQL functions, mysql_* PHP functions have been deprecated: https://wiki.php.net...sql_deprecation Use prepared statements explained in this thread: http://forums.phpfre...ion-protection/
  12. You do indeed need exit(); after a header() as said above. You should also do this; if(!isset($_SESSION)) session_start();
  13. Also you only want to define it if it isn't defined. if (!defined('BASE')) define('BASE', $siteurl);
  14. Hey, did have a search around but didn't find anything. I can't seem to edit my profile and/or my avatar, I also can't use my email for Gravatar. Tried importing one, came up with this;
  15. Yeah the sidebar part, looks a little lonely there on its own So most of the stuff will be in the update, nice. Also added another suggestion, number 4.
  16. Make the list of "New Threads" longer and maybe add "Latest Replies" section Do you have the update from IPB with the best answer in it? I see solved prefixes but in the thread it doesn't give the best answer link at the top. Maybe add that? Something along the lines of "Unanswered questions" tag in the menu that gives you a list? Maybe add this hook so people can see if the person is still online or not (quickly of course, as it's in the profile card hover) http://community.invisionpower.com/files/file/4268-user-online-status-in-topics/ Do something with the top advert, the square random one which creates a lot of white space
  17. Best not to use mysql_* queries any more, using prepared sql statements is injection safe. More info http://stackoverflow.com/questions/60174/how-to-prevent-sql-injection-in-php PHP.net deprecation: https://wiki.php.net/rfc/mysql_deprecation
×
×
  • 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.