• Hi all

    I’ve upgraded from Mac OSX 10.4 to 10.5, and now I can’t get my WordPress site to function locally.

    I understand that using MAMP I need to rest the Apache and MySQL ports to the defaults, not the MAMP settings; that’s done.

    But should I now park my files in the “home/sites” folder, as opposed to “MAMP/HTDocs”? My istall seems to go fine up to the point where the helper tries to make a wp-config file, whereupon I get the error message “error establishing a database connection”

    Anyone help me here?

Viewing 10 replies - 1 through 10 (of 10 total)
  • How is your apache configured? Normally you would configure your default virtual host to server files from your desired document root.

    Check /etc/httpd/httpd.conf

    Thread Starter spiritbased

    (@spiritbased)

    Pardon my ignorance but I don’t understand?!

    With 10.5, Apple switched to Apache2, and that includes PHP5. The default configuration file for Apache2 does not have PHP5 set to “on,” so, one has to edit the configuration file. That configuration file is no longer kept in the same directory that it was in under 10.4, so one has to follow a new path to get to the configuration file to edit it.

    The new path is

    /private/etc/apache2/

    and the file to be edited is

    httpd.conf

    (which I would copy and save somewhere safe).

    Because httpd.conf is owned by root, one will have to copy them to another directory where one has write permissions or edit them using sudo-prefaced commands.

    There’s more info in an Apple forum discussion at

    https://discussions.apple.com/thread.jspa?threadID=1187457

    However (should I shout “HOWEVER?”), although I’ve done this, I’m not completely through the maze yet. I now have a server that recognizes and executes PHP pages, but it’s choking on WordPress php scripts.

    I’m still searching for more information in these fora about resolving that issue.

    After some fits and starts, I now appear to have mysql and php functioning properly under OS 10.5.1 (Mac “Leopard”). I had to complete both of the following steps based on https://bugs.mysql.com/bug.php?id=28854:

    (a) the step mentioned 31 Oct 20:42 by Richard Valk, modding mysql-server [line 62] so that _mysql is the user (note underscore, which 10.5 apparently sets the mysql user to) and

    (b) the step mentioned 8 Nov 3:36 by Donald Tyler, modding /private/etc/php.ini [line 720] so that mysql.default_socket = [blank] became mysql.default_socket =
    /private/tmp/mysql.sock.

    There probably are other ways around some of these issues. For example, I suspect that one could edit the database of users rename _mysql to be mysql. Also, I guess one could put a sym link in the place that PHP is looking for the mysql.sock.

    I hope the path I’ve taken is the most sensible. *Sigh*

    I don’t follow part a) of JohnL’s posting becuase I don’t have the mysql.server file, but part b) fixed my local wordpress DB connectivity issue. I had to create a php.ini file, which I did by copying php.ini.default. Thanks!

    Thread Starter spiritbased

    (@spiritbased)

    Guys

    I’m sorry but you may as well be talking Swahili to me. All I know is that when I install MAMP and try to set up WP, I type localhost:8888 into my browser and all I get is “error establishing database connection”

    Anyone as noob as me having the same problem?

    I’m having the same problem. I get the same message, though I have another site with some very (very) basic php that works fine, so I dunno. There’s a good tutorial you probably already saw (if you had it installed previously) at:

    https://michaeldoig.net/4/installing-mamp-and-wordpress.htm

    Doesn’t work for me, though. I’m on 10.5 too, but I tried it on my old machine (running 10.4) with the same results. Let me know if you figure something out! ??

    Back again. Got it to work now, but had to reinstall MAMP and create a new database. The files must be in the “htdocs” in the MAMP folder. If they’re in /sites, MAMP won’t find them. Also, the ports need to be set to the MAMP defaults (8888 and 8889). Also, turn off “personal web sharing” (appears to be simply “web sharing” in Leopard) in system prefs. It worked for me in the end, though it took a while to get there. Good luck, spiritbased. ??

    Having the same issues with all three.. leopard, mamp and wp… my web sharing is already off….

    Opening up the MAMP application, not the dashboard widget, and switching from PHP 4 to PHP 5 in the options solved my problems.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘WP, Leopard and MAMP’ is closed to new replies.