Posts tagged magento

magento_logo_3533

Magento – Reset Password – Your Password Reset Link has Expired – No Mail Server Access to Outside

1

If you are working with Magento in a dev environment, it is a good chance that you don’t have an email server set which will access your @gmail.com email address. What I did to get around this is I would click the ‘forgot password’ link via Magento UI, then go into ‘/var/spool/mqueue’ where the email message is stored to be sent. I would then view the contents of the email to get the token needed to reset the password, and append it to the url so it looks like this: http://your.devenv.local/index.php/admin/index/resetpassword/?id=3D1&token=3Dfb17a3b930ae0699f003575461cb9542, but you need to be sure you remove the ’3D’ from the id and token params, otherwise the values are invalid. Once you do, you should be able to access the reset password form and reset your passwords.

Linux Logo

Linux – CentOS – Install Mycrypt

0

I have been working with Magento and came across another hurdle. Magento requires the mycrypt PHP module to be compiled, otherwise you will not be able to complete the install process. So naturally I opened up a terminal and typed `yum install mcrypt` only to find that no such libraries existed. Apparently, the default repos don’t provide the mcrypt libraries any more, so I had to use the EPEL repo, which does provide access to the required mcrypt libraries.

The following steps outline how I successfully installed mcrypt libraries on my CentOS (6.x) system:

Localize EPEL Repo

rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-5.noarch.rpm

To verify that it was installed correctly, you can type `$ -> yum repolist`

Disable EPEL Repo

I don’t like not knowing what is installed on my system, as such I didn’t want to keep the EPEL repo enabled by default. Rather, I preferred to tell YUM to use EPEL only when I directed it to do so. In order to accomplish this, you need to make the following changes:


# /etc/yum.repos.d/epel.repo

enabled=1

# to

enabled=0

Now, the EPEL repo will not automatically be considered when you go to install a new package. Convenient for ensuring your system stays as “vanilla” as possible.

Install Mcrypt

 $ -> yum install libmcrypt libmcrypt-devel mcrypt --enablerepo=epel

The libmcrypt-devel libraries are only necessary if you are going to install the PHP mcrypt module.

The above command will install the mcrypt libraries as provided by the EPEL repo.

Configure PHP

Now that we have mcrypt installed on our system, we can compile the PHP mcrypt module, first lets find out where mcrypt was installed:


$ -> which mcrypt

/usr/bin/mcrypt

Now that we know where mcrypt is installed we can add the following flag to our PHP configure for compilation: –with-mcrypt=/usr/bin

After configure be sure to run make, and make install, after they are complete you should be able to `php -m` and see mcrypt as a compiled module.

magento_logo_3533

Magento – Unable to Connect to Database

0

Just spent 30 minutes fighting the magento GUI installer, which kept giving me a ‘unable to connect to database’ error. Only after trying a multitude of config permutations did I realize that I had to put a valid hostname (not localhost) into the hostname textbox (even though I could connect to localhost via command line). Before entering a hostname into the textbox, be sure the hostname is in accessible (either via DNS or /etc/hosts). Good luck.

phpLogo

PHP – Magento – Zend – Missing Hash Function

0

When it comes to manually configuring compiled applications on my systems, I am a minimalist, meaning that I always try to get away with the bare bones settings. Once in a great while this will come back to haunt me. In starting up a new project, I came across an issue where the Magento install process was throwing a fatal error regarding a ‘hash’ function (Zend Framework actually needed it). So I had to recompile with `–enable-hash` setting. Be sure to run a make clean before configure, otherwise your new setting won’t be picked up.

Go to Top