Jump to content

oni-kun

Members
  • Posts

    1,984
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by oni-kun

  1. Error reporting is most likely set to off on your server thus the blank page. Add the following lines to the top of your code (In the code file you provided): You should always check the support forums and documentation of the third part script.
  2. You may want to use weighted results, For example: function weighted_random($values, $weights){ $count = count($values); $i = 0; $n = 0; $num = mt_rand(0, array_sum($weights)); while($i < $count){ $n += $weights[$i]; if($n >= $num){ break; } $i++; } return $values[$i]; } There are more algorithms of which are fairly simple to implement if need be, in this example you can use any positive integer as a weight (As an array).
  3. Did you restart the browser? Configuration options will not propagate until you do so, Your caching should be disabled.
  4. I assume you've not error reporting on. ini_set('display_errors',1); error_reporting(E_ALL); This should tell you why the page is coming up blank (Not showing). Also you should put or die() statements on your SQL queries for debugging purposes: $result=mysql_query($sql) or die(mysql_error()); Typecasting will make '4' and 4 the equivalent, It does not matter.
  5. // Start looping table row You start the loop but don't end it as mentioned. Please use full delimiters, IE <?php as short tags are almost never compatible in practise. You're making the server guess if it's XML, ASP etc.
  6. Try this: Sorry, It's late. $result = mysql_query("SELECT name FROM colours"); while ($row = mysql_fetch_array($result)) { echo "{$row['id']} = {$row['colour']} <br/>"; }
  7. Yes, it is possible but this has nothing to do with PHP. Post it in the Javascript section, PHP is a server side language.
  8. Sorry, Try this: $row = mysql_fetch_assoc(mysql_query("SELECT * FROM colours")); for ($i=0; $i<=count($row); $i++) { print "Number $i = {$row[$i]}"; } I'm not sure what you're wanting to do though, list all colours fields or only fields which contain those colours?
  9. How is an auxillery IRC service a site with high traffic? The site seems to have been fixed, and not the IRC? I wonder why the option of that was taken upon.
  10. 137dcec44002170db2d2dcd9c70dbebf is magnus, Do you see how it is truncating the hash sum?
  11. It's fairly straightforward, $colours = array ("Black", "White", "Green", "Purple"); $ids = join(',',$colors); $sql = "SELECT * FROM colors WHERE id IN ($ids)";
  12. It's not his job to be at the panel 24/7 and make sure it is running fine, I'm not aware of the owner's personality or agenda but it doesn't seem amazing to have a week's leeway on getting it up and running, I've personally experienced some fairly large (community based or commercially) sites down for atleast that amount of time to get up to do the job and be able to fix it.
  13. There seems to be nothing wrong with that line. The line before those are most likely the problem, in being a missing semicolon ( ; )
  14. ./configure && make && make install vi /usr/local/etc/sphinx.conf http://www.sphinxsearch.com/docs/current.html There ye go, Why are you so hard on yourself?
  15. You may be able to use filesmatch: <FilesMatch ^(these|file|names|are|excluded)\.php$> #Disable prepend for these scripts </FilesMatch> I'm too tired to figure anything else, but this isn't really PHP rather a .htaccess question.
  16. Yes, it'd help if you gave us code to help you on, Not just a concept.
  17. Why not use uniqid or something even more random than yours? Guarenteed on a 100,000 record basis there will be a duplicate with your code. Your random generation has a salt of redundancy for collision prevention. function randomPrefix($length) { $random = substr(md5(mt_rand(), false), 0, $length ); }
  18. You mightn't care, but other people here would like it back up. Just for a sense of being back to normal, if nothing more. It's fully understandable it may take more than just a day to get the server back up, All in all it is his own. Within a week or two is perfectly acceptable, I doubt he doesn't care about it, Unless it's a circumstantial problem with money and he's hardly able to continue it. It's a unique service in itself. Daniel's done all there is need be, so we should just respect the owner's ability and wait.
  19. oni-kun

    Hello

    Glad you can take a part of it. Welcome.
  20. oni-kun

    Hey all

    Hi. Welcome to the forums.
×
×
  • 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.