majbom Posted October 23, 2017 Share Posted October 23, 2017 Hi, I've just installed Prestashop 1.7.2.3. on my nginx/php5-fpm server. Installation worked fine, but now I'm getting this error: "Your system does not have a secure random number generator.". I've done some searching and I tried to update to the newest version of random_compat (http://disq.us/p/1dhwzje), but the problem remains. My php version is 5.5.9 and meets all the requirements. Link to comment Share on other sites More sharing options...
bellini13 Posted October 23, 2017 Share Posted October 23, 2017 The random_bytes function that Prestashop is trying to use, only exists in PHP 7 http://php.net/manual/en/function.random-bytes.php Link to comment Share on other sites More sharing options...
majbom Posted October 24, 2017 Author Share Posted October 24, 2017 Yeah, I know that, but I don't understand why it is so when the official requirements says minimum PHP 5.4 (https://www.prestashop.com/en/system-requirements). Link to comment Share on other sites More sharing options...
bellini13 Posted October 24, 2017 Share Posted October 24, 2017 If you know that, then use PHP 7 and move on. Other I would suggest you create a forge ticket so Prestashop development can fix their issue. They do not browse the forums Link to comment Share on other sites More sharing options...
majbom Posted October 24, 2017 Author Share Posted October 24, 2017 Well, I wouldn't be asking if I could just use PHP 7. I'll try the ticket. Thanks! Link to comment Share on other sites More sharing options...
selectshop.at Posted October 24, 2017 Share Posted October 24, 2017 I'm using php 5.6.30 (nginx proxied and php-fpm) and Prestashop 1.7.0 to latest 1.7.2.4 on same server, and this error does not appear. Give a try. If error still available, than it must be a problem with configuration of your apache or ngnix. Link to comment Share on other sites More sharing options...
selectshop.at Posted October 24, 2017 Share Posted October 24, 2017 BTW which OS are you using ? Debian, Ubuntu or which one ? And version ? Link to comment Share on other sites More sharing options...
majbom Posted October 24, 2017 Author Share Posted October 24, 2017 28 minutes ago, selectshop.at said: I'm using php 5.6.30 (nginx proxied and php-fpm) and Prestashop 1.7.0 to latest 1.7.2.4 on same server, and this error does not appear. Give a try. If error still available, than it must be a problem with configuration of your apache or ngnix. I'm not quite sure what you think I should give a try? The server is running Ubuntu 14.04 Link to comment Share on other sites More sharing options...
selectshop.at Posted October 24, 2017 Share Posted October 24, 2017 29 minutes ago, majbom said: I'm not quite sure what you think I should give a try? php 5.6.30 Link to comment Share on other sites More sharing options...
selectshop.at Posted October 24, 2017 Share Posted October 24, 2017 On 23.10.2017 at 1:56 PM, bellini13 said: http://php.net/manual/en/function.random-bytes.php If you read this link, you will see that there is also an implementation for older php versions available: Note: Although this function was added to PHP in PHP 7.0, a » userland implementation is available for PHP 5.2 to 5.6, inclusive. Link to comment Share on other sites More sharing options...
majbom Posted October 24, 2017 Share Posted October 24, 2017 I've just upgraded to PHP 5.6.31, but the admin-page is still showing HTTP 500 error, but the address is now "/admin/index.php?controller=AdminLogin&token=xxx". No error is logged. The front-end is working now though. When I try to run a script with just a simple call to random_bytes(), it says that the function is undefined. Which kernel-version does your OS run on @selectshop.at ? I'll try to delete all files and install PS again. Link to comment Share on other sites More sharing options...
majbom Posted October 24, 2017 Share Posted October 24, 2017 Okay, now I have my old account. Sorry, but I have totally forgotten about this old account. Apparently doubles are allowed Link to comment Share on other sites More sharing options...
majbom Posted October 24, 2017 Share Posted October 24, 2017 After reinstalling PS, it seems to work. However, I experience some weird problems. If I click the "Catalog" or "Modules" in the left menu in back-end, it sends me to the shop frontpage Link to comment Share on other sites More sharing options...
majbom Posted October 24, 2017 Share Posted October 24, 2017 Maybe I've found something regarding the "Catalog" and "Modules" links. The "Catalog"-link is /admin549jdlq8c/index.php/product/catalog?_token=xxx, but all other links are something like /admin.php?controller=Admin... I have enabled debug-mode, and when I click the "Catalog"-link, I get this: Quote [Debug] This page has moved Please use the following URL instead: /index.php?_token=xxx Link to comment Share on other sites More sharing options...
selectshop.at Posted October 25, 2017 Share Posted October 25, 2017 You cleaned server and browser cache ? Link to comment Share on other sites More sharing options...
majbom Posted October 26, 2017 Author Share Posted October 26, 2017 I got it to work - I needed some settings ind my nginx-config. Weird system, that some of it works without these settings Link to comment Share on other sites More sharing options...
selectshop.at Posted October 26, 2017 Share Posted October 26, 2017 This was my first thought.... Link to comment Share on other sites More sharing options...
usefi Posted October 28, 2017 Share Posted October 28, 2017 (edited) thanks used resolved my site: www.matlabi.ir Edited October 28, 2017 by usefi (see edit history) Link to comment Share on other sites More sharing options...
selectshop.at Posted October 29, 2017 Share Posted October 29, 2017 Seems that some moderator has merged other topics to here, with other problems. I'm closing this, cause it is now a mix of several different things, furthermore it is already solved. Please, if you are having problems with PS 1.7.2.3. add a new thread to the forum. Link to comment Share on other sites More sharing options...
Recommended Posts