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

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.

Related

XAMPP Invalid authentication method set in configuration: ‘cookie’

I have read all the possible fixes for the above issue when trying to get XAMPP working. Nothing has worked and I need to find an answer to get it working for a college course.
I am running a Mac OS X 10.11.6 and downloaded the XAMPP version 5.6.40. Then I open http://localhost/phpmyadmin/ go to user accounts and change the root password on for local host.
Then I go to the file config.inc.php and change 'config' to 'cookie' and also change the password. Then I restart the servers try to log back in but it gives the above error message and doesn't let me enter credentials. Some students in my class have done it the exact same way and it has worked for them.
I have looked at and tried many possible fixes as I can but with no success.
If you are using
$cfg['Servers'][$i]['auth_type'] = 'cookie';
Then you can set the user and password to blank, as using cookie makes phpMyAdmin throw a login page where you are expected to enter the userid and password in the login dialog.
$cfg['Servers'][$i]['user'] = '';
$cfg['Servers'][$i]['password'] = '';
It would also be worth refreshing your browser cache after making this change.
Thats CRTL+F5
Dont forget to restart Apache after making this change

Cakephp randomly drops session

Recently I moved my cakephp site from a hosting service to an other. The page was working like a charm, but now I'm having the issue, that my sessions randomly drop.
I'm on a shared hosting service, so I changed cake's session defaults from php to cake, now my sessions are saved to my tmp/sessions folder. (but it wasn't working with php either)
Followed my session's way with Firebug:
When i log into the page, i have a Sessionid, and in the tmp/sessions folder i have the corresponding sess_{sessionid} file too.
After a few clicks on some pages (totally random) my sessionid changes and i'm "logged out".
The session file with which i've logged in, remained in the directory.
My session settings in core.php right now:
Configure::write('Session', array(
'defaults' => 'cake'
));
I'm using the 2.3.8 version of Cake.
Update:
Finally i found the problem thanks to Nick. I checked the Cakephp error files, and found out that i only got logged out, when i visited a page containing an element, which was not on the server ( eg a picture was missing). So i went to Firebug, and check what the Net tab says. On the new Host service i got a 404 Not Found response AND a new session id set in the response, whilst on the other servers i tested the page, i simply got a 404 Not Found. If i randomly generate links to not existing files like (domain/test.jpg) i get the same results.
Try these settings, in Firefox you can install the web develop extension, then you can view your cookie to see if it is all set correct.
Configure::write('Session', array(
'defaults' => 'php',
'cookie' => 'yourdomain',
'timeout' => 44640,
));
Check any components that you are using for whitespace (usually at the end of the file).
I came across this recently whilst helping a client with their existing CakePHP site, when logged in one particular page that called a component was killing $this->Session->read(‘Auth’).
There is a CakePHP shell that you can use to find whitespace.

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!

"Server Error" when users try to create a new account - Magento 1.7

I'm setting up our Magento 1.7 store, hoping to be ready for launch soon. I've noticed a problem:
When users try to create a new account, they fill out their info on /customer/account/create page just fine, then when they click submit, they get this 500 Error:
The website encountered an error while retrieving
http://example.com/customer/account/createpost/.
the account is actually created, however.
Similar deal on when users submit their email on the Forgot Password page, they press submit and get this:
The website encountered an error while retrieving
http://example.com/customer/account/forgotpasswordpost/.
no email is sent.
If you see this and know how to help with this prob, your advice would be much appreciated, truly.
In case it helps, we are using a theme, rather than default.
EDIT - (I was asked if I had checked server error)
My server errors show as this, for the above situations:
Forgot Password submit shows this error:
Fatal error: Call to undefined method Mandrill_API::addTo() in
D:\Magento\app\code\core\Mage\Core\Model\Email\Template.php on line
438
and
Create Account submit shows this error:
Fatal error: Call to undefined method Mandrill_API::addTo() in
D:\Magento\app\code\core\Mage\Core\Model\Email\Template.php on line
438
as well.
Here is 6 lines(437-442) of that Template.php file:
foreach ($emails as $key => $email) {
$mail->addTo($email, '=?utf-8?B?' . base64_encode($names[$key]) . '?=');
}
$this->setUseAbsoluteLinks(true);
$text = $this->getProcessedTemplate($variables, true);
[UPDATE]
I've learned that when I enter a random, fake email for Forgot Password, and press submit, a confirmation appears, saying something like "If this email exists, then a new email was sent to that email!", but when I submit an email of a real existing customer, then it gives me the 500 error I've mentioned.
Still nothing - if anyone out there sees this, and you have a bit of time to help solve this perhaps, may Talos bless you!
[SOLVED]
I turns out this was a problem with transaction emails.
Cause by an extension, Mandrill, which is added to magento when I installed the MailChimp extension, called "MageMonkey - MailChimp Integration by ebizmarts"
Once I enabled Mandrill, in config, advanced, all transactions and transaction emails work perfectly fine!
It's possible that it's a .htaccess or server configuration problem. Where is it hosted? Do you have a .htaccess file in the root of the installation?

Facebook SDK breaking Codeigniter? Blank page

I have tested my login script on my localhost with no problems.
I have now uploaded it online as can be seen at this link
Obviously if you click, you can see that a blank page is displayed and I have no idea why.
I did a test of a little bit of content, and removed the Facebook SDK code.
//Facebook config (required for library)
$fb_config = array(
'appId' => 'REMOVED',
'secret' => 'REMOVED'
);
//Load Facebook library
$this->load->library('facebook', $fb_config);
//SET FACEBOOK USER
$fbuser = array();
$fbuser = $this->facebook->getUser();
When the above code is not present, the page loads.
I have updated my app setting correctly, namely changing the site URL fro http://localhost to http://gua.com so i dont believe it is that.
I have even changed my CI settings to show all errors - nothing is shown.
Does anyone have any suggestions as to why the above code might be making a blank page load ONLY when it is hosted online?
Many Thanks
THomas
Open up the base_facebook.php and try removing either of these two lines from the top.
if (!function_exists('curl_init')) {
throw new Exception('Facebook needs the CURL PHP extension.');
}
if (!function_exists('json_decode')) {
throw new Exception('Facebook needs the JSON PHP extension.');
}
If you stop getting the white screen, it should indicate that your sever needs either curl or json_decode enabled.
Alternatively you could just do a echo phpinfo() and check if they are enabled. Note that json_decode/encode is only available in php >=5.2
If your localhost was a Windows box and your remote host is a *NIX system, there is a chance that some extra white space was introduced into your SDK files outside of the <?php ?> tags. This can sometimes cause the "white screen of death" when this whitespace is output and sets the headers.
Try downloading a fresh copy of the SDK from Github and don't unzip it until it is on your remote server. Better yet, if you ssh access wget it or git clone it directly there. See if that helps.
If it doesn't, add error_reporting(E_ALL) as the first line of your script and see if that tells you anything.
You will need to run chmod eg: "sudo chmod -R 777 facebook/". I think the files were written in or for windows so on a *Nix system it does not run till that is checked.
In my case after doing this, I started to have errors I could work with.

Resources