Magento Forum

   
Page 1 of 2
Illegal scheme supplied, only alphanumeric characters are permitted
 
WebsiteNI
Jr. Member
 
Total Posts:  7
Joined:  2011-02-02
 

After running the install it says I’m all set but clicking either of the buttons to go to front end or back end give me the following:

Illegal scheme supplied, only alphanumeric characters are permitted

Trace:
#0 /home/artsandc/public_html/app/code/core/Mage/Core/Model/Store.php(712): Zend_Uri::factory(’{{base_url}}’)
#1 /home/artsandc/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(313): Mage_Core_Model_Store->isCurrentlySecure()
#2 /home/artsandc/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(161): Mage_Core_Controller_Varien_Front->_checkBaseUrl(Object(Mage_Core_Controller_Request_Http))
#3 /home/artsandc/public_html/app/code/core/Mage/Core/Model/App.php(349): Mage_Core_Controller_Varien_Front->dispatch()
#4 /home/artsandc/public_html/app/Mage.php(640): Mage_Core_Model_App->run(Array)
#5 /home/artsandc/public_html/index.php(80): Mage::run(’’, ‘store’)
#6 {main}

Where are only alphanumeric characters perimitted? I have installed Magento many times on this server without these problems and did not do anything different this time.

Version 1.6.1.0

 
Magento Community Magento Community
Magento Community
Magento Community
 
mokc
Jr. Member
 
Total Posts:  1
Joined:  2011-10-12
 

I have exactly the same problem! I can’t decide!

Solved the problem! You need to append to the beginning of the https:// - for example - https://localhost/magento

 
Magento Community Magento Community
Magento Community
Magento Community
 
deepakgkk2003
Jr. Member
 
Total Posts:  1
Joined:  2011-10-16
 

Truly frustrating when you think it can be solved just by adding an ‘S’.
I did not get this solved and I have been with this for nearly 5 hours now.

Please help.

 
Magento Community Magento Community
Magento Community
Magento Community
 
kuzyakiev
Jr. Member
 
Total Posts:  18
Joined:  2008-10-08
 

same problem

i change core_config_data form
#3 web/unsecure/base_url {{base_url}}
#4 web/secure/base_url {{base_url}}

to

#3 mysite.loc
#4 mysite.loc

No result

I try to clear var/cache - No result

 
Magento Community Magento Community
Magento Community
Magento Community
 
kuzyakiev
Jr. Member
 
Total Posts:  18
Joined:  2008-10-08
 

I try to shell/reindex.php (all) -> no result

 
Magento Community Magento Community
Magento Community
Magento Community
 
kuzyakiev
Jr. Member
 
Total Posts:  18
Joined:  2008-10-08
 

fixed.

i change all {{base_url}} to mysite.loc inb core_config_data

Your site name must have dot in address

For deteils look <YourMagentoSite.loc>/lib/Zend/Uri.php

public static function factory($uri 'http'$className null)
    
{
        
// Separate the scheme from the scheme-specific parts
        
$uri            explode(':'$uri2);
        
$scheme         strtolower($uri[0]);
        
$schemeSpecific = isset($uri[1]) === true $uri[1] '';

        if (
strlen($scheme) === 0{
            
#require_once 'Zend/Uri/Exception.php';
            
throw new Zend_Uri_Exception('An empty string was supplied for the scheme');
        
}

        
//ob_clean();
        /*
        echo 'public static function factory($uri = "http", $className = null)'.'<br />';
        echo 'uri:'; var_dump($uri); echo '<br />';
        echo "scheme $scheme <br />";
        echo "schemeSpecific"; var_dump($schemeSpecific); echo "<br />";
 exit;*/
        // Security check: $scheme is used to load a class file, so only alphanumerics are allowed.
        
if (ctype_alnum($scheme) === false{
            
#require_once 'Zend/Uri/Exception.php';
            
throw new Zend_Uri_Exception('Illegal scheme supplied, only alphanumeric characters are permitted');
        
}

 
Magento Community Magento Community
Magento Community
Magento Community
 
Mondane
Jr. Member
 
Total Posts:  26
Joined:  2011-09-19
 

It’s not a real fix. I have the same problem, but only after upgrading from 1.6.0.0 to 1.6.1.0. The ‘{{base_url}}’ just isn’t working anymore.

Could this be a bug in 1.6.1.0 or does anyone know if something has been changed on purpose?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Mondane
Jr. Member
 
Total Posts:  26
Joined:  2011-09-19
 

I did some research, and turned out these changes are between 1.6.0.0 and 1.6.1.0 in file /app/code/core/Mage/Core/Model/Store.php

Version in 1.6.0.0

public function isCurrentlySecure()
    
{
        $standardRule 
= !empty($_SERVER['HTTPS']) && 'off' != $_SERVER['HTTPS'];
        
$offloaderHeader trim(Mage::getStoreConfig('web/secure/offloader_header'));

        if ((!empty(
$offloaderHeader) && !empty($_SERVER[$offloaderHeader])) || $standardRule{
            
return true;
        
}

        
if (Mage::isInstalled()) {
            $secureBaseUrl 
Mage::getStoreConfig('web/secure/base_route_url');
            if (!
$secureBaseUrl{
                
return false;
            
}
            $uri 
Zend_Uri::factory($secureBaseUrl);
            
$isSecure = ($uri->getScheme() == 'https' )
                && isset(
$_SERVER['SERVER_PORT'])
                && (
$uri->getPort() == $_SERVER['SERVER_PORT']);
            return 
$isSecure;
        
else {
            $isSecure 
= isset($_SERVER['SERVER_PORT']) && (443 == $_SERVER['SERVER_PORT']);
            return 
$isSecure;
        
}
    }

Version in 1.6.1.0

/**
     * Check if request was secure
     *
     * @return boolean
     */
    public function isCurrentlySecure()
    
{
        $standardRule 
= !empty($_SERVER['HTTPS']) && ('off' != $_SERVER['HTTPS']);
        
$offloaderHeader trim((string) Mage::getConfig()->getNode(self::XML_PATH_OFFLOADER_HEADER'default'));

        if ((!empty(
$offloaderHeader) && !empty($_SERVER[$offloaderHeader])) || $standardRule{
            
return true;
        
}

        
if (Mage::isInstalled()) {
            $secureBaseUrl 
'';
            if (!
$this->isAdmin()) {
                $secureBaseUrl 
Mage::getStoreConfig(Mage_Core_Model_Url::XML_PATH_SECURE_URL);
            
else {
                $secureBaseUrl 
= (string) Mage::getConfig()
                    ->
getNode(Mage_Core_Model_Url::XML_PATH_SECURE_URL'default');
            
}

            
if (!$secureBaseUrl{
                
return false;
            
}

            $uri 
Zend_Uri::factory($secureBaseUrl);
            
$port $uri->getPort();
            
$isSecure = ($uri->getScheme() == 'https')
                && isset(
$_SERVER['SERVER_PORT'])
                && (
$port == $_SERVER['SERVER_PORT']);
            return 
$isSecure;
        
else {
            $isSecure 
= isset($_SERVER['SERVER_PORT']) && (443 == $_SERVER['SERVER_PORT']);
            return 
$isSecure;
        
}
    }

In de 1.6.0.0 version, $secureBaseUrl will be ‘’ (empty string), but in 1.6.1.0 the value will be the one that’s in the database. If in the database, you have ‘{{base_url}}’. Then $secureBaseUrl will be ‘{{base_url}}’. This value will cause

Zend_Uri::factory($secureBaseUrl);

to break.

Edit: added information about this to an existing bug report:

http://www.magentocommerce.com/bug-tracking/issue?issue=12530

 
Magento Community Magento Community
Magento Community
Magento Community
 
amanwas
Jr. Member
 
Total Posts:  9
Joined:  2011-07-02
 

I also have this same issue.  i don’t understand how magento can publish their product with such a basic issue during installation.

This just make magento useless. Can some one please help resolve this issue once for all. I still don’t understand how to resolve
it.

thanks please help.

 
Magento Community Magento Community
Magento Community
Magento Community
 
istvannonn
Jr. Member
 
Total Posts:  11
Joined:  2010-03-14
Oradea
 

I have the same problem in localhost with WAMP.
But when I install in live server I have this in “error log” from cpanel:
/home/domain_name/public_html/project_name/.htaccess: SSLOptions not allowed here

Have the same problem with 1.6.0.0 and 1.6.1.0

Please help.

 
Magento Community Magento Community
Magento Community
Magento Community
 
dan jones
Member
 
Total Posts:  37
Joined:  2010-02-11
 

I have a use case where I *must* have base_url for my testing configuration, so changing the URL back in the database was not the solution for me.

I’ve written a quick extension which resolves the issue.

More on my blog post and download here: http://www.danneh.org/2011/11/bug-magento-1-6-1-0-affecting-development-sites-base_url/

 
Magento Community Magento Community
Magento Community
Magento Community
 
Megacoral
Jr. Member
 
Total Posts:  1
Joined:  2011-10-11
 

@danjones, you save my day it works fine. thank you!

 
Magento Community Magento Community
Magento Community
Magento Community
 
escherrer
Jr. Member
 
Total Posts:  2
Joined:  2011-11-12
 

My solution was to just abandon 1.6.1 and use 1.6.0.

 
Magento Community Magento Community
Magento Community
Magento Community
 
kenvac
Jr. Member
 
Total Posts:  1
Joined:  2010-05-17
 
dan jones - 14 November 2011 10:03 AM

I have a use case where I *must* have base_url for my testing configuration, so changing the URL back in the database was not the solution for me.

I’ve written a quick extension which resolves the issue.

More on my blog post and download here: http://www.danneh.org/2011/11/bug-magento-1-6-1-0-affecting-development-sites-base_url/

Thanks dude it worked.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Jefferson Luís
Jr. Member
 
Avatar
Total Posts:  13
Joined:  2010-03-24
Brasil - Blumenau/SC
 

fixed

I add in app/code/core/Mage/Core/Model/Store.php on line 711:

if (false !== strpos($secureBaseUrl, ‘{{base_url}}’)) {
$secureBaseUrl = Mage::getConfig()->substDistroServerVars(’{{base_url}}’);
}

 
Magento Community Magento Community
Magento Community
Magento Community
 
dan jones
Member
 
Total Posts:  37
Joined:  2010-02-11
 

yes, that\’s what my extension does. but does it in a way that doesn\’t fiddle with the core (though we know we don\’t care that this gets overwritten during update because they\’ll have fixed it (hopefully)), but more aimed at those that don\’t want to go messing with magento\’s core, or saving having to direct people to an individual core file/line.

either way works though.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top
Page 1 of 2