Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Is there a way to use an external header.php file for the admin section?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #11  
Old 04-03-2008, 06:44 AM
 
geckoday geckoday is offline
 

X-Wizard
  
Join Date: Aug 2005
Posts: 1,073
 

Default Re: Is there a way to use an external header.php file for the admin section?

Quote:
Originally Posted by balinor
While I understand what you are trying to do, this can/will result in one of those nasty 'The site isn't secure' warnings when in https mode if the images or any other info is being called from an outside source. Just FYI
An outside source has nothing to do with the secure warnings. A lot of us include google JS code for analytics on our secure pages without a problem. In this case it has even less to do with secure warnings as its a server side include, not a client side include which are the includes that generate security warnings.

The header PHP code would need to generate appropriate href's for http & https to avoid secure warning messages but that's really a moot point. The error message indicates that PHP is configured to not allow includes via URL's - i.e. it only allows local includes. Most hosts do this as a security measure to limit hacker exploits from grabbing malicious code from external servers.
__________________
Manuka Bay Company
X-Cart Version 4.0.19 [Linux]

UGG Boots and other fine sheepskin products
http://www.snowriver.com
Reply With Quote
  #12  
Old 04-03-2008, 06:48 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: Is there a way to use an external header.php file for the admin section?

I disagree. Call an image from http://anotherdomain.com and you WILL get a warning.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #13  
Old 04-03-2008, 07:19 AM
 
exsecror exsecror is offline
 

X-Wizard
  
Join Date: Apr 2007
Posts: 1,284
 

Default Re: Is there a way to use an external header.php file for the admin section?

Quote:
Originally Posted by geckoday
An outside source has nothing to do with the secure warnings. A lot of us include google JS code for analytics on our secure pages without a problem. In this case it has even less to do with secure warnings as its a server side include, not a client side include which are the includes that generate security warnings.

The header PHP code would need to generate appropriate href's for http & https to avoid secure warning messages but that's really a moot point. The error message indicates that PHP is configured to not allow includes via URL's - i.e. it only allows local includes. Most hosts do this as a security measure to limit hacker exploits from grabbing malicious code from external servers.

That's because the Google Analytics code automatically switches to SSL when you're in SSL mode hence why you don't get the warning. I agree with balinor it causes problems and a lot of customers who are not well informed about security will be automatically turned off should they get a warning about "Insecure Content" on the page and a broken lock.
Reply With Quote
  #14  
Old 04-03-2008, 07:21 AM
 
geckoday geckoday is offline
 

X-Wizard
  
Join Date: Aug 2005
Posts: 1,073
 

Default Re: Is there a way to use an external header.php file for the admin section?

Quote:
Originally Posted by balinor
I disagree. Call an image from http://anotherdomain.com and you WILL get a warning.
External <> security errors.
Calling an external file wrong causes security errors.
You should call an external file using http when in not in secure mode and using https when in secure mode - thats easy to do and as I mentioned is done for google analytics.
Code:
<script src="{if $smarty.server.HTTPS eq "on"}https://ssl{else}http://www{/if}.google-analytics.com/urchin.js" type="text/javascript">
But that's NOT what AgentBristow was trying to do. He was trying to include php code server side which is a whole different kettle of fish.
__________________
Manuka Bay Company
X-Cart Version 4.0.19 [Linux]

UGG Boots and other fine sheepskin products
http://www.snowriver.com
Reply With Quote
  #15  
Old 04-03-2008, 08:30 AM
  kube's Avatar 
kube kube is offline
 

X-Adept
  
Join Date: Sep 2005
Location: London: a small place East of Wales
Posts: 529
 

Default Re: Is there a way to use an external header.php file for the admin section?

Quote:
Originally Posted by geckoday
He was trying to include php code server side which is a whole different kettle of fish.

True. Until the header code itself contains insecure external urls which may or may not be the case.
__________________
Doms
kube v4.1.9
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 10:18 AM.

   

 
X-Cart forums © 2001-2020