MySQL error installing Drupal
Scott Haneda
talklists at newgeo.com
Thu Jan 14 03:04:38 PST 2010
Ok, really quick, and I need to get off to sleep…
On Jan 14, 2010, at 2:29 AM, Jasper Frumau wrote:
> 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
Weird, in your earlier emails your $PATH was showing /opt/local had been added, as well as the sub directories for it to find php. Anyone else have any ideas on that one?
>> 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
This is normal, and my mistake, I have added the '/opt/local/apache2/bin/' path to some of my settings on some machines, and not others, assuming I had done it to all. It is not to be expected to see httpd show up with the `which` command under MacPorts unless you take extra steps to make it happen. Ignore my noise on this one, sorry.
>> 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..
Ayup, so you are good on that front.
>> 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
Looks fine to me. From a command line perspective, it would seem your MacPorts install is correct. However, `which php` is not locating the php installed by MacPorts.
Or do I have this wrong, and you are content with using Apple's php?
If you are wanting to use MacPorts php, what does `port installed` return?
>> 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..
Maybe you can give us a clear explanation of what your goals are, is it to run Apache2, Mysql5, and php5 all under MacPorts, or do you want to mix and match bits from Apple and MacPorts? I suggest the former, and should have nightmares about the later in about a half hour :)
>>>> 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
Ok, well, it is beyond clear you are running Apple's Apache, but I am not clear on your end goals, so I am going to stop at this point, as I will only add more to the confusion here. Next up I think is to find out what it is you want to do. Not from a "what app's you want to run in your webserver" perspective, but from a "what server stack do you want to use", and how do you want it to all talk to each other.
>> 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
That should go away when you turn off the sharing checkbox.
--
Scott * If you contact me off list replace talklists@ with scott@ *
More information about the macports-users
mailing list