We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 13730
    • 149 Posts
    Modx : 2.2.13
    PHP : 5.4.26
    MySql : 5.5.36

    Installed Extra
    - seoPro 1.0.2
    - SEO Tab 1.04
    - Formit 2.2.0 => indicates installed but it is not

    I tried to install Formit 2.2.0, but the installation fail. Does anyone encountered this problem?

    Thank

    Installation log
    Console en cours d'exécution …
    Essai d'installation du paquet ayant pour signature: formit-2.2.0-pl
    Paquet trouvé… préparation de l'installation.
    Obtention du paquet de l'espace de travail…
    Espace de travail initialisé, installation du paquet…
    PHP warning: preg_match(): Compilation failed: invalid range in character class at offset 38
    PHP notice: Array to string conversion
    snippet_err_createArray
    Error saving vehicle object of class modSnippet; criteria: Array ( [name] => FormIt )
    PHP warning: preg_match(): Compilation failed: invalid range in character class at offset 38
    PHP notice: Array to string conversion
    snippet_err_createArray
    Error saving vehicle object of class modSnippet; criteria: Array ( [name] => FormItAutoResponder )
    PHP warning: preg_match(): Compilation failed: invalid range in character class at offset 38
    PHP notice: Array to string conversion
    snippet_err_createArray
    Error saving vehicle object of class modSnippet; criteria: Array ( [name] => FormItRetriever )
    PHP warning: preg_match(): Compilation failed: invalid range in character class at offset 38
    PHP notice: Array to string conversion
    snippet_err_createArray
    Error saving vehicle object of class modSnippet; criteria: Array ( [name] => FormItIsChecked )
    PHP warning: preg_match(): Compilation failed: invalid range in character class at offset 38
    PHP notice: Array to string conversion
    snippet_err_createArray
    Error saving vehicle object of class modSnippet; criteria: Array ( [name] => FormItIsSelected )
    PHP warning: preg_match(): Compilation failed: invalid range in character class at offset 38
    PHP notice: Array to string conversion
    snippet_err_createArray
    Error saving vehicle object of class modSnippet; criteria: Array ( [name] => FormItCountryOptions )
    PHP warning: preg_match(): Compilation failed: invalid range in character class at offset 38
    PHP notice: Array to string conversion
    snippet_err_createArray
    Error saving vehicle object of class modSnippet; criteria: Array ( [name] => FormItStateOptions )
    Could not install related objects with locally owned keys for vehicle object of class modCategory; criteria: Array ( [category] => FormIt )
    Paquet installé avec succès formit-2.2.0-pl [ed. note: jber last edited this post 10 years ago.]
    • This is a problem with certain versions of PHP when trying to use the - as a character in a regular expressions. PHP thinks it's a range operator (as in "a-z"). Sometimes it can be fixed by moving the location of the - character, or by escaping it \-

      As far as the install process goes, this problem is showing up in a number of cases from installing MODX itself to installing a number of add-ons, and I'm not able yet to figure out exactly where the problem is coming from. There are too many references to variables to be able to figure out just where the - character is being used.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 13730
        • 149 Posts
        I tried with PHP 5.3 and PHP 5.5 and this has not solved the problem.

        I'll probably do a re-installation of MODx.

        Thank you for your answer.
          • 13730
          • 149 Posts
          I made a fresh installation of MODx 2.2.13 and the problem still there, I cannot install Formit 2.2.0.

          And I got another problem, now I cannot save chunk it said «invalid chunk name»
            • 13730
            • 149 Posts
            I have tried to install getResources and If extra, and I got the same problem.

            I contact my Web Hosting Company for that problem, I am waiting for their answer.
              • 13730
              • 149 Posts
              My problem is not yet resolved. Here is what has been done :

              1) I delete the database and I re-installed MODX 2.2.12 from the scratch

              2) I tried to install some extras. Still the same problem => PHP warning: preg_match(): Compilation failed: invalid range in character class at offset 38

              3) Cannot save chunk and snippets => (ERROR @ /home/name/public_html/core/xpdo/validation/xpdovalidator.class.php : 82) PHP warning: preg_match(): Compilation failed: invalid range in character class at offset 38

              4) I asked to move mysite on the server of one of my clients (we have the same host). This customer also uses MODx 2.2.12.

              5) I can install extras without problem on my client website, save chunks and snippets

              6) I made a comparison chart based on the information system report of MODx and highlight all the differences in yellow. See attached report.

              7) I read in several places that we could change in the following files :

              core/model/modx/mysql/modsnippet.map.inc.php
              core/model/modx/mysql/modchunk.map.inc.php

              this rule => '/^(quergo!\s)[a-zA-Z0-9\x2d-\x2f\x7f-\xff_-\s]+(quergo!\s)$/' by
              this rule => '/^(quergo!\s)[a-zA-Z0-9\x2d-\x2f\x7f-\xff-_\s]+(quergo!\s)$/'

              I do not like this approach, I will have to do it again each time after an update, if it worked.

              8) I also ask to my host to disable mod_security for my site only => always the same problems


              I use the PHP 5.4.26 and my client PHP 5.4.19, both use the same version of MODx on the same server. I cannot install any extra, save chunks or snippets, but I have no problem to do that on my client website. Why????

              However with the PHP 5.2, I can installed extras, save chunks and snippets.

              Why these two sites with a similar environment, one works and the other does not?

              Perhaps by looking at the report someone can find a possible solution?

              Thank for your help






              [ed. note: jber last edited this post 10 years ago.]
                • 13730
                • 149 Posts
                SOLVED!

                The problem was at the level of the PHP. My site was using PHP 5.4 CLoudLinux.

                My host gave me back the PHP 5.4 (native) and everything is back to normal.

                Thank sottwell, to have placed me on the track of the PHP

                [ed. note: jber last edited this post 10 years ago.]