MySQL error installing Drupal

Jasper Frumau jasperfrumau at gmail.com
Thu Jan 14 02:29:00 PST 2010


On Thu, Jan 14, 2010 at 1:03 PM, Scott Haneda <talklists at newgeo.com> wrote:

> Ok, lets take a step back and see if we can clear this up.
>
> At some point, you installed MacPorts, and now you are running commands
> that you desire to call to the MacPorts installed applications, but we are
> not sure that is the case or not.
>
> A few useful things that you could show us:
>
>    $which -a php
>

I keep on learning here every day!

Jaspers-MacBook-Pro:~ jasper$ which -a php
/usr/bin/php



>
> This will show what your shell knows about the locations of php, in order,
> for all of them.  In my case, I see:
>
>    /opt/local/bin/php
>    /usr/bin/php
>
> This tells me, when I type `php` on the command line, that it really is
> going to run `/opt/local/bin/php`. ( The first one in the above results )
>
> This may also be helpful to others here who will help you:
>    $which -a httpd
>

Jaspers-MacBook-Pro:~ jasper$ which -a httpd
/usr/sbin/httpd


>
> The order in which your system is searched for these files in controlled by
> your PATH environment variable, which you can get to by entering in:
>
>    $echo $PATH
>
> Mine returns something like this:
>
> /opt/local/bin:/opt/local/sbin:/Users/me/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
>

Jaspers-MacBook-Pro:~ jasper$ echo $PATH
/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
Jaspers-MacBook-Pro:~ jasper$

If you look in your home dir, you should see that MacPorts has added a
> config file to add to the $PATH for you.  It is usually at ~/.profile.
>
> If your `echo $PATH` command does not have /opt in it, there is a source of
> problem there that we need to solve first.
>

Well opt is part of the path..

>
> Finally, type the three letters `ENV` into your terminal, and show that
> output as well.
>

Unfamiliar with this command, but here we go:

Jaspers-MacBook-Pro:~ jasper$ ENV
TERM_PROGRAM=Apple_Terminal
TERM=xterm-color
SHELL=/bin/bash
TMPDIR=/var/folders/E6/E6iKsafiF9Wnbja513eS0E+++TI/-Tmp-/
Apple_PubSub_Socket_Render=/tmp/launch-yULxPh/Render
TERM_PROGRAM_VERSION=272
USER=jasper
COMMAND_MODE=unix2003
SSH_AUTH_SOCK=/tmp/launch-CZKr9o/Listeners
__CF_USER_TEXT_ENCODING=0x1F5:0:0
PATH=/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
PWD=/Users/jasper
DBUS_LAUNCHD_SESSION_BUS_SOCKET=/tmp/launch-5Z4X0q/unix_domain_listener
SHLVL=1
HOME=/Users/jasper
LOGNAME=jasper
LC_CTYPE=UTF-8
DISPLAY=/tmp/launch-j8MXhn/:0
_=/usr/bin/ENV


>
> With all that, I think we should be able to help you from there.  More
> comments inline below...
>
>
> On Jan 14, 2010, at 12:47 AM, Jasper Frumau wrote:
>
> >> Which PHP is your web server using -- Apple or MacPorts?
> >>
> >
> > @ http://localhost/drupal-6.15/info.php PHP 5.3.0 is indicated and
> > mysql.sock is still not defined so I guess I have two PHP versions? How
> did
> > that ever happen? If this is the Apple or MacPorts one I do not know..
>
> It should be pretty easy to tell, one way, go into your System Preferences,
> and open up the Sharing Preference Pane, is Web Sharing turned on?  If it
> is, you have an instance of Apple's Apache running.
>

Yes. Turned on. I will turn it off for now..  No Apache running like this at
the moment though..


> You can turn it off, but I am going to bet you break any sites you
> currently have running by doing so.  But it should not be too hard to get
> them back up and running.  If they were running under Apple's Apache, they
> certainly will run under MacPorts build of it.
>
> >> Which PHP are you using on the command line -- Apple or MacPorts?
> >
> > How do I check that? php -i shows the one phpinfo shows on the localhost
> > with phpinfo();
>
> The version number returned from php -i would be a good start, Apples and
> MacPorts are more than likely different:
>
> MacPors Version (You may have a slightly different version)
>    $/opt/local/bin/php -i | grep 'PHP Version'
>    PHP Version => 5.3.1
>    PHP Version => 5.3.1
>
> Apple's Version (Snow Leopard)
>    $/usr/bin/php -i | grep 'PHP Version'
>    PHP Version => 5.3.0
>    PHP Version => 5.3.0
>
> But that is not the best test, since there is always chance of version
> parity. Probably the most telling, is going to be to run `php` with no
> direct full path, as so:
>
>    $php -i | grep 'Configuration File'
>
> My results:
>    Configuration File (php.ini) Path => /opt/local/etc/php5
>    Loaded Configuration File => /opt/local/etc/php5/php.ini
>
> That will tell us which php you are using, but it may also be helpful to
> see
>    $/opt/local/bin/php -i | grep 'Configuration File'
>    $/usr/bin/php -i | grep 'Configuration File'
>
> >> I have a feeling you're using a different PHP on the command line than
> >> you're using in your web server.
> >
> > I do too..
>
> This would be controlled by the launchd item that is starting it, assuming
> you do not start Apache by hand.
>
> What does:
>
>    $sudo ps aux | grep -i http
>

I urned Apple sharing on again and:

Jaspers-MacBook-Pro:~ jasper$ sudo ps aux | grep -i http
Password:
jasper    2256   0.0  0.0  2435032    528 s000  S+    1:27PM   0:00.00 grep
-i http
_www      2250   0.0  0.0  2451644    636   ??  S     1:27PM   0:00.00
/usr/sbin/httpd -D FOREGROUND
root      2249   0.0  0.2  2451644   9736   ??  Ss    1:27PM   0:00.16
/usr/sbin/httpd -D FOREGROUND


>
> return for you when Apache is running?
>
> Also, please run:
>
>    $sudo launchctl list | grep -i apache
>

Jaspers-MacBook-Pro:~ jasper$ sudo launchctl list | grep -i apache
2249    -    org.apache.httpd


> Looking over your older threads here, it looks like you have MySql running,
> and you are also using the MacPorts version, as denoted by the "5" in the
> mysql5 command you showed.
>
> Are you running Mac OS X Server by any chance?
>

No..

>
> I think with the output to the commands above, someone here can guide you
> down the right path.  Right now, it is hard to say what is going on.
>  Personally, I would move your sites from /Library/WebServer/Documents once
> you get this up and working, and put them at /www or /home/www or something
> like that; somewhere where 1) Apple is more unlikely to mess with it, and 2)
> Apple is not aware it is there, so you know Apple's Apache will never locate
> it.
>
> --
> Scott * If you contact me off list replace talklists@ with scott@ *
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-users/attachments/20100114/2a0a5445/attachment.html>


More information about the macports-users mailing list