keytekweb Posted April 27, 2010 Share Posted April 27, 2010 Hi I have recently installed Drupal as my CMS and have installed WHMCS in a subfolder called 'packages'. My aim was to create pages under a Drupal theme and perform some sort of 'include' to get WHMCS content to appear as the body of the pages. In principal this works except that any pages that require a login within WHMCS always appear as logged out i.e. The login screen appears instead of the page content. I am using absolute includes e.g. in my drupal page /client-area I have <?php include http://my.domain.com/packages/clientarea.php ?> If I use relative urls(./packages/clientarea.php) I get absolutely nothing. This is possibly to do with smarty or something Can someone tell me if there is a solution for this i.e Can I include WHMCS files in external PHPs under the same domain. Any help much appreciated Thanks Eugene Martin 0 Quote Link to comment Share on other sites More sharing options...
thehost5968 Posted April 28, 2010 Share Posted April 28, 2010 it is to do with the sessions 0 Quote Link to comment Share on other sites More sharing options...
keytekweb Posted April 30, 2010 Author Share Posted April 30, 2010 Hi It is indeed to do with sessions. I tried for 3 days to sync the sessions even passing the session ID along with the request. I had a little success with this but for some reason the "upw" variable was being stripped from the session within WHMCS. I have found a solution that for me is sufficiently acceptable. I have decided to use the much maligned iframe within my drupal pages to include WHMCS content. I have found some very nice code here http://www.wolfcreekconsulting.com/support/techlib/web/DynamicallyResizedIframesDemo.php to reshape the iframe on reload of its content. This means crucially that there are no ugly scroll bars on your iframe. Select view page source to view code.Remove all the table related html from his example and just use the iframe tag. One important thing I discovered was that an http iframe cannot resize itself based on https content and vice versa. Therefore it is important to mod rewrite all http links within Drupal to https and to set your WHMCS installation to always deliver in https(This is done by setting the system url to https://www.yourdomain.com/whmcs and blanking out the WHMCS SSL System URL. All this is in General settings of WHMCS admin) Hope that helps someone Eugene Martin 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.