jeffaudi / php-proxy

Automatically exported from code.google.com/p/php-proxy
0 stars 0 forks source link

Notice: Undefined index: HTTPS in C:\wamp\www\index.php on line 34 #7

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Installed the index.php & added the .htaccess file lines to original file
2. However whatever site I access through the PHP proxy I get above notice 
error on browser (chrome, Firefox) followed by error "Failed to connect to 
www.msn.com port 80: Connection refused"
3. The sites I am trying through proxy are opening in other tabs of same 
browser & hence there are no blocking at my end

What is the expected output? What do you see instead?
Standard output of msn.com or google.com is expected.
Instead I get PHP notice error : Notice: Undefined index: HTTPS in 
C:\wamp\www\index.php on line 34

Followed by "Failed to connect to www.msn.com port 80: Connection refused"

What version of the product are you using? On what operating system?
Using PHP proxy (released Nov 2011) on Win7 & wamp server.

Please provide any additional information below.
I have also modified below line:
curl_setopt($curlSession, CURLOPT_SSL_VERIFYHOST, 2);
& put 2 instead of 1 in the last value for latest PHP versions to get rid of 
other error notice.

Original issue reported on code.google.com by sagnik.pal on 20 Jun 2014 at 10:11

Attachments:

GoogleCodeExporter commented 8 years ago
Instead I get PHP notice error : Notice: Undefined index: HTTPS in 
C:\wamp\www\index.php on line 34

This is due to inexistence of once choise over two.
Script is asking both for http and https, but only one will return true, the 
other false. Undefined index means "i don't found that value" because IS NOT 
SET.

Replace:
if($_SERVER['HTTPS'] == 'on'){
With:
if(@$_SERVER['HTTPS'] == 'on'){ // added @ for error supression

With curl_setopt($curlSession, CURLOPT_SSL_VERIFYHOST, 2); you will get error 
if a cert is due date, or domain name mismatch. Set to 0 to no check SSL.

About failure on the mns https site i can't do nothing if i can't test.
Id try with some domains, some good https and some bad signed https (with more 
settings) and worked.

Original comment by ErM3...@gmail.com on 4 Mar 2015 at 7:53