We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 13789
    • 4 Posts
    I just got new Mac Mini which comes with Mac OS X Server (10.6 Snow Leopard Server). I turned on PHP via enabling php5_module (libphp5.so) and turned on MySQL.

    I downloaded the latest version of MODx Revolution and copy into web site. When I tried to open MODx’s index.php and browser says "503 Error" & "Site temporarily unavailable". I did put in index.html in that site for testing purpose and it works fine. I checked "php -i" in shell and it is fine and showing version being 5.3.3.

    I did restart Mac Mini and it is showing same result.

    What do I need to get this working? (i.e. installing the MODx Revolution into Mac Mini running OS X Snow Leopard Server)

    Thanks

    Jamie
      • 12028
      • 152 Posts
      Did you run the setup for MODx Revo? It is located at http://localhost/your-modx-folder/setup?
        - A small step for mankind, so why not take two...

        Working with web production, graphic design/workflow, photo and education - but are trying to get a life in between!
        • 13789
        • 4 Posts
        I went to that setup folder and here is the msg I got:

        FATAL ERROR: MODx Setup cannot continue.

        To use PHP 5.3.0+, you must set the date.timezone setting in your php.ini. Please do set it to a proper timezone before proceeding. A list can be found here.

        ----------------------------------------------------------------------------------

        I use Mac’s "Spotlight" to search for php.ini and did not find one. What is the correct directory path for php.ini?

        Thanks

        Jamie
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          Google is your friend. http://www.google.co.il/#hl=en&biw=1024&bih=638&q=snow+leopard+server+php.ini&aq=&aqi=&aql=&oq=&gs_rfai=&fp=af87d718779a9cb7
            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
            • 12028
            • 152 Posts
            You may rename ht.access file in the root of your MODx to. htaccess (you will probably get in trouble with that on a Mac - but you can do it with Terminal and type something like:
            file:mv ht.access .htaccess

            and insert a line like:
            php_value date.timezone Europe/Copenhagen
            in the .htaccess file.

            You can see a list of the timezones here: http://dk.php.net/manual/en/timezones.php

            But it all depends of the type of server installation!
              - A small step for mankind, so why not take two...

              Working with web production, graphic design/workflow, photo and education - but are trying to get a life in between!
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              Most programmer’s editors allow opening and saving hidden files. You can also configure your Finder to display hidden files if you want to.

              http://www.brooksandrus.com/blog/2007/03/23/mac-os-x-show-hide-hidden-files-in-finder/
              http://hints.macworld.com/article.php?story=20030409015020645
                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
                • 13789
                • 4 Posts
                Thanks Susan smiley Yeah I found more info on php.ini in google (don’t know why Spotlight did not tell me there was /etc/php.ini already there) and added/changed the settings in php.ini. Added the time zone thing there. (Uncomment it and put correct data for time zone).

                Now here is another error:

                FATAL ERROR: MODx Setup cannot continue.

                Make sure your /Library/WebServer/Documents/hawkterps/core/cache directory exists and is writable by the PHP process.

                ------------------------------------------------------------

                It is owned by root with group ’admin’ . It was 755 and I changed to 775 and it is no diff. The cache directory do exist.

                I chmod’ed to 777 for cache and it worked. Is 777 ok for cache directory?

                I did "ps -ef|grep apache" and it is owned by user id 79 which is "_appserver" so I did chmod 755 cache and chown _appserver cache and it still did not work (same error msg as above).

                Should I go ahead with chmod 777 cache or do something differently?

                Thanks

                Jamie
                  • 28042 ☆ A M B ☆
                  • 24,524 Posts
                  Yes, if you’re not using some kind of suexec for running PHP scripts as their owner rather than the Apache user any folder that needs to be written to by a PHP script has to be 777, and files have to be 666.

                  To be honest, I really don’t like working with a server that doesn’t use suexec so that I don’t have to have world-writable directories and files.

                  http://www.webmo.net/discus/support/messages/2/205.html?1190393671
                  http://www.unibia.com/unibianet/os-x/install-apache-perl-php-gd
                    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
                    • 13789
                    • 4 Posts
                    I found a posting saying that one can put in compiled suexec in /sbin and add suexec module for Apache without having to compile and install the whole Apache.

                    Turns out that the httpd’s userid is 70 which is _www so I changed the ownership of files/directories to _www and it works without having to have world-writeable.

                    So which is better, setting files/directory ownership to _www or use suexec?

                    I think I ll go with the former as it is lot easier for me that way and it is better security as it avoids the need for world-writeable and not having to do anything to do with root/superuser.