Jump to content

SSL and require_once()


savagenoob

Recommended Posts

I was wondering how to get around the security warning that pops up when I add require_once ('includes/prochart.php') to my webpage. I edited my .htaccess file to make all pages https, but when i do this include it isn't considered a secure page so an annoying popup comes up that you have to click no on to load my content. Is there a way around this?

Link to comment
https://forums.phpfreaks.com/topic/218914-ssl-and-require_once/
Share on other sites

The only way you would be getting the warning as the result of anything that you included/required would be if there is content/media in the code that is not using HTTPS to fetch it or there is content/media in the code that is being fetched from a different domain than where your page resides.

 

You would need to provide specific information about what is being included/required if you want help with the problem.

I edited my .htaccess file to make all pages https,

The browser doesn't care where the request will eventually end up. All it cares about is whether the current page is https:// and the URL for something is just http://. Whatever you put in your .htaccess won't affect this - you have to fix the included files.

You do understand that php is a server side scripting language and an include/require statement simply reads the contents of the 'includes/prochart.php' and incorporates it into the php source code where the require_once() statement is located and outputs the resulting content to the browser.

 

You have got some links to images, external css, or external javascript or to some other content/media in your 'includes/prochart.php' file that is not being done using https or is being done to a different URL than your page that was fetched using https.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.