Jump to content

 

poppedweb

Member Since 02 Aug 2016
Offline Last Active Feb 19 2018 08:16 PM
-----

Posts I've Made

In Topic: Common.php Error

19 February 2018 - 07:50 AM

 

No way

I am online

 

...and looks Google alanalytics is crash... ZERO ... but the code it is ok

 

an i have another row everytime when someone visit website

soo.. that 1927 and:

 

[19-Feb-2018 09:02:02 Europe/Bucharest] PHP Notice:  Undefined index: REQUEST_METHOD in /home/xxxxx/public_html/app/Tygh/Registry.php on line 510

 

and place:


            if ($id == 'time') {
                $key = 'time';
            } elseif ($id == 'static') {
                $key = 'cache_' . ACCOUNT_TYPE;
            } elseif ($id == 'day') {
                $key = date('z', TIME);
            } elseif ($id == 'locale') {
                $key = (defined('CART_LOCALIZATION') ? (CART_LOCALIZATION . '_') : '')
                    . CART_LANGUAGE . '_' . CART_SECONDARY_CURRENCY;
            } elseif ($id == 'dispatch') {
                $key = AREA . '_' . $_SERVER['REQUEST_METHOD'] . '_' . str_replace('.', '_', $_REQUEST['dispatch'])
                    . '_' . (defined('CART_LOCALIZATION') ? (CART_LOCALIZATION . '_') : '')
                    . CART_LANGUAGE . '_' . CART_SECONDARY_CURRENCY;
            } elseif ($id == 'user') {
                $key = AREA . '_' . $_SERVER['REQUEST_METHOD'] . '_' . str_replace('.', '_', $_REQUEST['dispatch'])
                    . '.' . $usergroups_condition
                    . '.' . (defined('CART_LOCALIZATION') ? (CART_LOCALIZATION . '_') : '')
                    . CART_LANGUAGE . '.' . CART_SECONDARY_CURRENCY;
            } elseif ($id == 'locale_auth') {
                $key = AREA . '_' . $_SERVER['REQUEST_METHOD'] . '_' . (!empty(\Tygh::$app['session']['auth']['user_id']) ? 1 : 0)
                    . '.' . $usergroups_condition
                    . (defined('CART_LOCALIZATION') ? (CART_LOCALIZATION . '_') : '')
                    . CART_LANGUAGE . '.' . CART_SECONDARY_CURRENCY;
            } elseif ($id == 'html_blocks') {
                $promotion_condition = '';
                if (!empty(\Tygh::$app['session']['auth']['user_id'])) {
                    $active_promotions = db_get_fields(

 

Well this just points the finger right at server configuration. If your server predefined variables haven't been set accordingly I would have no clue how to help you. I suggest you contact your host to determine the root cause of this problem.


In Topic: Common.php Error

18 February 2018 - 10:15 PM

Hi all again

 

I just make masiv changes with csv file for all product title H1

And change all seo-names

 

and i have this...now

[18-Feb-2018 22:00:02 Europe/Bucharest] PHP Notice:  Undefined index: REMOTE_ADDR in /home/xxxxxx/public_html/app/functions/fn.common.php on line 1927

and the place

/ The function returns Host IP and Proxy IP.
//
function fn_get_ip($return_int = false)
{
    $forwarded_ip = '';
    $fields = array(
        'HTTP_X_FORWARDED_FOR',
        'HTTP_X_FORWARDED',
        'HTTP_FORWARDED_FOR',
        'HTTP_FORWARDED',
        'HTTP_forwarded_ip',
        'HTTP_X_COMING_FROM',
        'HTTP_COMING_FROM',
        'HTTP_CLIENT_IP',
        'HTTP_VIA',
        'HTTP_XROXY_CONNECTION',
        'HTTP_PROXY_CONNECTION');

    $matches = array();
    foreach ($fields as $f) {
        if (!empty($_SERVER[$f])) {
            preg_match("/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/", $_SERVER[$f], $matches);
            if (!empty($matches) && !empty($matches[0]) && $matches[0] != $_SERVER['REMOTE_ADDR']) {
                $forwarded_ip = $matches[0];
                break;
            }
        }
    }

    $ip = array('host' => $forwarded_ip, 'proxy' => $_SERVER['REMOTE_ADDR']);

    if ($return_int) {
        foreach ($ip as $k => $_ip) {
            $ip[$k] = empty($_ip) ? 0 : sprintf("%u", ip2long($_ip));
        }
    }

    if (empty($ip['host']) || !fn_is_inet_ip($ip['host'], $return_int)) {
        $ip['host'] = $ip['proxy'];
        $ip['proxy'] = $return_int ? 0 : '';
    }

    return $ip;
}

//
// If there is IP address in address scope global then return true.
//
function fn_is_inet_ip($ip, $is_int = false)
{
    if ($is_int) {
        $ip = long2ip($ip);
    }
    $_ip = explode('.', $ip);

    return
        ($_ip[0] == 10 ||
        ($_ip[0] == 172 && $_ip[1] >= 16 && $_ip[1] <= 31) ||
        ($_ip[0] == 192 && $_ip[1] == 168) ||
        ($_ip[0] == 127 && $_ip[1] == 0 && $_ip[2] == 0 && $_ip[3] == 1) ||
        ($_ip[0] == 255 && $_ip[1] == 255 && $_ip[2] == 255 && $_ip[3] == 255))
        ? false : true;
}

// Workaround for PHP < 5.4

I have no idee :(

 

You do not have an IP adress because you are doing it locally I assume. Just change linee 1927 as follows (!not tested):

$ip = array(
    'host' => $forwarded_ip, 
    'proxy' => isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : '127.0.0.1'
);


In Topic: Best "image Verification" Settings?

15 February 2018 - 02:53 PM

eCom  I am not talking about the type of reCAPTCHA that requires picking out some photos. I mean a simple "I am not a robot" that only requires a click to move on. I think people are so used to seeing this that It could work without driving people  away.

However if someone can give me an idea for where to place this to be equally effective , I  would be ready to do that. 

Thanks for any suggestions.

 

Hello,

 

This is the exact reason why I suggested 'Invisible Captcha'. This will bind the challenge button to an input field, thus it is 'invisible'. However, like the normal captcha, when it cannot decide whether you are a bot or not it will show a popup from which you will have to pick the correct images.

 

Kind regards,


In Topic: Best "image Verification" Settings?

14 February 2018 - 08:14 PM

Hello,

 

It would be interesting to see someone develop an add-on for 'Invisible Captcha'. I simply haven't had the time to create such a project yet but this will make the life of some people even easier :)

 

https://developers.g...docs/invisible 

 

Can you put the reCaptcha code on 2 pages in the same website. If not, which is the best place to put it?  Is there a way to put it on the reviews tab?

thank you

 

Well, it should. Google Recaptcha tracks the behaviour of the user across the board and when the users clicks the button it will 'authenticate' the behaviour and let your server know that it is a valid user. So where the button is placed shouldn't make a difference.

 

Kind regards,

 

Kind regards,


In Topic: Help Needed. Service Unavailable - Uncaught Exception

13 February 2018 - 06:10 PM

Hello,

 

The only thing I could think of is that you have created / edited an order and then decide to view the admin panel (without a user session --> sid_customer_*) thus causing this bug (because it will try and calculate the cart of the admin perhaps?).

 

Kind regards,