I have an interesting phenomenon:

I tried to install Magento on http://www.fortrabbit.com/ but I get the following error. I'm sure on my first try it didn't happen, but the table creation broke at max_execution_time.

Validate class not found from basename 'StringLength'

I checked the file, it is there. I checked whether PHP enters the file, it does. I checked whether the name of the class is correct. It is.

Has anyone had this error before? I have no idea what to do. And I'm not sure, whether this site is the right place to ask for help. I think this problem might be really localized.

Update:

I tracked down to:

string(177) "Notice: iconv_strlen(): Wrong charset, conversion from `ISO-8859-1' to `UCS-4LE' is not allowed  in /htdocs/lib/Zend/Validate/StringLength.php on line 236"

Complete Error message:

Zend_Validate_Exception Object
(
[_previous:Zend_Exception:private] => 
[message:protected] => Validate class not found from basename 'StringLength'
[string:Exception:private] => 
[code:protected] => 0
[file:protected] => /htdocs/lib/Zend/Validate.php
[line:protected] => 244
[trace:Exception:private] => Array
    (
        [0] => Array
            (
                [file] => /htdocs/app/code/core/Mage/Eav/Model/Entity/Setup.php
                [line] => 628
                [function] => is
                [class] => Zend_Validate
                [type] => ::
                [args] => Array
                    (
                        [0] => website_id
                        [1] => StringLength
                        [2] => Array
                            (
                                [max] => 30
                            )

                    )

            )

        [1] => Array
            (
                [file] => /htdocs/app/code/core/Mage/Eav/Model/Entity/Setup.php
                [line] => 659
                [function] => _validateAttributeData
                [class] => Mage_Eav_Model_Entity_Setup
                [type] => ->
                [args] => Array
                    (
                        [0] => Array
                            (
                                [entity_type_id] => 1
                                [attribute_code] => website_id
                                [backend_model] => customer/customer_attribute_backend_website
                                [backend_type] => static
                                [backend_table] => 
                                [frontend_model] => 
                                [frontend_input] => select
                                [frontend_label] => Associate to Website
                                [frontend_class] => 
                                [source_model] => customer/customer_attribute_source_website
                                [is_required] => 1
                                [is_user_defined] => 0
                                [default_value] => 
                                [is_unique] => 0
                                [note] => 
                                [is_global] => 1
                                [is_visible] => 1
                                [is_system] => 1
                                [input_filter] => 
                                [multiline_count] => 0
                                [validate_rules] => 
                                [data_model] => 
                                [sort_order] => 10
                            )

                    )

            )

        [2] => Array
            (
                [file] => /htdocs/app/code/core/Mage/Eav/Model/Entity/Setup.php
                [line] => 1187
                [function] => addAttribute
                [class] => Mage_Eav_Model_Entity_Setup
                [type] => ->
                [args] => Array
                    (
                        [0] => customer
                        [1] => website_id
                        [2] => Array
                            (
                                [type] => static
                                [label] => Associate to Website
                                [input] => select
                                [source] => customer/customer_attribute_source_website
                                [backend] => customer/customer_attribute_backend_website
                                [sort_order] => 10
                                [position] => 10
                                [adminhtml_only] => 1
                            )

                    )

            )

        [3] => Array
            (
                [file] => /htdocs/app/code/core/Mage/Customer/sql/customer_setup/install-1.6.0.0.php
                [line] => 866
                [function] => installEntities
                [class] => Mage_Eav_Model_Entity_Setup
                [type] => ->
                [args] => Array
                    (
                    )

            )

        [4] => Array
            (
                [file] => /htdocs/app/code/core/Mage/Core/Model/Resource/Setup.php
                [line] => 624
                [args] => Array
                    (
                        [0] => /htdocs/app/code/core/Mage/Customer/sql/customer_setup/install-1.6.0.0.php
                    )

                [function] => include
            )

        [5] => Array
            (
                [file] => /htdocs/app/code/core/Mage/Core/Model/Resource/Setup.php
                [line] => 421
                [function] => _modifyResourceDb
                [class] => Mage_Core_Model_Resource_Setup
                [type] => ->
                [args] => Array
                    (
                        [0] => install
                        [1] => 
                        [2] => 1.6.2.0.1
                    )

            )

        [6] => Array
            (
                [file] => /htdocs/app/code/core/Mage/Core/Model/Resource/Setup.php
                [line] => 327
                [function] => _installResourceDb
                [class] => Mage_Core_Model_Resource_Setup
                [type] => ->
                [args] => Array
                    (
                        [0] => 1.6.2.0.1
                    )

            )

        [7] => Array
            (
                [file] => /htdocs/app/code/core/Mage/Core/Model/Resource/Setup.php
                [line] => 235
                [function] => applyUpdates
                [class] => Mage_Core_Model_Resource_Setup
                [type] => ->
                [args] => Array
                    (
                    )

            )

        [8] => Array
            (
                [file] => /htdocs/app/code/core/Mage/Core/Model/App.php
                [line] => 417
                [function] => applyAllUpdates
                [class] => Mage_Core_Model_Resource_Setup
                [type] => ::
                [args] => Array
                    (
                    )

            )

        [9] => Array
            (
                [file] => /htdocs/app/code/core/Mage/Core/Model/App.php
                [line] => 343
                [function] => _initModules
                [class] => Mage_Core_Model_App
                [type] => ->
                [args] => Array
                    (
                    )

            )

        [10] => Array
            (
                [file] => /htdocs/app/Mage.php
                [line] => 683
                [function] => run
                [class] => Mage_Core_Model_App
                [type] => ->
                [args] => Array
                    (
                        [0] => Array
                            (
                                [scope_code] => 
                                [scope_type] => store
                                [options] => Array
                                    (
                                    )

                            )

                    )

            )

        [11] => Array
            (
                [file] => /htdocs/index.php
                [line] => 87
                [function] => run
                [class] => Mage
                [type] => ::
                [args] => Array
                    (
                        [0] => 
                        [1] => store
                    )

            )

    )

[previous:Exception:private] => 
)

Error in file: "/htdocs/app/code/core/Mage/Customer/sql/customer_setup/install-1.6.0.0.php" - Validate class not found from basename 'StringLength'

#0 /htdocs/app/code/core/Mage/Core/Model/Resource/Setup.php(645):  Mage::exception('Mage_Core', 'Error in file: ...')
#1 /htdocs/app/code/core/Mage/Core/Model/Resource/Setup.php(421): Mage_Core_Model_Resource_Setup->_modifyResourceDb('install', '', '1.6.2.0.1')
#2 /htdocs/app/code/core/Mage/Core/Model/Resource/Setup.php(327): Mage_Core_Model_Resource_Setup->_installResourceDb('1.6.2.0.1')
#3 /htdocs/app/code/core/Mage/Core/Model/Resource/Setup.php(235): Mage_Core_Model_Resource_Setup->applyUpdates()
#4 /htdocs/app/code/core/Mage/Core/Model/App.php(417): Mage_Core_Model_Resource_Setup::applyAllUpdates()
#5 /htdocs/app/code/core/Mage/Core/Model/App.php(343): Mage_Core_Model_App->_initModules()
#6 /htdocs/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#7 /htdocs/index.php(87): Mage::run('', 'store')
#8 {main}

Sounds more like you're running PHP in a chroot and you are missing required libraries for character encoding.

With the exception of a core bug in 1.3 - whenever we've been approached by someone with an iconv issue - it has always been due to a botched attempt of a PHP chroot - or fundamentally broken PHP/OS installation causing all kinds of charset issues.

The relative URL in your stack trace makes it look like it is a chroot. And if that is the case, then read more on what you *actually require for a PHP chroot to function properly - https://serverfault.com/a/430406/113375

  • sorry, i shortend the pathes. they were absolute /www/username/project/... – Fabian Blechschmidt Feb 23 '13 at 23:54
up vote 0 down vote accepted

Ok don't ask me why but the problem is here:

$length = iconv_strlen($value);

I replaced the iconv_strlen with a strlen temporarly and now magento is installed.

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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