On March 26, 2019 we launched new MODX Forums. Please join us at the new MODX Community Forums.
Subscribe: RSS
  • A useful addition to the install documentation.

    This applies when the mysql host is localhost. I am using the binary mysql installer (V 5.0.18) and the preinstalled version of php.

    I had trouble testing the database connection despite having set up a user and a database and having tested the connection from the command line.

    The root cause is that Mac OS X seems to put the mysql socket in a different place to where php is expecting it. I did the following
    cd /etc
    # Create php.ini if it does not already exist, if it does exist then check the socket line as below
    sudo cp -P php.ini.default php.ini

    # Edit the socket location in php.ini to be

    mysql.default_socket = /tmp/mysql.sock

    After doing this and restarting apache (sudo apachectl graceful), the connection test succeeded.

    Ed

    • Here is my 1-2-3 solution.

      1. Download MAMP.

      2. Install MAMP and set default ports in preferences (HTTP port to 80...)

      3. Put MODx in the htdocs directory and you are ready to rock.
        [html]<div><div style="float:left;"><a href="http://modxcms.com/Ditto-487.html" target="_blank"><img src="http://modxcms.com/assets/images/ditto.gif" alt="" border="0"></a></div><div style="float:left; padding: 0 5px 0 5px; border-left: 2px solid #ddd; margin-left: 5px;"><a style="display:block;"href="http://modxcms.com/ditto_docs.html">Documentation</a><a style="display:block;" href="http://modxcms.com/ditto_trac.html">TRAC (Bugtracker)</a><a style="display:block;"href="http://modxcms.com/forums/index.php/board,180.0.html">Forum</a><a style="display:block;"href="http://modxcms.com/forums/index.php/topic,13348.0.html">How to get help</a></div><div style="float:left; padding: 0 5px 0 5px; border-left: 2px solid #ddd;"><a style="display:block;"href="http://modxcms.com/ditto_wiki.html">User Wiki</a><a style="display:block;" href="http://modxcms.com/ditto_credits.html">Credits</a><a style="display:block;"href="http://modxcms.com/ditto_svn.html">SVN Server</a><a style="display:block;"href="http://modxcms.com/ditto">Ditto HQ</a></div><div style="float:left; padding: 0 5px 0 5px; border-left: 2px solid #ddd;"><a style="display:block;"href="http://modxcms.com/ditto_stable_download.html"><strong><span style="color:#CC0000;">Stable Download</span></strong></a><a style="display:block;"href="http://modxcms.com/ditto_download.html"><strong><span style="color:#CC0000;">Development Download</span></strong></a></div><div style="clear: both;"></div></div>[/html]
      • I used Mark Lyniage (errr, spelling) instructions for installing mySQL.
        I am also using the preinstalled version of PHP, sort of a bummer but hey it’s not that much of pain then.

        However, watch out for redoing Perl on OSX. At one time there was a problem with a header.pm file soemthing to do wtih non-recoginition of case on OSX.
          Tangent-Warrior smiley
        • Quote from: Mark at Jul 22, 2006, 07:33 PM

          Here is my 1-2-3 solution.

          1. Download MAMP.

          2. Install MAMP and set default ports in preferences (HTTP port to 80...)

          3. Put MODx in the htdocs directory and you are ready to rock.

          Works for me, too. Nice for being able to easily and quickly start/stop the servers if you have a memory crunch on your machine (1.5Gb here, so no problem wink ) It can also be set to use PHP 5 or 4 as you please. And it even has a Dashboard widget if putting the MAMP app icon in the Dock doesn’t suit your fancy.

          I’m not real happy about the whole thing having to reside in your Applications folder, but since it is a real Apache installation you can configure the Apache to use whatever folder you want for its http documents folder.
            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
          • I did notice one problem, which may have had more to do with my machine’s configuration behind the NAT router I use for connecting to the Internet, but I found that I could not send mail (for example, using the eForm snippet) until I followed some advice I found on the PHP documentation’s user comments:

            If you’re using a linux server using Postfix, and your server hasn’t the host name set to a valid name (because it’s behind a firewall in an intranet), it’s possible that when sending mails using the mail function, some mail servers reject them. This is because they can’t check the return path header. If you want to change the Return-Path used by sendmail init the php.ini and edit the sendmail_path variable to this:

            sendmail_path = "sendmail -t -i -F webmaster@yoursite.com -f webmaster@yoursite.com"

            I added this line to the php.ini file for PHP 5 (the sendmail_path line was commented out in the default php.ini file), and am now having no problems sending/receiving mail. I also updated MODx’s copy of /manager/includes/controls/class.phpmailer.php and class.smtp.php to the latest, 1.7.3.

            Actually, I think the problem wasn’t that I couldn’t send mail, it was more likely that my POP server wouldn’t accept it without the proper headers. In any case, after the fix to the php.ini file and the new class files, the mail goes through.
              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
            • Quote from: Mark at Jul 22, 2006, 07:33 PM

              Here is my 1-2-3 solution.

              1. Download MAMP.

              2. Install MAMP and set default ports in preferences (HTTP port to 80...)

              3. Put MODx in the htdocs directory and you are ready to rock.

              OK for development but not for deployment and doesn’t this limit you to one active MODx site? There is also something dubious IMHO about duplicating installs of apache and php. But back to the point there needs to be better documentation for MODx on the Mac.

              Ed
              • I usually have at least three different installations of MODx, I just put them all in their own folder under the htdocs folder. And if you wanted to, you could create as many virtual domains as you wanted in Apache, just like any *nix Apache installation. I think I had my old machine configured with five different virtual domains. It’s all in the httpd.conf file.

                MODx on a Mac is no different at all than MODx on anything else. Well, except maybe Windows servers, what with permissions and all, but that’s another matter altogether.
                  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
                • Quote from: sottwell at Jul 23, 2006, 03:06 PM

                  MODx on a Mac is no different at all than MODx on anything else. Well, except maybe Windows servers, what with permissions and all, but that’s another matter altogether.

                  As my first post pointed out, the mysql socket is at least one crucial difference which requires editing php.ini or installing alternative packages depending on your preferences. However, so far that is the only platform specific difference I have come across.

                  Ed
                  • Mail and MySQL settings would affect any php application you tried to use, not just MODx.
                      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
                    • Quote from: sottwell at Jul 24, 2006, 05:01 AM

                      Mail and MySQL settings would affect any php application you tried to use, not just MODx.

                      Indeed they would and in the php and rails apps I have used to date there has been some variant of a config file or a credentials file in which the socket was specified. To my mind specifying it once in php.ini is cleaner.

                      Why so defensive and resistant to the idea that this is a problem? I reported because it was a difficulty I had in installing MODx. When the problem hits you are left on your own to fix it, this is clearly a deficiency. I provided a fix.

                      Ed