0

We just upgraded to PHP 5.3 on our test server to start using the Magento SOAP API. Our PHP 5.2.14 did not have PHP SOAP library installed.

I found that short_open_tags was off and the error logging was not turned on and made changes.

However, I cannot login to my Magento admin. It just spins for a second and then goes right back to the admin login page. No errors or exceptions thrown, no PHP errors logged.

I've made sure TZ was synched, /var/cache directory empty, /var/session directory empty, web/cookie config_data values correct, cleared browser cookie data...

I don't know where else to look or what else to do. Any ideas?

Updating things done:

Even though the config_data says that the time zone is America/Chicago, the code below placed in the adminhtml/login template shows this result:

UTC 08-02-2012 09:40:48 PM

Here's the code used:

echo date_default_timezone_get()."<br />\n";
echo date('m-d-Y h:i:s A');

Same code run from a separate PHP script returns this when run 3 secs earlier:

America/Chicago 08-02-2012 04:40:45 PM

Made changes to /store/app/Mage.php and /store/app/code/core/Mage/Core/Model/Locale.php to set TZ to America/Chicago and the admin login page now says

America/Chicago 08-02-2012 04:44:41 PM

but still no login.

MB34
  • 4,210
  • 12
  • 59
  • 110
  • This type of question doesn't really belong on Stack Overflow, as it's not a programming question. You should take a look at http://area51.stackexchange.com/proposals/25439/magento and see about getting a proper place to put these kind of questions. – Sturm Aug 02 '12 at 18:01
  • Then why are there 7 other questions with almost the same subject matter? – MB34 Aug 02 '12 at 18:02
  • This has nothing to do with the server, it is Magento with the problem. – MB34 Aug 02 '12 at 18:03
  • It also has nothing to do with programming, where would you like me to send you to? – Sturm Aug 02 '12 at 18:04
  • If you'd care to link those 7 other questions, I'd also gladly flag those as well. It's nothing personal, but this question does not belong on this site. – Sturm Aug 02 '12 at 18:04
  • If you're being redirected, something will be logged *somewhere*. Is your logging enabled for Magento? Can you verify that you can post to the Magento log, and it creates the log correctly? – Zachary Schuessler Aug 02 '12 at 18:45
  • @paperids There's a fuzzy line between Magento questions and programming questions. Diagnosing many, if not all, problems with Magento requires knowledge of the custom programming framework it's based on. – Alana Storm Aug 02 '12 at 18:48
  • @AlanStorm I suppose I won't argue that. If you take a look at the answers to this question however, what do you see that is within the scope of stackoverflows FAQ for asking questions? The answers are not programming related so it's safe to assume that I'm not the only one who could say that this is definitely off topic for stackoverflow. – Sturm Aug 02 '12 at 19:07
  • http://stackoverflow.com/questions/11683129 http://stackoverflow.com/questions/9501108 http://stackoverflow.com/questions/9075539 http://stackoverflow.com/questions/5892893 http://stackoverflow.com/questions/4036384 http://stackoverflow.com/questions/9555484 – MB34 Aug 02 '12 at 19:46
  • @Zachary - how would I be able to enable logging if I can't access the BO? – MB34 Aug 02 '12 at 19:46
  • You could run this on your db to turn on logging: update core_config_data set value=1 where path = 'dev/log/active'; – Nate Aug 02 '12 at 23:45
  • I set the dev/log/active to 1 and still get no logs produced. Any other ideas? – MB34 Aug 03 '12 at 21:18
  • Could you please tell me, how did you upgrade the PHP? Which OS you are using? – Oğuz Çelikdemir Aug 03 '12 at 21:50
  • Also, did you check mcyrpt PHP 5.3 version installed as well? Mcrypt does not installing default PHP installation due to the licensing issue. – Oğuz Çelikdemir Aug 03 '12 at 21:56
  • Is Mcrypt required, it shows as installed in phpinfo()? OS is SuSe. My Network admin did the upgrade. – MB34 Aug 03 '12 at 22:14
  • yes, required. My guess, there is a upgrade problem. Though its just a guess. Check app/code/core/Mage/Install/etc/install.xml file, it should be mcrypt line! – Oğuz Çelikdemir Aug 04 '12 at 00:18
  • Jerk offs closed the question, will move it over to ServerFault because the stuck up a-holes here can't see that it is Magento related. – MB34 Aug 06 '12 at 13:49

2 Answers2

3

If your admin login attempts are failing without an error being shown it almost always points to a problem with session handling.

Either

  • a cookie can't be set
  • PHP can't start a session
  • the server's time is incorrectly synchronized resulting in cookies that instantly timeout
  • the domain magento is using to set the cookie doesn't match the domain you're using to access the site (check the core_config_data table for domain names and clear your cache),
  • you're accessing the site via a localhost domain, and running into one of the many browser bugs around cookie setting and localhost domains.

Good luck!

Alana Storm
  • 164,128
  • 91
  • 395
  • 599
  • The adminhtml cookie IS getting set with 1hr expiration. Sessions files ARE created in the /var/session directory. config_data for cookies IS correct. Cache has been cleared. Not localhost. Anything else? – MB34 Aug 02 '12 at 19:39
  • Also, I can log in to admin here with no problem: http://demo-admin.magentocommerce.com/index.php/admin/ – MB34 Aug 02 '12 at 20:04
1

Have you double checked all of your base url values?

Nate
  • 578
  • 2
  • 8