0

I tried to install symphony on my localhost xampp. My Php version is: 7.0.5. After I filled all of the inputs (db connection, username password, etc) I got this error message:

    Symphony Warning: mt_srand() expects parameter 1 to be integer, float given
    95 * @return string
    96 * a hexadecimal string
    97 */
    98 public static function generateSalt($length)
    99 {
    100 mt_srand(microtime(true)*100000 + memory_get_usage(true));
    101 return substr(sha1(uniqid(mt_rand(), true)), 0, $length);
    102 }
    103 } 

How can move forward this this ? I am newbie and this is the first time when I tried to install Symphony. Thx in advance.

UPDATE enter image description here

Jaxian
  • 1,146
  • 7
  • 14
Attila Naghi
  • 2,535
  • 6
  • 37
  • 59
  • Which version of Symfony you're using? – Alok Patel Jun 20 '16 at 13:41
  • That abomination of a code definitely isn't a part of Symfony.. – Shira Jun 20 '16 at 13:45
  • I downloaded from here: http://www.getsymphony.com/learn/tutorials/view/install-symphony/3/#pagehead – Attila Naghi Jun 20 '16 at 13:45
  • Use the official means to create a Symfony project instead: http://symfony.com/doc/current/book/installation.html EDIT: Wait, that's *Symphony*, not *Symfony*. Never head of the first one. Which one are you trying to install? – Shira Jun 20 '16 at 13:51

1 Answers1

1

This has been fixed in the next version (by using the intval function), which is not yet released.

Symphony CMS 2.6.7 doesn't support PHP 7, but 2.7 will have at least some PHP 7-related issues fixed. So it's probably best for you to wait for the next version as even if you fixed this particular issue in your 2.6.7 installation you'd very likely come up against other PHP 7-related issues after installation.

David Oliver
  • 2,424
  • 1
  • 24
  • 37