Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have Windows Server 2003 R2 with Apache 2.2.4 and PHP 5.2.6. I want to access pages over https (SSL).

And i get this error (Zend Framework GData):

Unable to find the socket transport "ssl" - enter code here did you forget to enable it when you configured PHP?

So what i did. I went to php.ini and i uncomented the line

extension=php_openssl.dll

I also installed Win32 OpenSSL.

But nothing works. What sould i do?

share|improve this question

2 Answers 2

Ok, there are a number of steps to check here:

  • Firstly, create a phpinfo() file to check that PHP's SSL extension is actually enabled, I know you said you have enabled it, but check that you have done so in the right PHP.ini file, and that the change is actually taking effect.
  • Ensure that libeay32.dll and ssleay32.dll are somewhere in the Windows PATH
  • Ensure that php_openssl.dll is in your extensions directory
  • Check that your phpinfo() file is showing the correct extension directory.
share|improve this answer
    
I did everything you suggested but still no Open SSL in phpinfo(). If I do "php -m" i get openssl listed. Is there anything else that I can do? –  Oto Brglez Jan 28 '10 at 8:08

These are the relevant parts of the tutorial on: http://fash7y.wordpress.com/2011/12/0/solved-how-to-set-up-https-with-openssl-in-wamp/

to continue working using http://openssl-for-windows.googlecode.com/files/openssl-0.9.8k_WIN32.zip.

Okay, let’s do the next steps. ;)

  1. Create SSL Certificate and Key

a. Ekstrak OpenSSL to your directory, and copy this file:

openssl.cnf to .\Apache2.2.11\conf\
from folder bin, copy all files to .\Apache2.2.11\bin\

// Replace the old files! :D

b. Open DOS command window by typing CMD in your search menu.

c. Type this cd C:\wamp\bin\apache\apache2.2.11\bin

d. Create a server private key with 1024 bits encryption by entering this command: openssl genrsa -des3 -out server.key 1024

// It’ll ask you a pass phrase (password), just enter any password you like .

e. Remove the pass phrase from the RSA private key (while keeping a backup copy of the original file). Enter this:

copy server.key server.key.org

openssl rsa -in server.key.org -out server.key

// It’ll ask you the pass phrase, just type it.

f. Create a self-signed Certificate (X509 structure) with the RSA key you just created. Enter this: openssl req -new -x509 -nodes -sha1 -days 365 -key server.key -out server.crt -config C:\wamp\bin\apache\apache2.2.11\conf\openssl.cnf

  1. Copy the server.key and server.crt files

a. In the Apache2.2.11\conf\, create two folders named as ssl.key and ssl.crt

b. Copy the server.key file to ssl.key folder and server.crt file to ssl.crt folder

  1. Edit the httpd.conf file, php.ini, and httpd_ssl.conf

a. Open httpd.conf file

b. Remove the comment ‘#’ at the line which says: LoadModule ssl_module modules/mod_ssl.so

c. Remove the comment ‘#’ at the line which says: Include conf/extra/httpd-ssl.conf

d. Open this file-> C:\wamp\bin\php\php5.3.8\php.ini

e. Remove the comment ‘;’ at the line which says: extension=php_openssl.dll

f. Open this file -> C:\wamp\bin\apache\Apache2.2.11\conf\extra\httpd_ssl.conf

g. Find the line which says: .

h. Right after it, change the line which says:

Change the line “DocumentRoot …” to DocumentRoot “C:/wamp/www/”
Change the line “ServerName…” to ServerName localhost:443
Change the line “ErrorLog….” to Errorlog “C:/wamp/bin/apache/Apache2.2.11/logs/sslerror.log”
Change the line “TransferLog ….” to TransferLog “C:/wamp/bin/apache/Apache2.2.11/logs/sslaccess.log”
Change the line “SSLCertificateFile ….” to SSLCertificateFile “C:/wamp/bin/apache/Apache2.2.11/conf/ssl.crt/server.crt”
Change the line “SSLCertificateKeyFile ….” to SSLCertificateKeyFile “C:/wamp/bin/apache/Apache2.2.11/conf/ssl.key/server.key”
Change the line which says <Directory “C:/Program Files/Apache Software Foundation/Apache2.2/cgi-bin”> or something like that (sorry I’m forget what its default dir :p) to <Directory “C:/wamp/www/”>
Add the following lines inside those <Directory … >…</Directory> tags:
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
Change the line “CustomLog…” to CustomLog “C:/wamp/bin/apache/Apache2.2.11/logs/ssl_request.log”
  1. Make sure it works!

a. In the previous DOS Command windows, enter httpd -t . If it displays Sysntax is OK, then go to next step. If not, then correct the wrong syntax and redo step 3.

b. Restart the Apache server. If restart is successful, then open the browser and enter http.s localhost/

How it goes? Works, eh? Congratz! :D

  1. Try this: htt..localhost
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.