Error 500 after login to admin - magento

I have my url set to www.YourDomain.com/store and log in via www.YourDomain.com/store/index.php/admin or www.YourDomain.com/store/admin in to the dashboard but whe I log in the first time I always get a internal server error . Once I refresh I have no issues till I would say the next session
Any one has a suggestions how to fix this ? I don't have the issue on my Local
TX
C

Increase the memory limit from .htaccess file. Thats the main issue may be. check for this variable in .htaccess in magento root php_value memory_limit

Related

Magento session reset on every request

I have a very critical issue with my Magento store. The session gets reset on every HTTP request, for example if I refresh the homepage it creates a new session.
Initially I thought it was from the php.ini settings but I set session.cookie_lifetime = 86400 ni my php.ini file and from magento backend as ewll. Then I also moved the session from files to db to try and resolve the problem but it keeps creating new sessions on every request. As a result of this I can't add any items to the cart or do anything else because my session gets destroyed every time.
I solved this issue by enabling "Use SID on Frontend" in 'system->web->session validation settings'.
Hope the following will helps you.
https://magento.stackexchange.com/questions/385/cart-dropping-all-items-cart-session-clears
I found the issue and located it in this file:
app/code/core/Mage/Core/Model/Session/Abstract/Varien.php
In order to fix it more elegantly one should override the specified file in the local code pool insted of modifying the core directly. Like below:
app/code/local/Mage/Core/Model/Session/Abstract/Varien.php
Also for the above to work php.ini setting session.cookie_secure must be commented or set to 0.
Make sure to check your php.ini
I had a similar problem and noticed that the .ini was trying to set a different save path for the sessions then Magento.
In short edit php.ini and comment out the save_path and cookie_secure:
;session.save_path =
;session.cookie_secure =
I'm sure there is a way in Magento to set the secure cookie param, as I would not want to suggest anything that maybe a security risk.
Then restart php or apache

Magento Admin Backend Blank Page after login

i have a serious problem in Magento Admin Backend. After login its shows a BLANK Page. i used the same files and database in different server, there it was working fine but when i have transferred files into LIVE then Admin issues came. Please help me over this as i got frustrated from last some dayz. If you need any more dertails then plz ask but i need to resolve this soon. Link: http://studywings.com/index.php/admin/
Magento ver: 1.7
flush your magento root /var/cache folder and /var/session folders, It may have previous server session that may cause problems.
Otherwise disable all third party modules and try again. I think this will help
I had the Same problem,
i have also debug the any errors occured, i tried index.php file
ini_set('display_errors', 1);
error_reporting(E_ALL);
$_SERVER['MAGE_IS_DEVELOPER_MODE'] = true;
pleced above code in index.php file. after that i have tried admin login.
showing the errors are session related, header already send errors.
i have to add the code in root/index.php file in top add the following line.
ob_start();
after that tried the login its worked.
Cheers..!
Is url changes to this after click login button or not?
http://yourdomain.com/index.php/admin/index/index/key/(key value)/
if url changes but not not show the dashboard page then go to
app/code/core/Mage/Core/Model/Session/Abstract/Varien.php
make copy of this file
Find the code for setting session cookie parameters these started on line 77
Comment out the final three lines and be sure to remove the comma after $this->getCookie()->getPath(). You should end up with this:
// set session cookie params
session_set_cookie_params(
$this->getCookie()->getLifetime(),
$this->getCookie()->getPath()
// $this->getCookie()->getDomain(),
// $this->getCookie()->isSecure(),
// $this->getCookie()->getHttponly()
also line 104 comment out :
//call_user_func_array('session_set_cookie_params', $cookieParams);
If there is no change in url after click login then try to uncomment display error and see error_log file of your server
I think this problem is due to file permissions. As you added files from one server to another, permissions might be get changed.. Try to give the permissions to all the files. Check this http://www.mage-shop.com/forum/threads/3-Magento-Admin-Backend-Blank-Page-Error
There are a number of things that can cause it, but it's most common after migrating to a new server, last time it happened to me it was an excessively low php memory_limit setting on the new server - the Admin part of the site uses a lot more resources per user than the frontend.
In general when having this issue:
Flush out your cache by emptying var/cache
Clear out sessions by emptying var/sessions
Check the magento error logs/reports for an error code in var\logs and var/reports
Turn on magento error logs in mysql if logging isn't already on! (look in core_config_data for WHERE path like 'dev/log/active'
Check if your php configuration is displaying errors
Check your apache/php error logs for more clues - memory errors will show up here for example
Try this solution
It sounds like you want to enable Developer mode. Add this to your .htaccess file:
SetEnv MAGE_IS_DEVELOPER_MODE "true"
You may also want to enable display errors in index.php:
ini_set('display_errors', 1);
The best way I have found to debug is with X-Debug in a local environment. You can also use log files to help debug in a production environment, if your unable to run X-Debug in the environment.
I've got a more detailed posting here:
http://www.molotovbliss.com/debugging-tips-and-tricks-with-magento-commerce
Consider also installing XDebug
Hope this helps you!
Just to complete the other answers....
I am upgrading a magento install, and got the same problem, in the end I had another folder inside of var/
magento/var/minifycache
Only worked after clear deleting the files inside of this folder.
I had the same problem after uninstalling an extension. I thought that clearing cache would be enough, and I did without success... later speaking with the technical team, they commented me that it did not work because I hace memcache installed, and needed to be done the cleaning via system - backend (that i coudl not see...)

Magento has a redirect loop

My Magento web site home page has a redirect loop error. When I try to open it it goes to my old server url and gives the error:
The webpage resulted in too many redirects. Clearing your cookies for this site or allowing third-party cookies may fix the problem. If not, it is possibly a server configuration issue and not a problem with your computer.
When I try to go into admin it takes to me old server admin url without any error.
I down loaded the fresh data base and connected my store to that it works fine but when i connect it my old data base it give same error.
Please advise me.
This isn't an ideal solution, but I was having issues with Magento 1.9.x.
The setup was: Nginx Proxy & SSL Terminator => Apache Webserver
No matter what I did enabling SSL caused a redirection loop. I narrowed the issue down to Magento rather than the Nginx configurations.
It was like Magento didn't know it was receiving a secure connection from Nginx even though the correct headers were set.
The dirty solution was to add some code to the very bottom of index.php within the magento root directory (ie. /var/www/magento) just before the Mage::run... line, like so:
if( isset($_SERVER['HTTP_X_FORWARDED_PROTO']) ) {
$_SERVER['HTTPS'] = 'on';
$_SERVER['SERVER_PORT'] = 443;
}
Mage::run($mageRunCode, $mageRunType);
Wrong permissions can also cause this to happen. So in addition to truncating the var/cache and var/session folders, go ahead and make sure that you have the proper permissions on the app, skin, and includes directories, sub-directories and files. I believe the suggested permission setting is 644. You can do this with a proper FTP client such as FireZilla.
Go to table core_config_data
Update these value to be your localhost url(or whatever url you are providing while installation):
web/secure/base_url //(new url)
web/unsecure/base_url // (new url)
Empty the var folder.
I got it fixed.
I manually deleted my cache i was unable to login in my amdin and it get fixed
My issue was Cloudflare, put it in Development mode and it worked. It was cache related.
Issue: ERR_TOO_MANY_REDIRECTS - redirected you too many times
This issue is related cookie domain name.
For ex: if you already installed Magento 2 in www.example.com, and now you change magento base path to sub domain path like www.subdomain.example.com means, then you need to update your cookie domain entry inside of core_config_data table. You cannot access magento 2 backend so you can use following query to check record exist else use insert query.
SELECT * FROM `core_config_data` WHERE `path` REGEXP 'cookie_domain'
if record exit then update subdomain.example.com to the value column.
else
INSERT INTO `core_config_data` (`scope`, `scope_id`, `path`, `value`) VALUES ('default', 0, 'web/cookie/cookie_domain', 'subdomain.example.com');
Then flush cache using command php bin/magento cache:flush
Refresh magento 2 admin, now you can access admin. try this. thanks.
Note: if you are not using cookie domain, then don't configure this settings, if you configuration wrong then also you can face this error, so to fix that error update value to default configuration.
I had the same issue and after reloading and reloading my page I noticed that the error message responded to www.mydomain.tld and sometimes to mydomain.tld. I'm using Plesk on the server and I remembered that I set the Domain to always be called without www. I just changed that to none in the hosting settings of the domain. Lucky me, that solved that issue. Hope that helps someone else.

Magento install stops creating database

I've tried win xp and 7
Apache 2.2.19
php-5.3.6 (tried php 5.1.x)
Mysql 5.1.44
The install process runs ok until the database creation screen.
After 1 minute, the process stops at:
http://127.0.0.1/magento/index.php/install/wizard/installDb/
with a BLANK page
The database has only 199 tables (sometimes stops with less tables)
If i refresh the webpage, sometimes more tables are created, but then i get a database error.
Tried to IMPORT the database manually and start the install, but i get an error at the same step!
Also retried the install (deleting the cached data in the Magento folder).
What am i doing wrong?
thanks.
I used to get the same behavior. Other observation is you do not get the blank screen if you are running installation wizard while magento sample data imported to the database.
I did some googling and find the following poge which resolved my issue.
http://www.magentocommerce.com/boards/viewthread/76240/
that is modify apache httpd.conf and add following lines:
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
I would suggest trying to install via the Command Line Interface:
http://www.magentocommerce.com/wiki/groups/227/command_line_installation_wizard
Open the index.php file (at the root) and write the following line at the top
<?php
set_time_limit(0);
?>
Empty the tables in your database and try again. The white page appears because the script times out and when you refresh that same page Magento gives you an error page where it says the table already exists. The SQL script which creates the tables in the database does not check whether the table exists in the database or not.
A blank screen in PHP is a strong sign of running out of memory. Check the memory limit according to the requirements and then maybe add a bit more too.
Change the name localhost file
with any www.example123.com in
c:\Windows\System32\drivers\etc\hosts
and add
127.0.0.1 www.example123.com
after wards follow these steps through this torrent link.
http://tinyurl.com/3r6dpop
After installing some images may not upload so even uploaded the books.
I got blank screen too, and the following error:
[09-Feb-2012 15:27:43] PHP Fatal error: Maximum execution time of 30
seconds exceeded in D:\creation\software
developer\projects\magento\document root\lib\Zend\Db\Statement\Pdo.php
on line 228
I'm pretty sure, that you have execution timeout too...
You have to setup your php.ini, and increase the max_execution_timeout, and in the iis manager you have to increase the fastcgi request and activity timeouts too.

Problems in installation of magento on wamp

Hello guys can anyone help me with the issue im having with installation of magento.
my problem is that i have downloaded the magento on wamp and during my installation i got the error and the msg it si giving is FATAL ERROR : Maximum execution time of 60 sec exceeded in
c:\wamp\www\magento\lib\varien\db\adapter\pdo\mysql.php on line 276. plz provide me with the solution any one coz im stuck on this for long enough thanks in advance
Modify your php.ini with this setting:
max_execution_time = 1800
I also modify the memory limit allocated to php when using Magento
memory_limit = 512M
Alternatively you can edit index.php, if you don't have php.ini access.
ini_set('max_execution_time ', 1800);
The exact resolution is as below
This is not an apache or php timed-out message. It really means that the mysql engine timed out. So we will give the mysql some more time to wait until it reports that the operation failed. To make this happen, lets go ahead and change the line with value
mysql.connect_timeout = 60
to
mysql.connect_timeout = -1
in the php.ini file and it will do the trick. The value -1 means unlimited seconds to wait before the mysql connection times out.
HI,
I had the same problem. None of the solutions provided above helped me.
What I did was change both the max_execution_time and max_input_time to 1800. This worked for me. I was able to then get Magento installed.
Change the value of max_input_time in php.ini to a safest value; time is expressed in seconds. Do give a try of 1800
max_input_time = 1800
You would get it worked
If its giving you the same error then it means that you have not changed the settings in php.ini file.
In windows if you install wamp you will have, php.ini in php folder and apache folder.
Make sure that you have modified in both files and restart your server. (I know its strange)
Try 1
Browse wamp's root folder and click on phpmyinfo link under tools section. This will give you the information of your php installation and settings.
look for "Loaded Configuration File", there you will have the location of your exact php.ini file that is used in your wamp installation.
Try to update the Max_execution_time in that file. Hope this will solve your problem.
Usually, you will not get problems like this.
Try 2
May be your antivirus is stopping the request to execute for more than 60 seconds, just trying stopping your anti-virus for a moment and check another time.
I hope this will solve your problems.
I got the same problem, as suggested I did the following changes.
(wampserver-path)\bin\apache(Apache Version)\bin\php.ini - Set the
value max_execution_time = 1800
(wampserver-path)\bin\php(PHPVersion)\php.ini - Set the value
max_execution_time = 1800
But it didn't work. Then I made the next change
In the host/(path-to-magento)/index.php, just after the opening <?php
tag, added the following. set_time_limit(1800);
<?php
set_time_limit(1800);
//** Other bunches of code
?>
Then tried to install a fresh copy. It worked! Hope this helps...

Resources