Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9202661
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T23:18:32+00:00 2026-06-17T23:18:32+00:00

I have found an script that will randomly generate numbers/letters for an X amount.

  • 0

I have found an script that will randomly generate numbers/letters for an X amount.
It works fine on my localhost however when I upload the script to my VPS it does not work.

I get following error:

Fatal error:  Call to undefined function  openssl_random_pseudo_bytes()

That would be this part of code:

function crypto_rand_secure($min, $max) {
        $range = $max - $min;
        if ($range < 0) return $min; // not so random...
        $log = log($range, 2);
        $bytes = (int) ($log / 8) + 1; // length in bytes
        $bits = (int) $log + 1; // length in bits
        $filter = (int) (1 << $bits) - 1; // set all lower bits to 1
        do {
            $rnd = hexdec(bin2hex(openssl_random_pseudo_bytes($bytes)));
            $rnd = $rnd & $filter; // discard irrelevant bits
        } while ($rnd >= $range);
        return $min + $rnd;
}

I have found an post on stacksoverflow with the same issue. However it required an module installed. I am not sure how do I do this, but i have found this on my WHM of VPS.

Home »Software »Module Installers

When I choose Perl Module and search for openssl, I get many results.
I have installed one of these, and I had installed one by default.

Here are installed openssl modules:

Crypt::OpenSSL::RSA

Crypt::OpenSSL::Random

Still… I get the same error on my website.
Any solution? Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T23:18:33+00:00Added an answer on June 17, 2026 at 11:18 pm

    The OpenSSL Perl modules you found are a red herring. They have no effect whatsoever on PHP. (PHP and Perl are two entirely separate programming languages.)

    What you need to install is the openssl PHP module. I don’t recall exactly whether cPanel has an option to rebuild PHP, but if I’m right and it does, you’ll need to go through that process and enable OpenSSL there.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a script that will generate an image then upload it in a
I have a PHP script that will generate a report using PHPExcel from data
I have just found a script we are using which has a sub that
I am looking for some help. I have found this script that sort of
I have a shell script that will let me access global variables inside the
I have the included grails script that I found in some random place on
I hope someone can help, I have made a script that masks images... however
I have been tasked to write a script that will enable tcp and named
Good afternoon, I wish to have a script that will look for all files
I found this script on pastebin that is an IRC bot that will find

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.