No data of logged users in Tracker by Antonio Ribeiro - laravel-5.6

Hello I am using Tracker by Antonio Ribeiro.I have search for answer but the ones that I found is not solving my problem. In the file Tracker.php, I have change 'user_model' => 'App\User' to my User model but still no data is shown in the stats panel. Thank you.

I forgot that I was working with local server. So I fixed it by removing the localhost IP in this block 'do_not_track_ips' => [
],

Related

Magento 2 admin loading very slow after redis configuration

I configured the redis on Magento 2.4.3. But after that my admin loading is very slow. When I debug then I found there in redis for session requests it is returning
"HINCRBY" "sess_llm5difqva5dpp955o4ansht8h" "lock" "1"
with multiple request that's why it is taking time to load in admin panel. Did anyone face this issue, if yes then can you please share the solution? On google I found one link https://github.com/colinmollenhour/Cm_RedisSession/issues/92 but there is no solution for it.
In your
app/etc/env.php
at array session[redis][disable_locking] is 0 ('disable_locking' => '0',)
it should be 'disable_locking' => '1'

SwiftMailer with Gmail SMTP suddenly stopped working: Connection could not be established with host smtp.gmail.com [ #0]

I have several websites that use SwiftMailer with Gmail. I haven't touched any of these sites' code, and suddenly all of them no longer work, resulting in Fatal errors: Connection could not be established with host smtp.gmail.com [ #0]
I've searched all over the internet for what may cause this, tried several solutions, but nothing works. Does anyone know if something either changed on Gmail's end (they no longer allow me to connect?) or what else could have happened?
Some things I tried:
open ports on server router (465 for SSL) - didn't help
disable firewall on server - didn't help
try the IP-address of smtp.gmail.com in stead of the domain name, using ping to find out the IP - didn't help
changing settings in the SwiftMailer program (setting certain verification options to false) - didn't help
I know this isn't a very concrete coding question, but I haven't changed anything to my code so the problem literally cannot be in my code. I'm just hoping someone knows what changed 2-3 days ago, and what I need to do to make SwiftMailer work again.
Note: the Gmail accounts' passwords or account security settings such as 2-step verification and sorts also didn't change. Also, using a different SMTP such as the one from GMX.net, the script still works just fine!
Strange hm?
I had the same issue today. I succesfully tried the workaround mentioned in this web.
Something has been changed in Gmail config. I will try a better solution but in the mean time will use this workaround.
Hope it help.
https://github.com/swiftmailer/swiftmailer/issues/544
You could disable the SSL check by modifying the function
"_establishSocketConnection" in StreamBuffer.php. Add these lines
before stream_socket_client command:
$options['ssl']['verify_peer'] = FALSE;
$options['ssl']['verify_peer_name'] = FALSE;
I would highly recommend you look into the logging plugin.
https://swiftmailer.symfony.com/docs/plugins.html#logger-plugin
It is likely to be already installed so all you need to do is follow the instructions in here and if you run the logger it will give you reasons why the email is failing.
While Toni's solution works it requires fiddling around with vendor source which is not ideal. You can also set the stream options programmatically in your code, where you use the swiftmailer $mailer instance, e.g.
$transport = $mailer->getTransport();
if($transport instanceof \Swift_Transport_EsmtpTransport){
$transport->setStreamOptions([
'ssl' => ['allow_self_signed' => true, 'verify_peer' => false, 'verify_peer_name' => false]
]);
}

Session not persisting on shared hosting - Laravel 4.2.17

I have a problem with the sessions on the shared hosting.
I developed an app on a local server (XAMPP) and it works great (sessions, auth etc). The problems have appeared when I moved the app on a shared hosting.
I realized that the sessions are not persisting from a page to another or from AJAX files to another page and the Authentication does not work either .
The only session that persists is the _token which has a different value after every refresh of the page.
I have the following configuration in the session.php file:
'driver' => 'database',
'lifetime' => 120,
'expire_on_close' => false,
'lottery' => array(2, 100),
'path' => '/',
'domain' => null
First, I used file driver and I had the same problem, and now I used the database.
Both file and database work on the local server but on the shared hosting they do not.
I tried all the solutions found on the forum but still I have the same problem.
I think the problem is at the session domain setting because when I change the value from null to other string on my local server, I have the same problem that I have encountered online.
Can you help me, please!
Thanks, Mirel
I fixed the problem. In my case the error because I have added a php closed tag ?> in the end of the included files. So removing this tag will bring the application back to normal behavior.

Can't login into magento 1.8.1.0 on localhost on wamp server using correct username and password

I have fresh installed magento 1.8.1.0 on localhost with wamp server. Everything has been installed correctly but when i login into the login page with correct username and password it opens the same login page and not get into dashboard page.
I had read a lot of threads saying to make changes in variens.php by opening Go to app/code/core/Mage/Core/Model/Session/Abstract/Varien.php file within your magento directory.
When i open app/code/core/ i can't find mage folder in core folder.
Please help how can i fix it?
thank you
kamaldeep singh
I don't have the folder mage inside the app/code/core. But i read some thread and made changes using 127.0.0.1/mymagento/index.php/admin in address bar by editing my C:/Windows/system32/drivers/etc/hosts it went to dashboard page
And appears error on dashboard
Fatal error: Maximum function nesting level of '100' reached, aborting! in C:\wamp\www\mymagento\lib\internal\Magento\Framework\Code\Reader\ClassReader.php on line 77
i checked classReader.php on line 77 but there is no line related to nesting level to edit.
When i refresh the dashboard page it opens the login page. when i try to login with correct username and password it opens the same login page and no error like invalid username or password.
If you don't have the Mage folder inside app/code/core your website should not work at all. That folder is essential to run Magento. Check again.
About your problem, do you get any error (wrong username, password, etc.)?
Do you mean a customer cant login, or you cant log into the backend, there is an existing issue with customer login depending on the version of magento you might be using.
find : app/design/frontend/(themepackage(/(theme)/template/customer/form/login.phtml
under
<ul class=”form-list”>
paste in
<input type=”hidden” name=”form_key” value=”<? echo Mage::getSingleton(‘core/session’)->getFormKey(); ?>” />
And in app/design/frontend/(themepackage(/(theme)/template/persistent/customer/form/login.phtml
Apply the same changes.
Clear cache.
Customers should then be able to login.
Resource
Does it says that username or password is wrong or only refreshes the page without any error messages? If there are no errors then try to delete cookies for your host and then login again. Usually it helps.
Are you using chrome? If so, try Firefox. Another option might be to use 127.0.0.1/... instead of localhost/...
In your magento installed folder, go to app/code/core/Mage/Core/Model/Session/Abstract/Varien.php And comment out the lines 96 to 112 in v1.9. Lines may differ due to version. Look for lines that looks like this below:
// session cookie params
/** $cookieParams = array(
'lifetime' => $cookie->getLifetime(),
'path' => $cookie->getPath(),
'domain' => $cookie->getConfigDomain(),
'secure' => $cookie->isSecure(),
'httponly' => $cookie->getHttponly()
);
if (!$cookieParams['httponly']) {
unset($cookieParams['httponly']);
if (!$cookieParams['secure']) {
unset($cookieParams['secure']);
if (!$cookieParams['domain']) {
unset($cookieParams['domain']);
}
}
}
**/
Have fun :)
If you have this problem on non FireFox browser(s), use FireFox to execute this action below and try login in with your non FireFox browser(s) again to confirm. I had this issue with Chrome.
Go to System > Configuration > Web > Session Cookie Management. And change Use HTTP Only from YES to NO.

localhost to 127.0.0.1 as default

I am trying to use Magento on a localhost, but when I try and log in to the admin area the screen just refreshes.
In the address bar it was localhost/magento/.......(etc). When I changed it to 127.0.0.1/magento/.......(etc) it allowed me in. When I click on one of the buttons in the admin area it goes back to localhost/magento/......(etc) and I am once again faced with the login page.
How and where do I alter the setting the settings so the 127.0.0.1 is used as default rather than localhost.
Finally after seven hours of playing about with suggestions and re-installing I have fixed it, for those with the same problem i will share what I did.
I am using Magento 1.7.0.2. Apparently there is an issue regarding cookies when you install Magento on windows as it was designed for linux system. So you need to sort the cookie issue. To do this open your Magento folder and go to app>code>core>mage>core>model>session>abstract varien.php at lines 85-92:
// session cookie params
$cookieParams = array(
'lifetime' => $cookie->getLifetime(),
'path' => $cookie->getPath()
//'domain' => $cookie->getConfigDomain(),
//'secure' => $cookie->isSecure(),
//'httponly' => $cookie->getHttponly()
);
change the code to this.
Apparently there are other issues such as php curl, I did not come across these but the following tut:
http://ecommercedeveloper.com/articles/1419-tutorial-avoid-two-problems-installing-magento-on-a-localhost/
covers it. Also that's where I got the information from, however the code in the version I'm using is slightly different from that version.
If you want to change loaclhost to 12.0.0.1 do following.
If you have database access go to "*core_config_data*" table and there change "web/unsecure/base_url" and "web/secure/base_url" to 127.0.0.1 instead of localhost.
Otherwise you can use the solution provided by tony09uk.
on OS X I found a simpler way - I am using MAMP running 127.0.0.1:8888, the default for MAMP installs.
Just set your /app/etc/config.xml line that says localhost to 127.0.0.1
delete var cache and session contents
clear cookies in browser
this now lets me login to the dashboard from the admin login screen.
If you have database acces open table: core_config_data
Do a search for: SELECT * FROM core_config_data WHERE path LIKE '%cookie%'
change: cookie_domain & cookie_path to = ""
(empty string).
Login once again to the admin panel. fixed!

Resources