We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 21508
    • 46 Posts
    After install any version of MODx 1.0.3 or 1.0.4 install YAMS 1.1.9, after adding the plugin gives error
    Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or ')' in / assets / modules / yams / class / yams.class.inc.php on line 85


    and startup of the Module YAMS in manager gives error
    Parse error: syntax error, unexpected '&', expecting T_VARIABLE or '$' in / assets / modules / yams / yams.module.inc.php on line 1747


    Version of PHP 5.2.11

    Help with problem.
      It’s Nice to Be Important, But It’s More Important to Be Nice
      • 22851
      • 805 Posts
      I’ve got YAMS 1.1.9 working with MODx 1.0.4 and PHP 5.1.2, so you should be okay. Perhaps your files got corrupted during upload to your server or during unzipping? Please can you try again? If you continue to have problems, please open the specified files and paste some of the code from around the affected lines into the forum so that I can see what’s happened to the code. Thanks.
        YAMS: Yet Another Multilingual Solution for MODx
        YAMS Forums | Latest: YAMS 1.1.9 | YAMS Documentation
        Please consider donating if you appreciate the time and effort spent developing and supporting YAMS.
        • 21508
        • 46 Posts
        file
        Parse error: syntax error, unexpected '&', expecting T_VARIABLE or '$' in /home/probaua/public_html/assets/modules/yams/yams.module.inc.php on line 1759

        error on line
        foreach ( $modxLangFiles as $id => &$name )
        {
        

        in the homepage
        Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/probaua/public_html/assets/modules/yams/class/yams.class.inc.php on line 85

        error on line
        public function GetVersion()
        
          It’s Nice to Be Important, But It’s More Important to Be Nice
          • 21508
          • 46 Posts
          first problem - decided
          everything works, for some reason did not run is not the php, now everything is normal.

          but there was another problem, which I so could not solve, do not switch language, address bar changes, but does not change the language on the site.
            It’s Nice to Be Important, But It’s More Important to Be Nice
            • 22851
            • 805 Posts
            Everything looks fine to me. It might be a problem with the set-up of your .htaccess file, but I’m not able to access that to check. Please make sure you copy the text from Modules>YAMS>Server Config to the relevant section of your .htaccess file.
              YAMS: Yet Another Multilingual Solution for MODx
              YAMS Forums | Latest: YAMS 1.1.9 | YAMS Documentation
              Please consider donating if you appreciate the time and effort spent developing and supporting YAMS.
              • 21508
              • 46 Posts
              I found what I was doing wrong, I’m from the Modules>YAMS>Server Config add in .htaccess but need replaced, now everything is working properly.

              Thanks for the help.
                It’s Nice to Be Important, But It’s More Important to Be Nice
                • 6967
                • 1 Posts
                Hi Nik ADA, I’ve the same problem (first problem)

                /yams.class.inc.php on line 85
                and
                /yams.module.inc.php on line 1759

                How have you resolve this ?

                Thanks for your help.


                (I use modx 1.0.4 and php5.3)

                ---> I found !
                So I had two lines in the htaccess file :
                # ovh host settings
                SetEnv REGISTER_GLOBALS 0
                SetEnv PHP_VER 5

                And everything is running !