0

Hey I've started getting this error yesterday:

"Illegal scheme supplied, only alphanumeric characters are permitted"

The error started after we implemented this fix for Varnish cache. Caracter fix

First I did, disabled the Complination manually.

Then went to phpMyadmin and checked the secure and unsecure urls: both are set to: http://www.golulo.es/, also tryed others, like http://golulo.es/etc. Nothing fixed the issue.

Checked the app/etc/local.xml and everything seems to be correct in this format:

<![CDATA[usrname]]>

The password has + in it, but it worked before, so I don't think this is what causing it.

Cleared cache manually on every change I made. I can't find where is the issue?

Could anyone point me to the right dirrection?

Thanks,

8
  • You could try escaping any "bad" characters with a backslash. Example: * would be \* Commented Feb 4, 2015 at 15:46
  • Hey, I don't follow, where I should put the \* ?
    – Artur Rain
    Commented Feb 4, 2015 at 15:48
  • Try \+ where your password field has + Commented Feb 4, 2015 at 15:54
  • When I add this in local.xml I get this: SQLSTATE[HY000] [1045] Access denied for user
    – Artur Rain
    Commented Feb 4, 2015 at 16:07
  • I misunderstood your issue. See: stackoverflow.com/questions/7889286/… It looks like you may have forgotten to put http:// in your URL in the admin for the base_url. Commented Feb 4, 2015 at 16:11

1 Answer 1

2

If you want to find out what's causing it to happen, you could temporarily edit lib/Zend/Uri.php which is the only place in Magento that contains this error.

Around line 108 you'll find:

    // 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');
    }

Add this:

    // 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';

     // temp code here
     echo $scheme;
     exit();
     // 

     throw new Zend_Uri_Exception('Illegal scheme supplied, only alphanumeric characters are permitted');
    }

The next time you get it, instead of getting the Exception message you'll see the $scheme variable that's throwing the error.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.