Page 1 of 1

XAMPP and PHP file() to https

PostPosted: 24. December 2018 16:41
by matjaz
Hello friends!

I have xampp on Windows 7 for many years - everything ok but now I have unusual problem. My website was working on http just fine. From my PHP script I sometimes call other scripts for example:

$x = file("");

Last week I changed my website to https:// via CloudFlare. Website still works okay but I noticed that my file() commands cannot execute anymore. Now my script wants to do this:

$x = file(""); <-- notice https, not http

and file() command doesn't work. I am assuming it is problem with Windows or Apache conf that PHP now cannot use file() to https. Does anyone know how can I fix this? I am using xampp control panel 2.5.8. (many years old!) - I don't want to reinstall because it is PHP3 on that server I just want to be able to use https with file().


Re: XAMPP and PHP file() to https

PostPosted: 31. December 2018 11:53
by modoran
This is most likely due to an incorrect cerificate for ''. Use libcurl to bypass that instead.

Btw, if "' is your website, this is not how file() is supposed to work, fix your script to use local files instead.