[PHP] openssl php 4.3.1
hi all, i have problems getting fopen() and fsockopen() to work over https.. here is the problem.. from the phpinfo: OpenSSL support enabled OpenSSL Version OpenSSL 0.9.6h 5 Dec 2002 from php -m # php -m [PHP Modules] ctype mysql openssl overload pcre posix session standard tokenizer xml [Zend Modules] from the Appendix I regarding fopen() on php.net: Note: HTTPS is supported starting from PHP 4.3, if you have compiled in support for OpenSSL. and from the documentation on fsockopen() on php.net: As of PHP 4.3.0, if you have compiled in OpenSSL support, you may prefix the hostname with either 'ssl://' or 'tls://' to use an SSL or TLS client connection over TCP/IP to connect to the remote host. in a test file i have two lines of code like this: $file = "https://someurl.com";; if (!($fp = fopen($file, "r"))) this produces an error but it doesn't point to any problem - like this: Warning: fopen(https://someurl.com.. in /path/to/file.php on line 45 if i change $file to "http://someurl.com"; it works fine... with fsockopen() the situation is kinda the same. code: $fp=fsockopen("ssl://www.foo.com", 443); error: Warning: fsockopen() [function.fsockopen]: no SSL support in this build in /path/to/file/... if i pul out the ssl:// part it works fine... now, i did read the posts on this list about curl. why curl isn't mentioned anywhere in the documentation for fopen() and fsockopen() if it's needed for those functions? why would i need curl compiled in php if i already have openssl compiled with it? the machine i'm using is a freeBSD 4.6 box with apache 1.3.27 and OpenSSL 0.9.6h, php is 4.3.1... i did similar posts on other php lists but everybody's quite.. thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] openssl php 4.3.1
part 2: --- got curl 7.10.3 (latest version)... recompiled php 4.3.1 with curl. no errors. shows up fine on phpinfo... testing with: $ch = curl_init ("http://moo.org";); $fp = fopen("http://moo.org/index.html";, "r"); curl_setopt ($ch, CURLOPT_FILE, $fp); curl_setopt ($ch, CURLOPT_HEADER, 0); curl_exec ($ch); curl_close ($ch); while (!feof($fp)) { echo fgets ($fp,128); } fclose ($fp); the file i get back is not the whole file. it comes from the middle or so down. i need this to retrieve xml files through https. tried one of those files without https - just http - got the last part of the file back. it cuts off somewhere.. i was really happy with fopen() and fsockopen() until the https came up... i've been stuck on this for the last 2 days and i really need some kind of solution... it's very frustrating that neither of those 3 options in php work as expected or documented with the openssl options. i tested curl on the command line and it works fine. no cut offs of documents anywhere please help... is there any bugs known anywhere between curl 7.10.3 + php 4.3.1 on freeBSD 4.6? > > hi all, > > i have problems getting fopen() and fsockopen() to work over https.. > > here is the problem.. > > from the phpinfo: > > OpenSSL support enabled > OpenSSL Version OpenSSL 0.9.6h 5 Dec 2002 > > from php -m > > # php -m > [PHP Modules] > ctype > mysql > openssl > overload > pcre > posix > session > standard > tokenizer > xml > > [Zend Modules] > > > from the Appendix I regarding fopen() on php.net: > > Note: HTTPS is supported starting from PHP 4.3, if you have compiled in > support for OpenSSL. > > and from the documentation on fsockopen() on php.net: > As of PHP 4.3.0, if you have compiled in OpenSSL support, you may prefix > the hostname with either 'ssl://' or 'tls://' to use an SSL or TLS client > connection over TCP/IP to connect to the remote host. > > in a test file i have two lines of code like this: > > $file = "https://someurl.com";; > if (!($fp = fopen($file, "r"))) > > this produces an error but it doesn't point to any problem - like this: > Warning: fopen(https://someurl.com.. in /path/to/file.php on line > 45 > > if i change $file to "http://someurl.com"; it works fine... > > with fsockopen() the situation is kinda the same. code: > $fp=fsockopen("ssl://www.foo.com", 443); > > error: > Warning: fsockopen() [function.fsockopen]: no SSL support in this build in > /path/to/file/... > > if i pul out the ssl:// part it works fine... > > now, i did read the posts on this list about curl. why curl isn't > mentioned anywhere in the documentation for fopen() and fsockopen() if > it's needed for those functions? > why would i need curl compiled in php if i already have openssl compiled with > it? > > the machine i'm using is a freeBSD 4.6 box with apache 1.3.27 and OpenSSL > 0.9.6h, php is 4.3.1... > > i did similar posts on other php lists but everybody's quite.. > > thanks > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] openssl php 4.3.1
On Tue, 25 Mar 2003, The Doctor wrote: > On Mon, Mar 24, 2003 at 11:15:05PM -0500, Kalin Mintchev wrote: > > > > hi all, > > > > i have problems getting fopen() and fsockopen() to work over https.. > > > > here is the problem.. > > > > from the phpinfo: > > > > OpenSSL support enabled > > OpenSSL Version OpenSSL 0.9.6h 5 Dec 2002 > > OpenSSL 0.9.6h has a security vulnerability. which one doesn't?! i don't think that's the problem of not getting it to work with fopen() and fsockopen() what about the curl issue??? cutting off the document??? is anybody that has had to deal with this problems on this list? i don't know where else to ask... > > PLEASe check http://www.openssl.org > > > > > from php -m > > > > # php -m > > [PHP Modules] > > ctype > > mysql > > openssl > > overload > > pcre > > posix > > session > > standard > > tokenizer > > xml > > > > [Zend Modules] > > > > > > from the Appendix I regarding fopen() on php.net: > > > > Note: HTTPS is supported starting from PHP 4.3, if you have compiled in > > support for OpenSSL. > > > > and from the documentation on fsockopen() on php.net: > > As of PHP 4.3.0, if you have compiled in OpenSSL support, you may prefix > > the hostname with either 'ssl://' or 'tls://' to use an SSL or TLS client > > connection over TCP/IP to connect to the remote host. > > > > in a test file i have two lines of code like this: > > > > $file = "https://someurl.com";; > > if (!($fp = fopen($file, "r"))) > > > > this produces an error but it doesn't point to any problem - like this: > > Warning: fopen(https://someurl.com.. in /path/to/file.php on line > > 45 > > > > if i change $file to "http://someurl.com"; it works fine... > > > > with fsockopen() the situation is kinda the same. code: > > $fp=fsockopen("ssl://www.foo.com", 443); > > > > error: > > Warning: fsockopen() [function.fsockopen]: no SSL support in this build in > > /path/to/file/... > > > > if i pul out the ssl:// part it works fine... > > > > now, i did read the posts on this list about curl. why curl isn't > > mentioned anywhere in the documentation for fopen() and fsockopen() if > > it's needed for those functions? > > why would i need curl compiled in php if i already have openssl compiled with > > it? > > > > the machine i'm using is a freeBSD 4.6 box with apache 1.3.27 and OpenSSL > > 0.9.6h, php is 4.3.1... > > > > i did similar posts on other php lists but everybody's quite.. > > > > thanks > > > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] openssl php 4.3.1
how are we doing on this?!?... this'd be my last try to seek help here... i did on a few other mailing lists and forums but nobody has anything to say... i guess i'd never get ssl connection with php regardless of what it's in the documentation on the php.net site... On Tue, 25 Mar 2003, Kalin Mintchev wrote: > > part 2: > --- > > got curl 7.10.3 (latest version)... > recompiled php 4.3.1 with curl. no errors. shows up fine on phpinfo... > testing with: > > $ch = curl_init ("http://moo.org";); > $fp = fopen("http://moo.org/index.html";, "r"); > > curl_setopt ($ch, CURLOPT_FILE, $fp); > > curl_setopt ($ch, CURLOPT_HEADER, 0); > > curl_exec ($ch); > curl_close ($ch); > > while (!feof($fp)) { > echo fgets ($fp,128); > } > > fclose ($fp); > > the file i get back is not the whole file. it comes from the middle or so > down. i need this to retrieve xml files through https. tried one of those > files without https - just http - got the last part of the file back. it > cuts off somewhere.. > > i was really happy with fopen() and fsockopen() until the https came up... > > i've been stuck on this for the last 2 days and i really need some kind of > solution... it's very frustrating that neither of those 3 options in php > work as expected or documented with the openssl options. > > i tested curl on the command line and it works fine. no cut offs of > documents anywhere > > please help... > > is there any bugs known anywhere between curl 7.10.3 + php 4.3.1 on > freeBSD 4.6? > > > > > > hi all, > > > > i have problems getting fopen() and fsockopen() to work over https.. > > > > here is the problem.. > > > > from the phpinfo: > > > > OpenSSL support enabled > > OpenSSL Version OpenSSL 0.9.6h 5 Dec 2002 > > > > from php -m > > > > # php -m > > [PHP Modules] > > ctype > > mysql > > openssl > > overload > > pcre > > posix > > session > > standard > > tokenizer > > xml > > > > [Zend Modules] > > > > > > from the Appendix I regarding fopen() on php.net: > > > > Note: HTTPS is supported starting from PHP 4.3, if you have compiled in > > support for OpenSSL. > > > > and from the documentation on fsockopen() on php.net: > > As of PHP 4.3.0, if you have compiled in OpenSSL support, you may prefix > > the hostname with either 'ssl://' or 'tls://' to use an SSL or TLS client > > connection over TCP/IP to connect to the remote host. > > > > in a test file i have two lines of code like this: > > > > $file = "https://someurl.com";; > > if (!($fp = fopen($file, "r"))) > > > > this produces an error but it doesn't point to any problem - like this: > > Warning: fopen(https://someurl.com.. in /path/to/file.php on line > > 45 > > > > if i change $file to "http://someurl.com"; it works fine... > > > > with fsockopen() the situation is kinda the same. code: > > $fp=fsockopen("ssl://www.foo.com", 443); > > > > error: > > Warning: fsockopen() [function.fsockopen]: no SSL support in this build in > > /path/to/file/... > > > > if i pul out the ssl:// part it works fine... > > > > now, i did read the posts on this list about curl. why curl isn't > > mentioned anywhere in the documentation for fopen() and fsockopen() if > > it's needed for those functions? > > why would i need curl compiled in php if i already have openssl compiled with > > it? > > > > the machine i'm using is a freeBSD 4.6 box with apache 1.3.27 and OpenSSL > > 0.9.6h, php is 4.3.1... > > > > i did similar posts on other php lists but everybody's quite.. > > > > thanks > > > > > > > > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] help please was: openssl php 4.3.1
here is a real example: $fp = fopen ("http://store.el.net/index.html";, "r"); while (!feof($fp)) { echo fgets ($fp,4096); } this works fine... if you try it with https you'll get an error - file not found from php if you try the same url with https in the any browser you wont have any problems can somebody explain where to look at - i do have open ssl compiled within php and everything else works fine - php 4.3.1 * openssl 0.9.6h * apache 1.3.27 on FreeBSD 4.6 i got a response earlier from a list member pointing out a security vulnerability for this version of openssl. how can that influence the fopen()'s https request, if at all? how exactly is the https request from fopen() passed to the ssl? if the ssl works through the broser what can be the reasons that it would not through php's fopen() or fsockopen() will going back to php 4.3.0 help? or getting another (newer/older) openssl? i am desperate for a solution. thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Checkbox
hello, how can i get the output file from the curl function to stream - to be processed like from fopen or fsockopen? thanks... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] stream from curl
sorry - i forgot to change the subject apologize.. On Thu, 27 Mar 2003, Kalin Mintchev wrote: > > > hello, > > how can i get the output file from the curl function to stream - to be > processed like from fopen or fsockopen? > > thanks... > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] shell_exec question....
hello list, what has to happened so this actually works: $mstrng = shell_exec("/usr/sbin/zip 0041_27032003223711.zip 0041_27032003223711"); if php is compiled as a module with apache is the apache owner the one that has to have writing permissions? if so - it does.. any help appreciated... thank you -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php