Jump to content

sharpnova

New Members
  • Posts

    9
  • Joined

  • Last visited

    Never

Everything posted by sharpnova

  1. Well to update: it works fine when I specify a range: rand(0,1); it works fine when i use mt_rand(); i'd still like to know why it is alternating even and odd numbers when i don't specify a range though.
  2. It works perfectly fine when modding with any number other than 2 (or 4 sometimes) so I really doubted I needed to seed anything. But yes I tried it with seeding it first and the problem was still there.
  3. I did what you said and that is uploaded and you can see it at http://www.sharpnova.com/random.php as you can see it's generating different numbers everytime but always in the pattern of even, odd, even, odd, even, odd, even, odd, even, odd This is a very strange problem.
  4. Windows XP media center edition. (yes not the most ideal for php hosting) It works fine if I mod rand() with anything other than 2 or 4. But for 2 and 4 it just doesn't seem to work. I can't find anything on the web and no one I've talked to has any clue. But you can see for yourself: http://www.sharpnova.com/random.php The contents of the php file that link points to are: <?php for ($i=0; $i<10; $i++) print rand()%2; ?> It may also help mentioning that I'm currently using the PHP that comes bundled with whatever is the latest version of XAMPP
  5. I'm having a very strange and specific problem with rand(). for example: for ($i=0; $i<10; $i++) echo rand()%3; works just fine. shows 10 integers from 0 to 2 and they all change randomly everytime i refresh the page in fact it works for most #'s but for 2 it doesn't for ($i=0; $i<10; $i++) echo rand()%2; I ALWAYS get 0101010101. Always. No randomness no repitition. Nothing. Occasionally (when I change the value to a working # then change it back) I will get the following behavior: refreshing the page will (randomly) give either 0101010101 or 1010101010 Which of the two is given will be random but it never deviates from those two results. Also it's unpredictable when it will even work this much. Sometimes it will just refresh and give 0101010101 forever. I know it isn't a browser issue because for other modulus values, it works fine. update: now it's messing up with 4 as well. 4 alternates (NOT randomly) between 2301230123 and 0123012301.
  6. If anyone else is having this problem, there are some of the inter-versions of PHP that don't work with phpmyadmin. I didn't even have an ext directory, nor was there even a php_mysql.dll on my hard drive. My advice (and how I solved this problem): go XAMPP. It makes life easier in a world where apache and php become needlessly hard to use.
  7. Yep. I restart apache with every change i make.
  8. I am running an Apache server on windows and php 5.2.5 and MySQL 5 are working fine. I tried installing phpmyadmin. My config.inc.php file looks like this: <?php /* * Generated configuration file * Generated by: phpMyAdmin 2.11.7-rc1 setup script by Michal Čihař <michal@cihar.com> * Version: $Id: setup.php 10748 2007-10-10 07:30:59Z cybot_tm $ * Date: Tue, 17 Jun 2008 01:38:53 GMT */ /* Servers configuration */ $i = 0; /* Server localhost (http) [1] */ $i++; $cfg['PmaAbsoluteUri'] = 'http://www.sharpnova.com/phpmyadmin/'; $cfg['Servers'][$i]['host'] = 'http://sharpnova.com'; $cfg['Servers'][$i]['extension'] = 'mysql'; $cfg['Servers'][$i]['connect_type'] = 'tcp'; $cfg['Servers'][$i]['compress'] = false; $cfg['Servers'][$i]['auth_type'] = 'http'; ?> When I try to load localhost/phpmyadmin/index.php i get the following error: "Cannot load mysql extension. Please check your PHP configuration." i have gone into c:\program files\php and edited the php.ini and removed the semicolon from extension=msql.dll But I still get the same error.. I'm completely clueless at this point.
×
×
  • 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.