openssl extension not loading (need to open https stream) 
March 12th, 2008, 05:35 AM
| | | openssl extension not loading (need to open https stream)
I run Apache 2.0.55, and Php (both 4.4.1 and 5.2.5) on my home PC
(Windows XP). One of the scripts that I run daily needs to access a
secure URL ( https://..............). When I am running Php4, it can
open the file.
However, when I run Php5 I (now) get this error message:
"Unable to find the wrapper "https" - did you forget to enable it when
you configured PHP?"
This is new. Last time I messed with this, I merely got:
"failed to open stream: Invalid argument"
I can see in phpinfo that the only registered streams are:
php, file, data, http, ftp, compress.zlib
I need https and ftps to be in that list, too.
Today I made the php.ini files for Php4 and Php5 nearly identical (the
only difference being the locations of some directories (extensions and
tmp). I downloaded the latest Windows binary from Php.net (5.2.5) and
installed (unzipped) it on my computer and am testing with that. I have
libeay32.dll and ssleay32.dll installed in the Windows System32 folder
(Where they need to be - in the executable Path. That's why Php4
works). I have also enabled the openssl extension and made sure it is
in the extension folder ("php5.2.5/ext").
When I run a script with
echo '<pre>';
print_r(stream_get_wrappers());
echo '</pre>';
echo '<pre>';
print_r(get_loaded_extensions());
echo '</pre>';
I get:
Array
(
[0] =php
[1] =file
[2] =data
[3] =http
[4] =ftp
[5] =compress.zlib
)
Array
(
[0] =bcmath
[1] =calendar
[2] =com_dotnet
[3] =ctype
[4] =session
[5] =filter
[6] =ftp
[7] =hash
[8] =iconv
[9] =json
[10] =odbc
[11] =pcre
[12] =Reflection
[13] =date
[14] =libxml
[15] =standard
[16] =tokenizer
[17] =zlib
[18] =SimpleXML
[19] =dom
[20] =SPL
[21] =wddx
[22] =xml
[23] =xmlreader
[24] =xmlwriter
[25] =apache2handler
[26] =curl
[27] =mbstring
[28] =exif
[29] =gd
[30] =mhash
[31] =printer
No openssl. (??) I was getting an error logged about the
php_printer.dll not being found, but after I put it in the extension
folder, it then showed up in the above list. And now the error log is
empty.
Another new thing I noticed today is that If I run Php.exe (from the
root folder of php5.2.5) and execute the above file, I get this
(abbreviated):
....
[25] =curl
[26] =mbstring
[27] =exif
[28] =gd
[29] =mhash
[30] =openssl
[31] =printer
So run from the command line, I can see that openssl is loaded ... and,
in fact, I can execute my script that access the secure URL (https:)
successfully.
Executing "php -i" even shows me:
Registered PHP Streams =php, file, data, http, ftp, compress.zlib,
https, ftps
So now I seem to be getting somewhere. What I don't understand is why
the apache module (which is how I always run Php - php5apache2.dll)
does not load the openssl extension. It doesn't even give me an error
message about it. It simply is not loaded. Why does the command line
load the extension, but not the Apache module? (The command line and
module use the same php.ini file. That's how they both loaded the
printer extension).
I would really like to move on and put Php4 behind me, but this
roadblock has been in my way for over a year now.
Any ideas what's wrong, or what I need to try? (I believe the problem
is simply that the openssl extension does not load successfully ... but
without errors?)
Thanks in Advance for any help.
--
*****************************
Chuck Anderson • Boulder, CO http://www.CycleTourist.com
Nothing he's got he really needs
Twenty first century schizoid man.
*********************************** | 
March 12th, 2008, 11:15 AM
| | | Re: openssl extension not loading (need to open https stream)
if ur pb can't be solved by changing php.ini
take a look at the "httpd.conf" file.
Some extensions may appear as activated in phpinfo() or in command line, but
not being really started.
You can also take a look at apache.logs if you find it... | 
March 12th, 2008, 08:55 PM
| | | Re: openssl extension not loading (need to open https stream)
Hello,
same proble today! Solved!
Look to your error.txt file in log directory if your Apache.
Probably there would be something like:
Unable to load php_openssl.dll...
So extension for ssl is not loaded.
According this http://php.net/manual/en/ref.openssl.php#79441 I found
libeay32.dll and ssleay32.dll in my Apache2/bin folder.
When I replaced them with those files bundled with php it starts to
work!
Enjoy!
VS
On Mar 12, 6:30 am, Chuck Anderson <websiteaddr...@seemy.sigwrote: Quote:
I run Apache 2.0.55, and Php (both 4.4.1 and 5.2.5) on my home PC
(Windows XP). One of the scripts that I run daily needs to access a
secure URL (https://..............). When I am running Php4, it can
open the file.
>
However, when I run Php5 I (now) get this error message:
"Unable to find the wrapper "https" - did you forget to enable it when
you configured PHP?"
>
This is new. Last time I messed with this, I merely got:
"failed to open stream: Invalid argument"
>
I can see in phpinfo that the only registered streams are:
php, file, data, http, ftp, compress.zlib
>
I need https and ftps to be in that list, too.
>
Today I made the php.ini files for Php4 and Php5 nearly identical (the
only difference being the locations of some directories (extensions and
tmp). I downloaded the latest Windows binary from Php.net (5.2.5) and
installed (unzipped) it on my computer and am testing with that. I have
libeay32.dll and ssleay32.dll installed in the Windows System32 folder
(Where they need to be - in the executable Path. That's why Php4
works). I have also enabled the openssl extension and made sure it is
in the extension folder ("php5.2.5/ext").
>
When I run a script with
echo '<pre>';
print_r(stream_get_wrappers());
echo '</pre>';
>
echo '<pre>';
print_r(get_loaded_extensions());
echo '</pre>';
>
I get:
>
Array
(
[0] =php
[1] =file
[2] =data
[3] =http
[4] =ftp
[5] =compress.zlib
)
>
Array
(
[0] =bcmath
[1] =calendar
[2] =com_dotnet
[3] =ctype
[4] =session
[5] =filter
[6] =ftp
[7] =hash
[8] =iconv
[9] =json
[10] =odbc
[11] =pcre
[12] =Reflection
[13] =date
[14] =libxml
[15] =standard
[16] =tokenizer
[17] =zlib
[18] =SimpleXML
[19] =dom
[20] =SPL
[21] =wddx
[22] =xml
[23] =xmlreader
[24] =xmlwriter
[25] =apache2handler
[26] =curl
[27] =mbstring
[28] =exif
[29] =gd
[30] =mhash
[31] =printer
>
No openssl. (??) I was getting an error logged about the
php_printer.dll not being found, but after I put it in the extension
folder, it then showed up in the above list. And now the error log is
empty.
>
Another new thing I noticed today is that If I run Php.exe (from the
root folder of php5.2.5) and execute the above file, I get this
(abbreviated):
....
[25] =curl
[26] =mbstring
[27] =exif
[28] =gd
[29] =mhash
[30] =openssl
[31] =printer
>
So run from the command line, I can see that openssl is loaded ... and,
in fact, I can execute my script that access the secure URL (https:)
successfully.
>
Executing "php -i" even shows me:
Registered PHP Streams =php, file, data, http, ftp, compress.zlib,
https, ftps
>
So now I seem to be getting somewhere. What I don't understand is why
the apache module (which is how I always run Php - php5apache2.dll)
does not load the openssl extension. It doesn't even give me an error
message about it. It simply is not loaded. Why does the command line
load the extension, but not the Apache module? (The command line and
module use the same php.ini file. That's how they both loaded the
printer extension).
>
I would really like to move on and put Php4 behind me, but this
roadblock has been in my way for over a year now.
>
Any ideas what's wrong, or what I need to try? (I believe the problem
is simply that the openssl extension does not load successfully ... but
without errors?)
>
Thanks in Advance for any help.
>
--
*****************************
Chuck Anderson * Boulder, CO http://www.CycleTourist.com
Nothing he's got he really needs
Twenty first century schizoid man.
***********************************
| | 
March 13th, 2008, 02:55 AM
| | | Re: openssl extension not loading (need to open https stream)
Václav Stoupa wrote: Quote:
On Mar 12, 6:30 am, Chuck Anderson <websiteaddr...@seemy.sigwrote:
> Quote:
>I run Apache 2.0.55, and Php (both 4.4.1 and 5.2.5) on my home PC
>(Windows XP). One of the scripts that I run daily needs to access a
>secure URL (https://..............). When I am running Php4, it can
>open the file.
>>
>However, when I run Php5 I (now) get this error message:
>"Unable to find the wrapper "https" - did you forget to enable it when
>you configured PHP?"
>>
>This is new. Last time I messed with this, I merely got:
>"failed to open stream: Invalid argument"
>>
>I can see in phpinfo that the only registered streams are:
>php, file, data, http, ftp, compress.zlib
>>
>I need https and ftps to be in that list, too.
>>
>Today I made the php.ini files for Php4 and Php5 nearly identical (the
>only difference being the locations of some directories (extensions and
>tmp). I downloaded the latest Windows binary from Php.net (5.2.5) and
>installed (unzipped) it on my computer and am testing with that. I have
>libeay32.dll and ssleay32.dll installed in the Windows System32 folder
>(Where they need to be - in the executable Path. That's why Php4
>works). I have also enabled the openssl extension and made sure it is
>in the extension folder ("php5.2.5/ext").
>>
>When I run a script with
>echo '<pre>';
>print_r(stream_get_wrappers());
>echo '</pre>';
>>
>echo '<pre>';
>print_r(get_loaded_extensions());
>echo '</pre>';
>>
>I get:
>>
>Array
>(
> [0] =php
> [1] =file
> [2] =data
> [3] =http
> [4] =ftp
> [5] =compress.zlib
>)
>>
>Array
>(
> [0] =bcmath
> [1] =calendar
> [2] =com_dotnet
> [3] =ctype
> [4] =session
> [5] =filter
> [6] =ftp
> [7] =hash
> [8] =iconv
> [9] =json
> [10] =odbc
> [11] =pcre
> [12] =Reflection
> [13] =date
> [14] =libxml
> [15] =standard
> [16] =tokenizer
> [17] =zlib
> [18] =SimpleXML
> [19] =dom
> [20] =SPL
> [21] =wddx
> [22] =xml
> [23] =xmlreader
> [24] =xmlwriter
> [25] =apache2handler
> [26] =curl
> [27] =mbstring
> [28] =exif
> [29] =gd
> [30] =mhash
> [31] =printer
>>
>No openssl. (??) I was getting an error logged about the
>php_printer.dll not being found, but after I put it in the extension
>folder, it then showed up in the above list. And now the error log is
>empty.
>>
>Another new thing I noticed today is that If I run Php.exe (from the
>root folder of php5.2.5) and execute the above file, I get this
>(abbreviated):
> ....
> [25] =curl
> [26] =mbstring
> [27] =exif
> [28] =gd
> [29] =mhash
> [30] =openssl
> [31] =printer
>>
>So run from the command line, I can see that openssl is loaded ... and,
>in fact, I can execute my script that access the secure URL (https:)
>successfully.
>>
>Executing "php -i" even shows me:
>Registered PHP Streams =php, file, data, http, ftp, compress.zlib,
>https, ftps
>>
>So now I seem to be getting somewhere. What I don't understand is why
>the apache module (which is how I always run Php - php5apache2.dll)
>does not load the openssl extension. It doesn't even give me an error
>message about it. It simply is not loaded. Why does the command line
>load the extension, but not the Apache module? (The command line and
>module use the same php.ini file. That's how they both loaded the
>printer extension).
>>
>I would really like to move on and put Php4 behind me, but this
>roadblock has been in my way for over a year now.
>>
>Any ideas what's wrong, or what I need to try? (I believe the problem
>is simply that the openssl extension does not load successfully ... but
>without errors?)
>>
>Thanks in Advance for any help.
>>
| >
Hello,
same proble today! Solved!
>
Look to your error.txt file in log directory if your Apache.
>
Probably there would be something like:
>
Unable to load php_openssl.dll...
>
So extension for ssl is not loaded.
>
| You got it, ... thanks. I am mighty pleased at the coincidence.
Although, I must point out that the error was not in Apache's error log,
rather in Php's error log - in the Php folder (error logging must be
enabled in php.ini). Every time I restarted Apache, I would get this
error in the php error log file (twice, just like this):
[12-Mar-2008 20:08:29] PHP Warning: PHP Startup: Unable to load dynamic
library 'C:\Php5.2.5\ext\php_openssl.dll' - The operating system cannot
run %1.
in Unknown on line 0
[12-Mar-2008 20:08:31] PHP Warning: PHP Startup: Unable to load dynamic
library 'C:\Php5.2.5\ext\php_openssl.dll' - The operating system cannot
run %1.
in Unknown on line 0 Quote:
When I replaced them with those files bundled with php it starts to
work!
>
| Yes! When I copied libeay32.dll and ssleay32.dll from the Php folder to
apache/bin, overwriting the ones already there (I have Apache with
OpenSSL, and that must be why the other older ones were there), it
finally started working!!
Good grief. I've been at this for a year and a half .... or more. I had
placed those files in the php folder and in windows/system32 .... but
hadn't tried that yet. I can finally retire Php4 from my home PC. Thank you! Thank you! Thank you!!! I wish I could buy you (... and me) a
liter of Budvar!
--
*****************************
Chuck Anderson • Boulder, CO http://www.CycleTourist.com
Nothing he's got he really needs
Twenty first century schizoid man.
*********************************** | 
March 13th, 2008, 03:35 AM
| | | Re: openssl extension not loading (need to open https stream)
One minor correction:
Chuck Anderson wrote: Quote:
Václav Stoupa wrote:
>
> Quote:
>On Mar 12, 6:30 am, Chuck Anderson <websiteaddr...@seemy.sigwrote:
>>
>> Quote:
>>I run Apache 2.0.55, and Php (both 4.4.1 and 5.2.5) on my home PC
>>(Windows XP). One of the scripts that I run daily needs to access a
>>secure URL (https://..............). When I am running Php4, it can
>>open the file.
>>>
| | | .... snip Quote: Quote:
>Hello,
>same proble today! Solved!
>>
>Look to your error.txt file in log directory if your Apache.
>>
>Probably there would be something like:
>>
>Unable to load php_openssl.dll...
>>
>So extension for ssl is not loaded.
>>
>>
| >
You got it, ... thanks. I am mighty pleased at the coincidence.
>
Although, I must point out that the error was not in Apache's error log,
rather in Php's error log - in the Php folder (error logging must be
enabled in php.ini). Every time I restarted Apache, I would get this
error in the php error log file (twice, just like this):
>
| Okay. A slight error there on my part. The error *was* in the php
error log, but the php error log was in the apache folder, not in the
Php folder.
--
*****************************
Chuck Anderson • Boulder, CO http://www.CycleTourist.com
Nothing he's got he really needs
Twenty first century schizoid man.
*********************************** | 
March 13th, 2008, 08:35 AM
| | | Re: openssl extension not loading (need to open https stream)
Thanks for your gratefulness.
This problem was my headache in my new job (soap connection through
https)
You could arrive to our php conference on 12th April in Czech
Republic. I'm organize it. And buy me one of the hundred type of bears
we have in our country ;-) Besides the programmer's pub the main
program will be lectures about PRADO, Zend 1.5, Doctrine ORM and
Nette.
One small problem is you probably dont't speak czech :-(
The conference description is here: http://blog.php-group.cz/2008/02/20/...rky-jaro-2008/
So you have one month to learn language ;-D
Maybe you don't know what Nette is. I provide small description of it
because it's hidden diamond whithin the php developer's tools. It is
outcome of what was called in past centuries as "golden czech hands"
about cleverness of czech work-people. So, it's stunning new
innovative php framework from David Grudl - author of popular text
markup language [ http://texy.info] and very powerfull and small
database abstraction layer [ http://dibiphp.com]). Nette is based on
components and commands .Framework includes many very useful libraries
which haven't been in other frameworks yet. Safe file saving from php
web aplication, nice debugging, proper hierarchy of exceptions, two-
way router, controls in templates and easy composing of urls through
linked pages without much effort, form library was ready before
Zend_Form etc. Url is [ http://nettephp.com] There is sentence say
something like "Content will be here very soon" - I think before the
date of conference starts. So check this in month again if you are
interested in.
Wish you best!
Buy sorry bye :-)
VS
On Mar 13, 3:50 am, Chuck Anderson <websiteaddr...@seemy.sigwrote: Quote:
Václav Stoupa wrote: Quote: |
On Mar 12, 6:30 am, Chuck Anderson <websiteaddr...@seemy.sigwrote:
| > Quote: Quote:
I run Apache 2.0.55, and Php (both 4.4.1 and 5.2.5) on my home PC
(Windows XP). One of the scripts that I run daily needs to access a
secure URL (https://..............). When I am running Php4, it can
open the file.
| | > Quote: Quote:
However, when I run Php5 I (now) get this error message:
"Unable to find the wrapper "https" - did you forget to enable it when
you configured PHP?"
| | > Quote: Quote:
This is new. Last time I messed with this, I merely got:
"failed to open stream: Invalid argument"
| | > Quote: Quote:
I can see in phpinfo that the only registered streams are:
php, file, data, http, ftp, compress.zlib
| | > Quote: Quote: |
I need https and ftps to be in that list, too.
| | > Quote: Quote:
Today I made the php.ini files for Php4 and Php5 nearly identical (the
only difference being the locations of some directories (extensions and
tmp). I downloaded the latest Windows binary from Php.net (5.2.5) and
installed (unzipped) it on my computer and am testing with that. I have
libeay32.dll and ssleay32.dll installed in the Windows System32 folder
(Where they need to be - in the executable Path. That's why Php4
works). I have also enabled the openssl extension and made sure it is
in the extension folder ("php5.2.5/ext").
| | > Quote: Quote:
When I run a script with
echo '<pre>';
print_r(stream_get_wrappers());
echo '</pre>';
| | > Quote: Quote:
echo '<pre>';
print_r(get_loaded_extensions());
echo '</pre>';
| | >> Quote: Quote:
Array
(
[0] =php
[1] =file
[2] =data
[3] =http
[4] =ftp
[5] =compress.zlib
)
| | > Quote: Quote:
Array
(
[0] =bcmath
[1] =calendar
[2] =com_dotnet
[3] =ctype
[4] =session
[5] =filter
[6] =ftp
[7] =hash
[8] =iconv
[9] =json
[10] =odbc
[11] =pcre
[12] =Reflection
[13] =date
[14] =libxml
[15] =standard
[16] =tokenizer
[17] =zlib
[18] =SimpleXML
[19] =dom
[20] =SPL
[21] =wddx
[22] =xml
[23] =xmlreader
[24] =xmlwriter
[25] =apache2handler
[26] =curl
[27] =mbstring
[28] =exif
[29] =gd
[30] =mhash
[31] =printer
| | > Quote: Quote:
No openssl. (??) I was getting an error logged about the
php_printer.dll not being found, but after I put it in the extension
folder, it then showed up in the above list. And now the error log is
empty.
| | > Quote: Quote:
Another new thing I noticed today is that If I run Php.exe (from the
root folder of php5.2.5) and execute the above file, I get this
(abbreviated):
....
[25] =curl
[26] =mbstring
[27] =exif
[28] =gd
[29] =mhash
[30] =openssl
[31] =printer
| | > Quote: Quote:
So run from the command line, I can see that openssl is loaded ... and,
in fact, I can execute my script that access the secure URL (https:)
successfully.
| | > Quote: Quote:
Executing "php -i" even shows me:
Registered PHP Streams =php, file, data, http, ftp, compress.zlib,
https, ftps
| | > Quote: Quote:
So now I seem to be getting somewhere. What I don't understand is why
the apache module (which is how I always run Php - php5apache2.dll)
does not load the openssl extension. It doesn't even give me an error
message about it. It simply is not loaded. Why does the command line
load the extension, but not the Apache module? (The command line and
module use the same php.ini file. That's how they both loaded the
printer extension).
| | > Quote: Quote:
I would really like to move on and put Php4 behind me, but this
roadblock has been in my way for over a year now.
| | > Quote: Quote:
Any ideas what's wrong, or what I need to try? (I believe the problem
is simply that the openssl extension does not load successfully ... but
without errors?)
| | > Quote: Quote: |
Thanks in Advance for any help.
| | > Quote:
Hello,
same proble today! Solved!
| > Quote: |
Look to your error.txt file in log directory if your Apache.
| > Quote: |
Probably there would be something like:
| > Quote: |
Unable to load php_openssl.dll...
| > Quote: |
So extension for ssl is not loaded.
| >
You got it, ... thanks. I am mighty pleased at the coincidence.
>
Although, I must point out that the error was not in Apache's error log,
rather in Php's error log - in the Php folder (error logging must be
enabled in php.ini). Every time I restarted Apache, I would get this
error in the php error log file (twice, just like this):
>
[12-Mar-2008 20:08:29] PHP Warning: PHP Startup: Unable to load dynamic
library 'C:\Php5.2.5\ext\php_openssl.dll' - The operating system cannot
run %1.
in Unknown on line 0
[12-Mar-2008 20:08:31] PHP Warning: PHP Startup: Unable to load dynamic
library 'C:\Php5.2.5\ext\php_openssl.dll' - The operating system cannot
run %1.
in Unknown on line 0
> Quote:
According thishttp://php.net/manual/en/ref.openssl.php#79441I found
libeay32.dll and ssleay32.dll in my Apache2/bin folder.
| > Quote:
When I replaced them with those files bundled with php it starts to
work!
| >
Yes! When I copied libeay32.dll and ssleay32.dll from the Php folder to
apache/bin, overwriting the ones already there (I have Apache with
OpenSSL, and that must be why the other older ones were there), it
finally started working!!
>
Good grief. I've been at this for a year and a half .... or more. I had
placed those files in the php folder and in windows/system32 .... but
hadn't tried that yet. I can finally retire Php4 from my home PC.
>>
Thank you! Thank you! Thank you!!! I wish I could buy you (... and me) a
liter of Budvar!
>
--
*****************************
Chuck Anderson * Boulder, CO http://www.CycleTourist.com
Nothing he's got he really needs
Twenty first century schizoid man.
***********************************
| | | Thread Tools | Search this Thread | | | |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | | | | What is Bytes?
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over 220,989 network members.
|