We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 39659
    • 8 Posts
    Description of Problem:

    Howdy all - long time reader first time poster. Advancedhearingwa.com.au runs on MODX Revolution 2.2.6-pl (traditional). On my local server, all ran fine.

    After migration to the production server, I got a 'Unexpected token <: ' dialogue box when accessing the manager. This was accompanied by a slightly inconstant resource tree hiding/appearing etc...



    Enabling Friendly URLS in .htacces file breaks the dashboard even more with the sites front end layout appearing in the error dialogue box, and major display issues with the dashboard layout. Panels disappearing and main toolbar being stuck above top of screen etc.



    Sometimes on load, the Dashboard shows nothing but the top menu, and refreshing multiple times eventually brings back the expected panels. After a 'unexpected token' box is closed, the Dashboard font changes to the one defined for 'body' in the sites CSS.

    Both compress_js & compress_css are turn off.


    • MODX Version: MODX Revolution 2.2.6-pl (traditional)
    • PHP Version 5.3.27
    • Database (MySQL, SQL Server, etc) Version: 5.5.32-cll - MySQL Community Server (GPL)
    • Installed MODX Add-ons:

    • - tinymce-4.3.3
      - ultimateparent-2.0
      - wayfinder-2.3.3

    • Error Log Contents:
    • cPanel error log attached.


    Any advice/suggestions from the MODx community at this stage are really welcome!

    - Jesse

    This question has been answered by BobRay. See the first response.

    [ed. note: jesseyuen last edited this post 12 years, 11 months ago.]
      • 30912
      • 463 Posts
      Hiya,

      I *think* i've seen something similar before it might be worth running the setup file again to check for suhosin issues and also check what the memory allocation for the install is.

      I'd also try updating to a later version to see if that helps.

      Good luck smiley
        • 39659
        • 8 Posts
        Cheers for your feedbackTyreal2012!

        I ran the setup file again... and updated MODx. There was a suhosin issue:

        "Currently, you are using the PHP suhosin extension, and your suhosin.get.max_value_length is set too low for MODX to properly compress JS files in the manager. MODX recommends upping that value to 4096; until then, MODX will automatically set your JS compression (compress_js setting) to 0 to prevent errors."

        I've increased the value to 4096 via php.ini

        Deleted the cache files, flushed all sessions.

        Still - the problem persists! Aaaargh.
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          Definitely a memory problem. Either increase your memory allowance for PHP, or go into the database and in the system_settings table set compress_css and compress_js to 0.
            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
            • 39659
            • 8 Posts
            Hi there Sotwell. Compress_css and compress_js are both set to 0 and my current memory_limit = 64MB.

            I have increased to 128MB via php.ini and still getting the issue.

            Hmmm - any more ideas?

            Cheers in advance.



              • 28042 ☆ A M B ☆
              • 24,524 Posts
              The web server can also have limits on script memory usage, as well as other server management applications.
                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
                • 28042 ☆ A M B ☆
                • 24,524 Posts
                Oh, and you probably should manually delete all of the directories under core/cache/ to make sure the original compress_js and compress_css settings aren't still in the cache somewhere. Clearing your browser cache and cookies for the domain also wouldn't hurt.
                  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
                  • 39659
                  • 8 Posts
                  Yep - forgot to mention that I always delete all of the directories under core/cache/ as well as browser stuff.

                  Compress_js and compress_css have been off for weeks now smiley

                  "The web server can also have limits on script memory usage, as well as other server management applications."

                  -- so I should be contacting the host and enquiring at that level for them to raise limits on memory usage?

                  Cheers again.

                  Jesse

                    • 6629
                    • 60 Posts
                    "Internal Server Error" is often caused by htaccess-directives which are not allowed for the specific website.

                    Try it with the following .htaccess:
                    RewriteEngine On
                    RewriteBase /
                    RewriteCond %{REQUEST_FILENAME} !-f
                    RewriteCond %{REQUEST_FILENAME} !-d
                    RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

                    If the error persists, ask your host if "AllowOverride All" is set for your directory.
                      • 39659
                      • 8 Posts
                      Hi Sottwell - I've now tested site at 128MB and 256 MB memory limit with no result. The hosting company is being 'awkward' in exploring the
                      other server management applications.
                      .

                      Hi DasItsch - in terms of my .htaccess, with only this in my file:

                      RewriteEngine On
                      RewriteBase /
                      RewriteCond %{REQUEST_FILENAME} !-f
                      RewriteCond %{REQUEST_FILENAME} !-d
                      RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]


                      The Manager is fairly stable however I still get this popup:



                      Below is the current .htaccess file contents.

                      # Inserted By Customer Control Panel
                      SetENV PHPRC /home/advanced/public_html
                      
                      #RewriteEngine on
                      RewriteCond %{HTTP_HOST} ^advancedhearingwa.com.au$
                      RewriteRule ^/?$ "http\:\/\/www\.advancedhearingwa\.com\.au\/" [R=301,L]
                      
                      # Friendly URLs Part
                      RewriteEngine On
                      RewriteBase /
                      RewriteCond %{HTTP_HOST} .
                      
                      # Friendly URLs
                      RewriteCond %{REQUEST_FILENAME} !-f
                      RewriteCond %{REQUEST_FILENAME} !-d
                      RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
                      
                      # compress text, html, javascript, css, xml:
                      AddOutputFilterByType DEFLATE text/plain
                      AddOutputFilterByType DEFLATE text/html
                      AddOutputFilterByType DEFLATE text/xml
                      AddOutputFilterByType DEFLATE text/css
                      AddOutputFilterByType DEFLATE application/xml
                      AddOutputFilterByType DEFLATE application/xhtml+xml
                      AddOutputFilterByType DEFLATE application/rss+xml
                      AddOutputFilterByType DEFLATE application/javascript
                      AddOutputFilterByType DEFLATE application/x-javascript
                      
                      # Or, compress certain file types by extension:
                      <files *.html>
                      SetOutputFilter DEFLATE
                      </files>