[Vtigercrm-developers] use vtiger in lan and external access

Hamono, Chris (DPC) Chris.Hamono at sa.gov.au
Thu Jun 25 00:54:47 GMT 2015


I should have said this is done in config.inc.php

Chris

-----Original Message-----
From: vtigercrm-developers-bounces at lists.vtigercrm.com [mailto:vtigercrm-developers-bounces at lists.vtigercrm.com] On Behalf Of Hamono, Chris (DPC)
Sent: Thursday, 25 June 2015 9:27 AM
To: vtigercrm-developers at lists.vtigercrm.com
Subject: Re: [Vtigercrm-developers] use vtiger in lan and extarnal access

This is what I do...

if (empty($_SERVER['HTTP_HOST'])) {
    $site_URL = 'http://my.domain.name/'; 
}
else {
    $site_URL = 'http://' . $_SERVER['HTTP_HOST'] . '/'; 
}


The "if" statement is a quick way to determine if the script is called via the webbrowser you need this for some crons to work.

No need to edit the http referrer script

Chris

-----Original Message-----
From: vtigercrm-developers-bounces at lists.vtigercrm.com [mailto:vtigercrm-developers-bounces at lists.vtigercrm.com] On Behalf Of Alan Bell
Sent: Wednesday, 24 June 2015 11:14 PM
To: vtigercrm-developers at lists.vtigercrm.com
Subject: Re: [Vtigercrm-developers] use vtiger in lan and extarnal access

well the line might end up something like

if ((stripos($_SERVER['HTTP_REFERER'], $site_URL) !== 0 ) && stripos($_SERVER['HTTP_REFERER'], "http://192.168.") !== 0 && stripos($_SERVER['HTTP_REFERER'], "http://localhost") !== 0 && stripos($_SERVER['HTTP_REFERER'], "http://10.") !== 0 &&
($this->get('module') != 'Install')) {

which would let you access it via the site URL, or an internal IP address starting 192.168.*.* or 10.*.*.* or locally. Your exact requirements might be different.

Alan.

On 24/06/15 14:12, marlos22 wrote:
> so i have to replace this (stripos($_SERVER['HTTP_REFERER'],
> $site_URL) !==
> 0) whit my two URL (lan and external access) ????
>
>
>
>
>
> --
> View this message in context: 
> http://vtiger-crm.2324883.n4.nabble.com/use-vtiger-in-lan-and-extarnal
> -access-tp16676p16680.html Sent from the vtigercrm-developers mailing 
> list archive at Nabble.com.
> _______________________________________________
> http://www.vtiger.com/

_______________________________________________
http://www.vtiger.com/

_______________________________________________
http://www.vtiger.com/



More information about the vtigercrm-developers mailing list