We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 47717
    • 144 Posts
    Hi,

    After installing 2.4.2 on another server type then usual, I have some weird issues:

    1. in the error log I get several times the same kind of error:

    [2016-01-04 16:03:54] 
    (ERROR @ /usr/local/pem/vhosts/109244/webspace/httpdocs/****.be/core/model/modx/processors/system/config_check.inc.php
     : 83) PHP warning: curl_setopt() expects parameter 2 to be long, string given
    [2016-01-04 16:03:54] 
    (ERROR @ /usr/local/pem/vhosts/109244/webspace/httpdocs/****.be/core/model/modx/processors/system/config_check.inc.php
     : 84) PHP warning: curl_setopt() expects parameter 2 to be long, string given


    2. After installing CKeditor, there is simply no input for any text

    3. After installing ACE, it just does nothing

    4. On the landing page, even after activating .htaccess, it says that there is a security issue in /core/, as it is accessible from the outside


    It is weird, as the pre-install check of ModX marked everything as "ok".

    So I have all "php info" and "system info" in a pdf-attachment.

    I am wondering if this is a server issue or something to do with ... sad ?

    Thanks !
    • #4 - edit the core/.htaccess file to say this
      IndexIgnore */*
      <Files *>
          Order Deny,Allow
          Deny from all
      </Files>
      
        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
        • 47717
        • 144 Posts
        Quote from: sottwell at Jan 04, 2016, 04:45 PM
        #4 - edit the core/.htaccess file to say this
        IndexIgnore */*
        <files *="">
            Order Deny,Allow
            Deny from all
        </files>
        

        Hi Sottwell,

        I had done this as you say, but it keeps giving the same "core accessible security issue".

        What I am wondering, is if there are any faults with the server, as I cannot even enter "content" with CKEditor now, there is just no input space (see the pdf attachment).
        Grtz
        • Where did I say
          <files *="">

          I said
          <files *>


          The other issues, I have no ideas beyond a couple of obvious ones. Is compress_css and compress_js turned off? Is it failing due to too many AJAX requests in a short period of time - there are mod_security settings that block more than x number of requests within x number of seconds, and the Manager does use a lot of AJAX.
            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
          • Oh, and the cURL errors are probably because of the two feeds, and you are using a rather old version of PHP. Turning off the feeds in System Settings will probably stop the errors.
              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
              • 36816
              • 109 Posts
              Quote from: sottwell at Jan 04, 2016, 05:00 PM
              Oh, and the cURL errors are probably because of the two feeds, and you are using a rather old version of PHP. Turning off the feeds in System Settings will probably stop the errors.

              cURL is being used in that code by the MODX to fetch the MODX security and announcements newsfeeds in the manager dashboard, and I agree with Susan that turning off the two RSS feeds will stop the errors, but...

              Concern -- your hosting configuration has at least one severely outdated component. See below for details if you wish. Leads one to wonder if other things are outdated too; causing your problems. You indicated that you've had success with other hosts, perhaps you could use one of them. Here also is a good resource for other hosts: http://bobsguides.com/modx-friendly-hosts.html

              For those interested in the background, read on...

              I was curious and looked a little further at those cURL errors. Unless I miss my guess, they're because your host compiled in a very old version of cURL - shown in your phpinfo(). It shows you using version 7.15.5, which dates back to August 2006 (http://curl.haxx.se/changes.html#7_15_5). I took a look at a client site that's on a host with an even older version of PHP (5.2.17), and yet it's compiled with cURL 7.24.0 - much newer than yours.

              I looked in the MODX 2.4.2 code on the two lines (https://github.com/modxcms/revolution/blob/v2.4.2-pl/core/model/modx/processors/system/config_check.inc.php#L83-L84) reported in your error log, and the cURL error is almost certainly because you don't have a new enough version of cURL that defines the constants CURLOPT_TIMEOUT_MS and CURLOPT_CONNECTTIMEOUT_MS. Those options were implemented in cURL with version 7.16.12 (http://curl.haxx.se/changes.html#7_16_2).
              • PHP 5.3.3 Bugs...

                Add this to the top of /core/config/config.inc.php file

                if (!defined('CURLOPT_CONNECTTIMEOUT_MS')) {
                  define('CURLOPT_CONNECTTIMEOUT_MS', 156);
                }
                


                If that not solve the problem. Create new PHP file to get CURLOPT_CONNECTTIMEOUT_MS value

                <?php
                /* NEW PHP FILE: test.php */
                echo CURLOPT_CONNECTTIMEOUT_MS;
                ?>
                
                  zaenal.lokamaya