We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 46577
    • 54 Posts
    trying to install a new instance of Revo 2.3.1 on a shared server (Kloxo control panel). Everything goes fine up to the installation summary and then:

    Installation Summary

    Problems were detected. Please review the pre-installation test results below, correct the problems as directed, and then click Test again.

    Checking PHP version: OK!

    Checking PHP for zlib dependency: OK!

    OK!

    Checking if memory limit is set to at least 24M: OK!

    Checking if sessions are properly configured: OK!

    Checking if /home/portofino/portofino.com.ph/modx/core/cache directory exists: OK!

    Checking if /home/portofino/portofino.com.ph/modx/core/cache directory is writable: OK!

    Checking if /home/portofino/portofino.com.ph/modx/core/export directory exists: OK!

    Checking if /home/portofino/portofino.com.ph/modx/core/export directory is writable: OK!

    Checking if /home/portofino/portofino.com.ph/modx/core/packages directory exists: OK!

    Checking if /home/portofino/portofino.com.ph/modx/core/packages directory is writable: OK!

    Checking if /home/portofino/portofino.com.ph/modx/core/config/config.inc.php exists and is writable: OK!

    Creating connection to the database: OK!

    Failed!

    OK!

    OK!

    The error description is not very helpful but I'm guessing it might be database user permissions. Can anyone confirm this?

    Also (not directly related to MODX but could be part of the solution): I can't see any way in Kloxo to check or modify mysql db user permissions. All I seem to be able to do is to create a database and a user with the same name as the database is created automatically. If anyone can point me in the right direction that would be great. [ed. note: grogorio last edited this post 9 years, 8 months ago.]
      • 3749
      • 24,544 Posts
      MODX tries to create the database at that point, but it fails on some servers. In those cases, you need to create an empty database yourself before running setup, and enter the name and credentials in setup.
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 46577
        • 54 Posts
        Quote from: BobRay at Aug 03, 2014, 08:01 AM
        MODX tries to create the database at that point, but it fails on some servers. In those cases, you need to create an empty database yourself before running setup, and enter the name and credentials in setup.

        Hi Bob I had already created the database manually and supplied the connection info in the previous step to the one I posted, i.e.:


        Connection Information
        Database connection and login information

        Please enter the following information to connect to your MODX database. If there is no database yet, the installer will attempt to create it for you. (This may fail if your database configuration or the database user permissions do not allow it.)

        Database type:
        Database host:
        Database login name:
        Database password:
        Database name:
        Table prefix:

        → Test database server connection and view collations.
        Connecting to database server: Success!


        - Checking MySQL server version: OK! Running: 5.0.77
        - Checking MySQL client version: OK! Running: 5.0.77

        Connection character set:
        Collation:

        → Create or test selection of your database.

        Checking database: Success!

        Then I create the admin username and password and click to proceed.

        So I just tried doing all this all over again and still there are problems but this time a meaningful error message:

        Creating connection to the database: OK!

        Checking to make sure safe_mode is off: Failed!

        MODX has found safe_mode to be on. You must disable safe_mode in your PHP configuration to proceed.

        Checking for suhosin issues:OK!

        Checking if we should disable CSS/JS compression: Not selected, skipping test.

        This is odd because I have checked the PHP configuration in Kloxo control panel for safe mode settings and it reports that safe mode is off. What's that all about? Is there a work-around? [ed. note: grogorio last edited this post 9 years, 8 months ago.]
          • 36996
          • 211 Posts
          The best way to check if safe_mod is off is to create a php file with phpinfo:
          <?php
          phpinfo();
          ?>
          


          and verify that it's really off.
            • 46577
            • 54 Posts
            Quote from: nir-z at Aug 03, 2014, 09:59 AM
            The best way to check if safe_mod is off is to create a php file with phpinfo:
            <!--?php
            phpinfo();
            ?-->
            

            and verify that it's really off.

            thanks for the suggestion Nir, I uploaded the phpinfo file but all I get is a blank page. See http://www.portofino.com.ph/phpinfo.php Guess this could be a clue but not sure what to make of it. I saw a post which suggests that phpinfo() is configured like this for some shared hosting services. [ed. note: grogorio last edited this post 9 years, 8 months ago.]
              • 36996
              • 211 Posts
              I'm seeing the phpinfo on this page, safe_mod is off.
              What looks weird to me is the disable_functions that contains:

              apache_child_terminate,apache_setenv,base64_decode,curl_exec,curl_multi_exec,define_syslog_variables,diskfreespace,dl,error_log,eval,exec,fpaththru,getmypid,getmyuid,gzinflate,highlight_file,ignore_user_abord,ini_alter,ini_get_all,ini_restore,ini_set,leak,link,listen,openlog,passthru,pclose,pcntl_exec,php_uname,popen,posix_ctermid,posix_getcwd,posix_getegid,posix_geteuid,posix_getgid,posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid,posix_getppid,posix_getpwnam,posix_getpwuid,posix_getrlimit,posix_getsid,posix_getuid,posix_isatty,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setuid,posix_times,posix_ttyname,posix_uname,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,readlink,set_time_limit,shell_exec,show_source,source,symlink,syslog,system,tmpfile,virtua


              I'm not sure, but this might be the problem, hopefully someone with a better understanding of this can confirm.

              Edit: can you look at the error log and see what error you get when you try to install?
              • Yes, some of those functions are used by MODX.

                What do your PHP error logs say? If MODX is failing because of these restrictions, there should be something to that effect in the PHP error logs.
                  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
                  • 46577
                  • 54 Posts
                  What has happened in the interim is that I raised a ticket with the host and they disabled safe mode and enabled phpinfo.

                  I then ran the installer again and it all went smoothly.

                  Thanks to all for your suggestions.

                  Should I still be worried about the disable_functions though? There's nothing in either the error or php log when I access from the hosting control panel.
                    • 36996
                    • 211 Posts
                    The disabled functions can cause problems with modx or one of the addons you will use.

                    Don't forget to remove the phpinfo page, it's not good for security to leave it accessible.
                      • 46577
                      • 54 Posts
                      Guess I will have to keep this in the back of my mind in case of weird problems, and tackle them if and when they arise....

                      Thanks for the heads up on phpinfo, hmmm I've got a few of them scattered around.