Re: [PHP] Problem detecting HTTPS connection
Hello Wee-- That's been discussed a few times on the list. For example: http://beeblex.com/lists/index.php/php.general/190410 Cheers, Marco On 8/9/05 8:59 PM, Wee Keat [EMAIL PROTECTED] wrote: Hi all, I've been struggling to detect HTTPS connection for a shopping cart. I've used $_SERVER['SERVER_PORT'] to check for 443 and it kept on showing up as 80. Does anyone have any idea why this is happening? Is it the server config? I've called the server administrator and he said that it is running through port 443 for https connections. Here's an output of $_SERVER['SERVER_PORT'] on the site that I'm working on: https://www.axentonline.com.au/port_test.php http://www.axentonline.com.au/port_test.php Both the above are showing server_port as 80. Please assist. Thanks. PHPInfo: --- Apache-AdvancedExtranetServer/2.0.50 Mandrakelinux/7.2.101mdk mod_ssl/2.0.50 OpenSSL/0.9.7d PHP/4.3.8 -- Marco Tabini President CEO Marco Tabini Associates, Inc. 28 Bombay Ave. Toronto, ON M3H 1B7 Canada Phone: +1 (416) 630-6202 Fax: +1 (416) 630-5057 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problem detecting HTTPS connection
Hi Marco, Thanks for taking the time to answer my questions. Marco Tabini wrote: That's been discussed a few times on the list. For example: http://beeblex.com/lists/index.php/php.general/190410 Yes. I'm truly aware of that and have tried it but to no avail. I've added the code provided in the list to the following for your review: http://www.axentonline.com.au/port_test.php https://www.axentonline.com.au/port_test.php I've done a var dump before of $_SERVER and $_ENV and did not find any HTTPS key in the array. Is there another way that I can do this? Thanks again. -- Wee Keat Chin Protocol Networks p: 1300 131 932 e: [EMAIL PROTECTED] h: www.pn.com.au -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problem detecting HTTPS connection
On 8/9/05 10:30 PM, Wee Keat [EMAIL PROTECTED] wrote: Hi Marco, Thanks for taking the time to answer my questions. Marco Tabini wrote: That's been discussed a few times on the list. For example: http://beeblex.com/lists/index.php/php.general/190410 Yes. I'm truly aware of that and have tried it but to no avail. I've added the code provided in the list to the following for your review: http://www.axentonline.com.au/port_test.php https://www.axentonline.com.au/port_test.php Unfortunately, I can't seem to be able to connect to your server right now. What server software are you using? I have never heard of this approach not working on a properly configured Apache... But maybe you're using something else? Marco I've done a var dump before of $_SERVER and $_ENV and did not find any HTTPS key in the array. Is there another way that I can do this? Thanks again. -- Marco Tabini President CEO Marco Tabini Associates, Inc. 28 Bombay Ave. Toronto, ON M3H 1B7 Canada Phone: +1 (416) 630-6202 Fax: +1 (416) 630-5057 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problem detecting HTTPS connection
Marco Tabini wrote: Unfortunately, I can't seem to be able to connect to your server right now. What server software are you using? I have never heard of this approach not Info: --- Apache-AdvancedExtranetServer/2.0.50 Mandrakelinux/7.2.101mdk mod_ssl/2.0.50 OpenSSL/0.9.7d PHP/4.3.8 The server is not handled by me and I'm not sure if Apache-AdvancedExtranetServer is different from Apache 2. Could this be the source of the problem? working on a properly configured Apache... But maybe you're using something else? Is there a list of common mis-configurations of Apache that may lead to this problem? It looks like this may not be a problem with PHP at all. I'll have to talk to the server administrator to see if there's a chance his server is configured wrongly. If the answer lies there, I'll close this thread. Thanks again. -- Wee Keat Chin Protocol Networks p: 1300 131 932 e: [EMAIL PROTECTED] h: www.pn.com.au -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] problem with https
At the bottom of your httpd.conf, in the default SSL section, there is a path that normally points to /path/to/apache/htdocs if you store your webfiles some where other then the default, even if you change it near the top of your file, it won't work for SSL till you modify it at the bottom, if you can't find it by just looking, do a search for htdocs in your file, all the way down till you find it. On Wed, 2002-11-27 at 10:14, Vivek Kedia wrote: i have apache 1.3.26 on php 4.2.3 everything else is running fine except https//whatever when i am trying to access the files thru apache , I have looked for SSL properties in httpd.conf and everything is properly enables( that what i think ) . The error generated is page not found and when i am running without s in the https://; the page is being displayed properly , Do any1 have any idea vivek kedia [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Adam Voigt ([EMAIL PROTECTED]) The Cryptocomm Group My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc signature.asc Description: This is a digitally signed message part
Re: [PHP] problem with https
Hi Vivek, If you are accessing https on localhost, you would need to enter: https://localhost/whatever_file You might want to check whether you have https enabled: check phpinfo() under 'Apache Environment'. [HTTPS ] should be on as well. hth, Andre On Wednesday 27 November 2002 10:14 am, Vivek Kedia wrote: i have apache 1.3.26 on php 4.2.3 everything else is running fine except https//whatever when i am trying to access the files thru apache , I have looked for SSL properties in httpd.conf and everything is properly enables( that what i think ) . The error generated is page not found and when i am running without s in the https://; the page is being displayed properly , Do any1 have any idea vivek kedia [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] problem with https
The fact that https://whatever gives you a 404 file not found means that Apache SSL IS working, but it's not pointing where you want it to. So, you need to check the DocumentRoot setting in httpd.conf and see that it's pointing where you want it. You probably either have a virtual host set on port 443 to point to the wrong DocumentRoot, or you need to set one up on port 443, pointing to the right DocumentRoot. HTH, Peter Janett New Media One Web Services New Upgrades Are Now Live!!! Windows 2000 accounts - Cold Fusion 5.0 and Imail 7.1 Sun Solaris (UNIX) accounts - PHP 4.1.2, mod_perl/1.25, Stronghold/3.0 (Apache/1.3.22), MySQL 3.23.43 PostgreSQL coming soon! http://www.newmediaone.net [EMAIL PROTECTED] (303)828-9882 - Original Message - From: Andre Dubuc [EMAIL PROTECTED] To: Vivek Kedia [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, November 27, 2002 9:23 AM Subject: Re: [PHP] problem with https Hi Vivek, If you are accessing https on localhost, you would need to enter: https://localhost/whatever_file You might want to check whether you have https enabled: check phpinfo() under 'Apache Environment'. [HTTPS ] should be on as well. hth, Andre On Wednesday 27 November 2002 10:14 am, Vivek Kedia wrote: i have apache 1.3.26 on php 4.2.3 everything else is running fine except https//whatever when i am trying to access the files thru apache , I have looked for SSL properties in httpd.conf and everything is properly enables( that what i think ) . The error generated is page not found and when i am running without s in the https://; the page is being displayed properly , Do any1 have any idea vivek kedia [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- 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