Possible solutions of your questions

  hosting
<< Previous       Question for setcookie

Question: Hello. please tell me why my PHP function, setcookie() on the local server is the computer is running. And when you throw a website on your hosting all cookies in the browser are not added...? Just can`t figure out if this could be related to server settings or that you need to look where in the code these files....? Written in the PHP file simple function which adds a cookie to the browser setcookie(`messeges`, $mes, $times);just Passed the value to switch the message text in javascript just 1 or 0
Answer:

Hello

where you can see the problem?

Answer:

Hello.

Give the path to the script where you have cookie written.

Answer:

What value you taking the variable $times?

Question: The code itself is written in the file subscription_news.php which lies at the root of the site http://example3.businessumcha.com/РЇ there is recorded in a cookie just 1 or 2 this value is for switch function in javascript which then according to these values simply display a message on page for user ....Here is a piece of php code in this file...$mes = 1; $times = time()+10; setcookie(`messeges`, $mes, $times); header(\"Location:\".$_SERVER[`HTTP_REFERER`]); exit();
Question: just the template tpl files and on another I have not idea how this is all done, so well done and php and javascript.... The form just sends an e-mail to the database.... And then I need for the user to write sent or already exists such address or error. On the Denver computer all wrote and it works, but threw in hosting all cookies in the browser are not added, does not even appear this cookie with the same name in the browser...
Answer:

Cookies to the server, I check: http://example3.businessumcha.com/testcookies.php

Question: Yes, I see what works. There are other cookies are also added. But it is these that I want to add why it does not work... Just can`t figure out what could be the reason...
Question: And the main thing that on a computer in Denver, all works without problems, but on the hosting at all, even in the browser cook is not recorded for some reason...
Question: Now removed from the function the third parameter is the life time of the cookies and it worked... But I need this parameter to add since it is just a message and after reloading the page should disappear...
Answer:

And what script you read them?

Answer:

 $times in the script you specify.

Question: And by the way just a question. Why the server time is not sync with real time? Where servers are located and how to display the right time?
Question: I simply add the current time for cookie time() function and add some seconds to this date. And then just jot this date into a variable which fills in as the time which must exist to cook... Or something is wrong?
Question: I schA code in the file is copied where the lifetime of cookies is not specified...
Answer:

you Have cookies disappear after a few seconds, try to increase EOT interval of 10-20 seconds to check

the Cookie from the script which they pointed to will be, he could see them only after you refresh the page.

Question: Read down through the function in another file is already [removed]script type=\"text/javascript\" if(getCookie(`messeges`) == 1){ [removed]ln(\"Your E-mail uspishno of dogani\"); } if(getCookie(`messeges`) == 2){ [removed]ln(\"Taqiy E-mail vzhe there is the toll -\");} else{ [removed]ln(\"\"); } the function works as I understand the only problem with time. It turns out that the time that is exposed probably does not coincide with the time on the computer. But this problem then perhaps not only me. Even if the time to put on the server anyway someone may have a different time on the computer... Or not?
Question: I was increased to 10 seconds. But still didn`t work. Although the page is reloaded Maximus 1 sec.
Question: And the same page reloads, ATM the redirect is to the page of the parish. Sent cook turns and is redirected to a different page to the one which came with the user. I even removed and then a message appears immediately and the cookie is written to browser. So the problem I think... on the server the time is right to put? Such a setting there somewhere? Because when expoter database in the admin site archive for archive same time is not correct written....
Question: Put 20sec. Thanks for the advice... But time is still desirable to reconfigure... as confused then with the archives database. On the computer keeps remline time and the server substitutes another in the name of the archive....
Question: And where are servers? SchA on the server time (21:07:27 18.02.2017 ) although Kyiv time 19:07:27... And mono is generally such as to reconfigure ?
Answer:

on the server, Kyiv time

Sat Feb 18 19:15:01 EET 2017

Question: prescribed in the index file on the website a function that displays the time:echo date(`H:i:s d.m.Y`);Here`s what they shows in the top left corner before loading the entire page displays the server time...http://example3.businessumcha.com/
Answer:


please Check now.

Question: But now seems right. Only now I podstvol the time that was recorded before in B/D when adding and this time, too, now works correctly, although the idea should be the same which was recorded earlier.... Our database also because the value has not changed.... Or the value was written correctly just not the right vivadelli before?
Answer:

our database displays you another time?

Question: Checked. The value itself seems to record correctly not correctly displayed... Thanks for helping...
Answer:


ok

Question: So now in the admin site when you create a database backup, too, in the name of the archive that the time is correctly recorded... thanks again for the help.
Answer:

thank you for contacting the technical support


<< Previous