Category Archive:

Magento cannot log into admin locally

0

I manually installed an existing live site locally on my computer and was unable to log into the admin backend. when I would click the login button, I wouldn’t get an “invalid login” message or anything b/c it was correct. The URL would change to admin/index/index/key/xxxx and would just display the login form again.

I worked at it for hours and tried all the code changes in the Session object to no avail. I finally installed a fresh copy of magento locally and used their installer and I was able to log in. I noticed it was using the file system for sessions while the other existing site was using the database because it was being load balanced. I changed it to use the filesystem and that fixed the problem! Hope this will save somebody the many hours I spent on it.

Posted in: Development, Magento

Continue Reading

Zend Studio Magento Building Workspace Error

0

I encountered a very large project involving Magento and added it as a project to my zend studio. Zend studio would frequently hang with an error related to building workspace. As I suspected, the problem was related to running out of memory as this project is huge. I increased the memory available to Zend Studio with the below solution.

In the Zend Studio interface it is possible to monitor how much Java heap space is used by the application. To do so, enable the option Show heap status in the Zend Studio Preferences by going to Window | Preferences | General (in MacOS X go to Zend Studio | Preferences | General). The heap status now appears in the application’s status bar. If you see that you quickly run out of memory (for example during a project build) you should consider increasing the default Java heap size. This can be done in the file ZendStudio.ini located in the Zend Studio installation path. Search for the –Xms and –Xmx parameters:

Xms – The initial amount of memory to allocate for Java heap space.
Xmx – The maximal amount of memory that is allowed to be used for Java heap space.

These values can be increased, but be aware that you are limited by the physical RAM of the system. Even for very complicated projects 512M Xms and 1024M Xmx should be enough.

Posted in: Zend Studio

Continue Reading

TortoiseGit Setup Tutorial With GitHub

0

I’ve been using TortoiseSVN for years and thought installing and using TortoiseGit would be just as easy, but it wasn’t. The TortoiseGit website’s documentation and setup tutorial was very poor. I found this website as the best resource for getting TortoiseGit installed on your computer and working with your first repository on GitHub http://www.sparkfun.com/tutorials/165.

Posted in: Development

Continue Reading

Using recaptcha with Zend_Form

0

I was pleasantly surprised at how simple it was to integrate a good captcha solution with Zend_Form. Your form doesn’t have to extended a special object or anything; you just need to add a “captcha” element like so:

$this->addElement('captcha', 'captcha', array(
	'label' => 'Please Type:',
	'required' => true,
	'captcha' => array(
		'pubkey' => RECAPTCHA_PUBLIC_KEY,
		'privkey' => RECAPTCHA_PRIVATE_KEY,
		'captcha' => 'reCaptcha'
	)
));

Be sure to change or set the defined variables for public and private keys provided to you with your recaptcha account. You don’t have to do anything to validate if the user entered the correct letters in your controller as Zend has already taken care of that part for you. As long as you’re using Zend’s isValid() method like so:

if ($form->isValid($request->getPost())) {

Continue Reading

windows 7 command line switch drives

0

In command prompt we can switch from one drive to another drive by just typing the drive letter name suffixed with the character ‘:’

For example if you are working in C: drive and if you want to switch to E: drive just type ‘E:’ at command prompt and press ‘Enter‘.

Posted in: Development

Continue Reading