NYCPHP Meetup

NYPHP.org

[nycphp-talk] Use php to check for ssl/https support in apache

Rob Marscher rmarscher at beaffinitive.com
Fri Jul 14 15:19:41 EDT 2006


Yeah... that's pretty good.  It does rely on allow_url_fopen php.ini 
being turned on, I believe.  Maybe fopen(https://www.domain.com) would 
be slightly less overhead... the overhead isn't really a big deal though 
in this situation because it's only going to be used when writing a 
config file.  Any other ideas that don't require allow_url_fopen?

Thanks a lot, Néstor.  :)

-Rob


Nestor wrote:
> What would happen if you file(https://www.domain.com)?
> You should get a FALSE if you were not able to read the file.
> 
> Néstor :-)
> 
> On 7/14/06, *Rob Marscher* <rmarscher at beaffinitive.com 
> <mailto:rmarscher at beaffinitive.com>> wrote:
> 
>     Hi All,
> 
>     I've done a bit of searching and haven't been able to find if there's a
>     means that php running on apache can determine if apache supports
>     ssl/https connections.  It would be nice my app to force an https
>     connection on certain pages if it is available.  Otherwise I'll have to
>     do it with a manual config switch.
> 
>     Running apache_get_modules() and checking for mod_ssl seems like an
>     option... but doesn't work on PHP 4.4.2 w/ Apache 1.3 which a lot of
>     production servers still use.  Any other ideas?
> 
>     Thanks a lot,
>     Rob
>     _______________________________________________
>     New York PHP Community Talk Mailing List
>     http://lists.nyphp.org/mailman/listinfo/talk
>     New York PHP Conference and Expo 2006
>     http://www.nyphpcon.com
>     Show Your Participation in New York PHP
>     http://www.nyphp.org/show_participation.php
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> New York PHP Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
> New York PHP Conference and Expo 2006
> http://www.nyphpcon.com
> Show Your Participation in New York PHP
> http://www.nyphp.org/show_participation.php



More information about the talk mailing list