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
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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.