michaeldst Posted December 9, 2014 Report Posted December 9, 2014 im receiving error:Call to undefined function crypt_random() on line 317 in /home/snsolutions/public_html/billing/app/controllers/install.php When i try to install Quote
0 Paul Posted December 9, 2014 Report Posted December 9, 2014 crypt_random() is part of the phpseclib library included with Blesta. Please ensure that /vendors/phpseclib/ exists, including all the files from the blesta-3.3.2.zip distribution. If all the files are there, and you have mod_security or any other security extensions, check that they are not interfering. Quote
0 michaeldst Posted December 9, 2014 Author Report Posted December 9, 2014 fixed that, now when i run installation, it brings me to a blank page. I then tried going to the blesta home page, it took me to admin setup, i filled out the info, clicked submit, and again a blank page Quote
0 Paul Posted December 9, 2014 Report Posted December 9, 2014 There must be an error. Is it possible you may be missing other files as well? If so, you may try re-uploading everything. You could also try running the CLI installer if you have SSH access. cd /home/your/blesta/directory/ php ./index.php install If there are errors, they will likely be output to your shell. Quote
0 michaeldst Posted December 9, 2014 Author Report Posted December 9, 2014 no errors installed fine but the cli installer restarted without returning back to the command line. also when i went to configure, i filled out all the details (first,lastname) clicked submit and blank page Quote
0 Paul Posted December 9, 2014 Report Posted December 9, 2014 If the CLI got you through it, and then you went in your browser to create a user and enter your key you have a config file. What you can do is enable error reporting in your config file. Open /config/blesta.php and change Configure::errorReporting(0); to Configure::errorReporting(-1); Then, see if it outputs any errors. Quote
0 michaeldst Posted December 9, 2014 Author Report Posted December 9, 2014 Warning: Uncaught exception 'UnknownException' with message 'require_once(Math/BigInteger.php): failed to open stream: No such file or directory' in /home/snsolutions/public_html/billing/vendors/phpseclib/Crypt/RSA.php:76 Stack trace: #0 /home/snsolutions/public_html/billing/vendors/phpseclib/Crypt/RSA.php(76): UnknownException::setErrorHandler(2, 'require_once(Ma...', '/home/snsolutio...', 76, Array) #1 /home/snsolutions/public_html/billing/vendors/phpseclib/Crypt/RSA.php(76): require_once() #2 /home/snsolutions/public_html/billing/app/models/license_manager.php(530): include_once('/home/snsolutio...') #3 /home/snsolutions/public_html/billing/app/models/license_manager.php(499): LicenseManager->loadLib('Crypt', 'RSA') #4 /home/snsolutions/public_html/billing/app/models/license_manager.php(408): LicenseManager->loadCrypto(Array) #5 /home/snsolutions/public_html/billing/app/models/license_manager.php(214): LicenseManager->signRsa('PLdXlfijsuMy0D/...', '-----BEGIN PUBL...', 'alkc21)@(#*&173...') #6 /home/snsolutions/pub in /home/snsolutions/public_html/billing/vendors/phpseclib/Crypt/RSA.php on line 76Fatal error: main(): Failed opening required 'Math/BigInteger.php' (include_path='.:/usr/lib/php:/usr/local/lib/php:/home/snsolutions/php') in/home/snsolutions/public_html/billing/vendors/phpseclib/Crypt/RSA.php on line 76Fatal error: Uncaught exception 'UnknownException' with message 'Invalid callback Session::sessionWrite, cannot access private method Session::sessionWrite()' in Unknown:0 Stack trace: #0 [internal function]: UnknownException::setErrorHandler(2, 'Invalid callbac...', 'Unknown', 0, Array) #1 {main} thrown in Unknown on line 0Warning: Invalid callback Session::sessionClose, cannot access private method Session::sessionClose() in Unknown on line 0 Quote
0 Paul Posted December 9, 2014 Report Posted December 9, 2014 Sounds like you're missing /vendors/phpseclib/Math/BigInteger.php. Can you confirm that all the files in the /vendors/phpseclib/ directory in the zip file exist on your server? Quote
0 michaeldst Posted December 9, 2014 Author Report Posted December 9, 2014 I can confirm that it is in the web directory Quote
0 michaeldst Posted December 9, 2014 Author Report Posted December 9, 2014 fyi im running php 5.5 and have applied the hotfix Quote
0 Michael Posted December 9, 2014 Report Posted December 9, 2014 Have you got the "recommended" requirements for Blesta? http://docs.blesta.com/display/user/Requirements the first thing I would think of would be something down mcrypt or mhash issues :s. Quote
0 michaeldst Posted December 9, 2014 Author Report Posted December 9, 2014 recomended requirements PASS Quote
0 Paul Posted December 9, 2014 Report Posted December 9, 2014 What OS are you running? Any control panel? Quote
0 Paul Posted December 9, 2014 Report Posted December 9, 2014 Do you have SSH? Can you upload the zip, and unpack it there? Something wonky is going on and I'm not sure what. The error is straight forward, but if the file exists then I'm not sure what to make of it. Is it CloudLinux? Do you have a PHP selector in cPanel? If so, might be worthwhile to try PHP 5.4 without the hotfix, see if it makes any difference. The alternative, if you want, is to send me SSH/SFTP access (email sales) and I'll poke around with it and see if I can figure it out. If you've created a staff user already, I'll need that too. Quote
0 michaeldst Posted December 9, 2014 Author Report Posted December 9, 2014 email sent, thank you paul! Quote
0 michaeldst Posted December 9, 2014 Author Report Posted December 9, 2014 and no to cloud linux Quote
0 Alex Vojacek Posted January 5, 2015 Report Posted January 5, 2015 Nice, I am having the exact same issue and since you decided to just NOT put the solution I am strugling with it since 2 days ago. Can you please provide a solution to this? Quote
0 Max Posted January 5, 2015 Report Posted January 5, 2015 Fatal error: main(): Failed opening required 'Math/BigInteger.php' (include_path='.:/usr/lib/php:/usr/local/lib/php:/home/snsolutions/php') in/home/snsolutions/public_html/billing/vendors/phpseclib/Crypt/RSA.php on line 76 Blesta attempts to add the phpseclib folder to the include_path by calling set_include_path(), but looking at the include_path in your stack trace failed to do so. For testing purposes, try modifying in app/models/license_manager.php // Set the include path to include this vendor library set_include_path(get_include_path() . PATH_SEPARATOR . $this->path_to_phpseclib); to: // Set the include path to include this vendor library if ( ! set_include_path(get_include_path() . PATH_SEPARATOR . $this->path_to_phpseclib) ) { die("Error! My webserver configuration prevents me from changing the include_path!"); } If it prints out that error, it conforms my theory. In that case, go through your Apache configuration files looking for a line starting with "php_admin_value include_path" and change it to "php_value include_path" "php_admin_value" means: set this configuration option, and as a security restriction prevent code from overriding it at runtime. "php_value" does allow code to change the value set. Michael 1 Quote
0 Alex Vojacek Posted January 5, 2015 Report Posted January 5, 2015 Could sombody PLEASE HELP ME ? I'm stuck without blesta, i can't install it, this is ludicrous, I'm doing everything by the book, there is no way blesta installs and i was able to install it perfectly previously, i don't know if it's the installer or Centos just broke something in the last updates. http://www.blesta.com/forums/index.php?/topic/3923-critical-keep-getting-call-to-undefined-function-crypt-random-when-trying-to-install-blesta/ I really need help, i'm without my billing software and my clients can't use it, this is seriously damaging my bussiness. Quote
0 Michael Posted January 5, 2015 Report Posted January 5, 2015 Could sombody PLEASE HELP ME ? I'm stuck without blesta, i can't install it, this is ludicrous, I'm doing everything by the book, there is no way blesta installs and i was able to install it perfectly previously, i don't know if it's the installer or Centos just broke something in the last updates. http://www.blesta.com/forums/index.php?/topic/3923-critical-keep-getting-call-to-undefined-function-crypt-random-when-trying-to-install-blesta/ I really need help, i'm without my billing software and my clients can't use it, this is seriously damaging my bussiness. Have you even tried the above post? The one above yours...? Quote
0 Alex Vojacek Posted January 5, 2015 Report Posted January 5, 2015 Yes, but no matter what directory i put into, it still wont work, i get stuck at the last phase of the installation. Quote
0 Michael Posted January 5, 2015 Report Posted January 5, 2015 Yes, but no matter what directory i put into, it still wont work, i get stuck at the last phase of the installation. Max never mentioned a directory, he said edit a link and check your Apache configuration... geez! Quote
0 Max Posted January 5, 2015 Report Posted January 5, 2015 Yes, but no matter what directory i put into, it still wont work, i get stuck at the last phase of the installation. You don't need to put in any directory, just double check the value can be overriden by code. If you're using nginx instead of Apache, check your php-fpm.conf. Same concept, php_admin_value cannot be overriden, php_value can. Michael 1 Quote
0 Alex Vojacek Posted January 5, 2015 Report Posted January 5, 2015 Putting the value in php-fpm.d/blesta.conf didn't work, no matter what i do. Switching to /etc/php.ini I put this: include_path = /usr/share/php That did the trick. This should be much better documented since it's not easy to find and the installation does not tell anything about this problem. It shouldn't be hard to display an error that says "please add include_path to your php.ini". This should save days of frustration to people experiencing this problem, like me. Quote
0 Michael Posted January 5, 2015 Report Posted January 5, 2015 Putting the value in php-fpm.d/blesta.conf didn't work, no matter what i do. Switching to /etc/php.ini I put this: include_path = /usr/share/php That did the trick. This should be much better documented since it's not easy to find and the installation does not tell anything about this problem. It shouldn't be hard to display an error that says "please add include_path to your php.ini". This should save days of frustration to people experiencing this problem, like me. Maybe Blesta should run the server for you? bake a cake? Blesta isn't a genius sadly. Quote
Question
michaeldst
im receiving error:
Call to undefined function crypt_random() on line 317 in /home/snsolutions/public_html/billing/app/controllers/install.php
When i try to install
30 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.