You are here: Re: Php (4.4) configured to open secure URLs (https)? « PHP Programming Language « IT news, forums, messages
Re: Php (4.4) configured to open secure URLs (https)?

Posted by Mike Willbanks on 10/13/05 05:45

Chuck,

> I have found nothing about setting environment variables. ?? Do I need
> to do something more in php (php.ini) or in Apache httpd.conf?
>


This is what is contained in the readme-ssl.txt file (php4):

To use the CSR and key generation functions from PHP, you will need to
install
an openssl.cnf file. We have included a sample file that can be used
for this
purpose in this folder alongside this readme file.

The default path for the openssl.cnf file is determined as follows:

OPENSSL_CONF environmental variable, if set, is assumed to hold the
path to the file.

If it is not set, SSLEAY_CONF environmental variable is checked next.
If neither are set, PHP will look in the default certificate area that
was set
at the time that the SSL DLLs were compiled. This is typically
"C:\usr\local\ssl\openssl.cnf".

If the default path is not suitable for your system, you can set the
OPENSSL_CONF variable; under windows 95 and 98 you can set this variable in
your autoexec.bat (or the batch file that starts your webserver/PHP).
Under NT, 2000 and XP you can set environmental variables using "My
Computer"
properties.

If setting an environmental var is not suitable, and you don't want to
install
the config file at the default location, you can override the default path
using code like this:

$configargs = array(
"config" => "path/to/openssl.cnf"
);

$pkey = openssl_pkey_new($config);
$csr = openssl_csr_new($dn, $pkey, $config);

Please consult the online manual for more information about these functions.

NOTE!

Windows Explorer gives special meaning to files with a .cnf extension.
This typically means that editing the file from the explorer (by double or
right-clicking) will be difficult or impossible depending on your setup.
It is often easier to open the file from within the editor.
You can avoid this issue by naming the file something else (you might
need to
rename the file using a DOS box) and then setting up an environmental
variable
as described above.


--
Mike Willbanks
Zend Certified Engineer
http://www.digitalstruct.com

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация