Jump to content

Using OpenSSL


ankit1986

Recommended Posts

Hi

 

I got a SSL certificate form Verisign. I have installed it also. It's displaying properly in the browser.

 

I want to code in PHP using OPENSSL ... i am running on IIS v5 on localhost .... but when I use any function of OpenSSL library, it gives an error ....like when I use openssl_get_publickey() ... it says "Fatal error: Call to undefined function: openssl_get_publickey() in ******.php on line 5"

 

I am using PHP 4.3.10

Link to comment
Share on other sites

No no no. OpenSSL is an application for doing things like generating key files and CSR files. This has absolutely nothing to do with php. If you want to use funtions such as openssl_get_publickey() then you must compile php with the correct modules. You will see what modules are loaded by creating a phpinfo() file.

 

Here:

http://uk.php.net/manual/en/openssl.installation.php

Link to comment
Share on other sites

I am sorry . I am an ameteur in this field :(

 

I'll tell u the exact procedure I did :

1) I have PHP v4.3.10 running ... on WIndows

2) I dont where are all the PHP files stored ... there's a PHP folder in C:\PHP ...... but it doesn't have those dev or ext folders ...

3) extension=php_openssl line is commented in my php.ini

4) I downloaded OpenSSL binaries from http://www.slproweb.com/products/Win32OpenSSL.html

 

5) Installed it on default seetings

6) It created one folder C:\OpenSSL which has some DLLs

7) I think we are interested in libeay32.dll & openssl.cnf

 

But still when I run my script, it says Fatal error: Call to undefined function: openssl_get_publickey()

 

I know I am missing a few things in between but i am not able to figure it out by reading the documentation given on php.net

 

How shud I go about doing things now ??

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.