Programming Tutorials

Password must include both numeric and alphabetic characters - Magento

By: Emiley J in PHP Tutorials on 2014-02-08  

While installing a fresh Magento installation, some users are stuck at the 'Create Admin Account' step, with this error: 'Password must include both numeric and alphabetic characters.'. Follow this simple step to resolve this issue.

The reason for this error is in the following code in the file app/code/core/Mage/Admin/Model/User.php

if (!preg_match("/[a-z]/iu", $this->getNewPassword()) 
|| !preg_match("/[0-9]/u", $this->getNewPassword()) 
) { 
$errors[] = Mage::helper("adminhtml")->__("Password must include both numeric and alphabetic characters."); 
}

The preg_match() function is the culprit. It fails because the PCRE extenion in perl is not installed properly. This can be easily resolved by running the following command in your linux

yum install pcre
#if yum doesn't work use apt-get (depends on your linux variant)





Add Comment

* Required information
1000

Comments

No comments yet. Be the first!

Most Viewed Articles (in PHP )

PHP code to write to a CSV file from MySQL query

Different versions of PHP - History and evolution of PHP

PHP code to import from CSV file to MySQL

Send push notifications using Expo tokens in PHP

A Basic Example using PHP in AWS (Amazon Web Services)

Encrypting files using GnuPG (GPG) via PHP

PHP Warning: Unknown(): Unable to load dynamic library '/usr/local/php4/lib/php/extensions/no-debug ......

Decrypting files using GnuPG (GPG) via PHP

Parent: child process exited with status 3221225477 -- Restarting

Error: Length parameter must be greater than 0

Password must include both numeric and alphabetic characters - Magento

Convert a hex string into a 32-bit IEEE 754 float number in PHP

Convert XML to CSV in PHP

PHP file upload prompts authentication for anonymous users

Reading word by word from a file in PHP

Latest Articles (in PHP)