How to fix the “Illegal scheme supplied, only alphanumeric characters are permitted” Magento error on Localhost using HTTP (fresh install)

In: Feeling guru|Techie Daw

1 Nov 2011

I want to setup a development environment for the Mage Enabler for WordPress plugin in my new desktop so I downloaded the latest copy of Magento Community Edition which is version at the time of this writing. I used the sample data provided from the Magento download page and used all the default values.

Magento Installation Wizard

Everything went well during the installation except when I access the frontend (http://localhost/magento) and admin (http://localhost/magento/admin), I was greeted with the default error page like the one below:

The page itself is not helpful so I decided to check the content of the error log (htdocs\magento\var\report) record number 1742231029 which contains the following information:

a:5:{i:0;s:67:"Illegal scheme supplied, only alphanumeric characters are permitted";i:1;s:681:"#0 C:\xampp\htdocs\magento\app\code\core\Mage\Core\Model\Store.php(712): Zend_Uri::factory('{{base_url}}')
#1 C:\xampp\htdocs\magento\app\code\core\Mage\Core\Controller\Varien\Front.php(313): Mage_Core_Model_Store->isCurrentlySecure()
#2 C:\xampp\htdocs\magento\app\code\core\Mage\Core\Controller\Varien\Front.php(161): Mage_Core_Controller_Varien_Front->_checkBaseUrl(Object(Mage_Core_Controller_Request_Http))
#3 C:\xampp\htdocs\magento\app\code\core\Mage\Core\Model\App.php(349): Mage_Core_Controller_Varien_Front->dispatch()
#4 C:\xampp\htdocs\magento\app\Mage.php(640): Mage_Core_Model_App->run(Array)
#5 C:\xampp\htdocs\magento\index.php(80): Mage::run('', 'store')
#6 {main}";s:3:"url";s:19:"/magento/index.php/";s:11:"script_name";s:18:"/magento/index.php";s:4:"skin";s:7:"default";}

As you can see, the cause of the error is the invalid config data format being passed during the start of a session. To fix this, we need to accomplish these tasks:

  1. Allow the admin panel to run on localhost by disabling the domain check.
  2. Fix the config data value.

Allow the admin panel to run on localhost.

You will need to follow the instructions in my previous post but instead of using HTTP, you must access the admin page via HTTPS after you applied the code changes.

Fixing the config data value.

Once you are able to access the admin panel using HTTPS, go to System > Configuration > General > Web. Make sure that you supply the proper value for the Base URL on both Unsecure and Secure tabs then save the changes. See my example below:

Clear your browser’s cache and also Magento’s cache by deleting all the contents (not the folder itself) of the cache directory (htdocs\magento\var\cache). At this point, you should be able to access the frontend and admin panel using HTTP protocol.

About the author

Richard Feraro is a Magento Enterprise Certified developer from Manila, Philippines with 14 years of solid open-source development experience using Linux, Apache, MySQL & PHP.

7 Responses to How to fix the “Illegal scheme supplied, only alphanumeric characters are permitted” Magento error on Localhost using HTTP (fresh install)



November 4th, 2011 at 3:55 am

I did the code change as you mentioned in your “previous post” but im not able to login using https. This might be because I did not enable SSL during installation.
Now I get Illegal scheme error on opening frontend as well as backend. Is there a way to enable SSL without admin page or do I have to install the damn thing again?


Richard Feraro PHILIPPINES

November 4th, 2011 at 7:03 am

What is your error when logging in to admin using https?



January 15th, 2012 at 2:01 am

Gr8 fix man. Worked Perfectly!


Richard Feraro

January 15th, 2012 at 7:52 am

Thank you 🙂



March 6th, 2012 at 7:20 pm

run installation Magento in MOZILLA FIREFOX
And without problems


Mohammad Raihan Mazumder INDONESIA

November 26th, 2013 at 2:49 pm

I’ve got this problem on my web hosting. not a local host. How to solve it over there. I cant login my admin (



August 5th, 2015 at 9:11 pm

It surely works in Ubuntu. Man, you saved me!
Thank you so much 🙂

Comment Form

About my blog

This blog is targeted towards all levels of developers and also designers. Various topics are discussed such as Magento, PHP & MySQL, jQuery, WordPress, CSS and HTML.

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 24 other subscribers

WordPress + Magento

Recent Trackbacks



All entries in this blog are my opinion and don't necessarily reflect the opinion of my employer or my mom.