Re: Help with conjoined apaches

2012-04-29 Thread Phil Dobbin
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 29/04/2012 05:50, j...@ayendesigns.com wrote:

 Getting warmer :)  I installed apache2, mysql5, mysql5-server, php5 and
 phpmyadmin. Apache is pointing to the correct place for apachectl after
 I added the path to .profile.
 
 The trouble I'm having now is mysql. I'm getting:
 
 ERROR 2002 (HY000): Can't connect to local MySQL server through socket
 '/opt/local/var/run/mysql5/mysqld.sock

First of all, have you checked that mysql-server is actually running?
Quickest way other than the cli is open Activity Monitor  select `All
processes`  enter `mysqld` in the search box.

Or from the cli 'ps -ef | grep mysql'

If it isn't running, start the server. If it is running, it's because
mysqld can't find the required `mysqld.sock`. In which case re-starting
the server should automatically generate the mysqld.sock file.

Also if you enter `ERROR 2002 (HY000): Can't connect to local MySQL
server through socket` in Google, you'll get about a million hits. It's
a very common problem when first installing/upgrading MySQL.

Cheers,

  Phil...

- -- 
But masters, remember that I am an ass.
Though it be not written down,
yet forget not that I am an ass.

Wm. Shakespeare - Much Ado About Nothing


-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: §auto-key-locate cert pka ldap hkp://keys.gnupg.net
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJPnPp0AAoJEKpMeDHWT5ADhAMH/3LimzJtKhayUzRUPFDgwc10
+7I9t/X7tvop0AtxwTUsnOxBMiFuyXr1XTR54XkPY4ZV4Wc4DYqr8teUWZKXXWX4
J6876wRHf/N5gM2Quf5W2w/bDA6UV9Is2uMyRr8mHNKfV8dJBoyFi8MzNJ/+844B
5bpw8QnDn/gYNjYYf40AMSpyyl91BhAviVMExVAvleyhYiA0EesWCrrcL4YP2AWZ
q8NoRRqPcssEwYGRxqVFVqPh7h0VAaK42wVQJPxyY0Krd+XawpzNSdwLdU6QWN72
W3ssoD0DdwcrKeyDxehpe1+ppoAWr6P4MDS4iPcpNQZFiylimx0NGv7zobrRzuk=
=Hgyy
-END PGP SIGNATURE-



smime.p7s
Description: S/MIME Cryptographic Signature
___
macports-users mailing list
macports-users@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macports-users


RE: mysql problem with socket (was Help with conjoined apaches)

2012-04-29 Thread jeff
That link came up non-existent, but I checked the mysql site and found the published solution about checking for the existence of the .sock file and moving it if it's in the wrong place.So, I found that there was mysql.sock in /private/tmp, but the error indicates it's being looked for in /opt/local/var/run/mysql5, so I moved it there, and I changed the group from 'wheel' to '_mysql'. Once moved, mysql would not start. I did a 'which -a "mysql5"' and it is in /opt/local/bin. However, moving the .sock file back to /private/tmp immediately caused mysql to start again. So, the question is if mysql is looking for the .sock file in the port path, and the mysql process running is from the port path, why does having the socket where it's being looked for break mysql rather than allowing me to run the command line program?

Your best bet is to read the official MySQL reference docs at:

http://dev.mysql.com/doc/refman/5.5/en/connecting-disconnecting.html;




___
macports-users mailing list
macports-users@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macports-users


Re: mysql problem with socket (was Help with conjoined apaches)

2012-04-29 Thread Phil Dobbin
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 29/04/2012 18:33, j...@ayendesigns.com wrote:

 That link came up non-existent

[snip]

 
 http://dev.mysql.com/doc/refman/5.5/en/connecting-disconnecting.html

 
http://dev.mysql.com/doc/refman/5.5/en/connecting-disconnecting.html;

trailing bracket caused that.

Cheers,

  Phil...

- -- 
But masters, remember that I am an ass.
Though it be not written down,
yet forget not that I am an ass.

Wm. Shakespeare - Much Ado About Nothing


-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: §auto-key-locate cert pka ldap hkp://keys.gnupg.net
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJPnYJEAAoJEKpMeDHWT5ADjDMH/ihNeFs+EfX4F4qxflnc9M7L
UM0ZrMH6H6owIzkX2Io/p9Fg9EvgRdB86h4jikyD6WL8VB6kEyoyEwMeswOlq2pP
y7ww9Ff/OrMJ4rpbeaevGRhnDYjC+NamQ4avU7urCjMF0fhnG3cyFKq7KYpHTj0L
klC+nvDw8q6wzIgoh1q45wDVO2WyNLBCURbSStB735Cc7bemLl85fmByyQCdx7pn
76082i68FwkepDfI83qM30i41EL0q2DkogwPZPItS0kEhLbQFwi6KwhzO7AR/kAJ
m6pEOKOT2TOMyhpL75z/TgCopOmiQ8qoouxAfebilgwx2rClQKoa2iDYq3QYaFA=
=rC5/
-END PGP SIGNATURE-



smime.p7s
Description: S/MIME Cryptographic Signature
___
macports-users mailing list
macports-users@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macports-users


Re: Help with conjoined apaches

2012-04-29 Thread Ryan Schmidt

On Apr 28, 2012, at 22:00, Jeremy Lavergne wrote:

 None of these files are provided by MacPorts and files provided by apache2 
 and mysql5 are missing so somehow apache2 and mysql5 were most likely 
 uninstalled by port.
 
 Do you try to do a forced upgrade apache2 and mysql5 that failed? I think 
 that would have uninstalled apache2 and mysql5 before building and 
 installing.
 
 I'd check the code for that one; pretty sure uninstall should never happen 
 until immediately before activate (unless the port itself commands otherwise).

Whether intentionally or not, MacPorts was changed a few versions ago so that 
running

sudo port -n upgrade --force foo

will FIRST uninstall the current version of foo, THEN build the new version of 
foo, which might fail, leaving you with no installed version of foo.



___
macports-users mailing list
macports-users@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macports-users


Re: Help with conjoined apaches

2012-04-29 Thread Jeremy Lavergne
 Whether intentionally or not, MacPorts was changed a few versions ago so that 
 running
 
 sudo port -n upgrade --force foo
 
 will FIRST uninstall the current version of foo, THEN build the new version 
 of foo, which might fail, leaving you with no installed version of foo.

Huh. I guess that's handy for when a package will pick up its own headers that 
were installed instead of using the ones that are in the source.

I must have forgotten about it happening :-)



smime.p7s
Description: S/MIME cryptographic signature
___
macports-users mailing list
macports-users@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macports-users


Re: Help with conjoined apaches

2012-04-29 Thread Bradley Giesbrecht

On Apr 28, 2012, at 8:00 PM, Jeremy Lavergne wrote:

 None of these files are provided by MacPorts and files provided by apache2 
 and mysql5 are missing so somehow apache2 and mysql5 were most likely 
 uninstalled by port.
 
 Do you try to do a forced upgrade apache2 and mysql5 that failed? I think 
 that would have uninstalled apache2 and mysql5 before building and 
 installing.
 
 I'd check the code for that one; pretty sure uninstall should never happen 
 until immediately before activate (unless the port itself commands otherwise).

I have done force upgrades several times recently and I seem to recall that the 
active port is force uninstalled before its replacement is built. I was on a 
live server and remembered thinking how unfortunate this is.

Here is a quick test with bash-completion showing uninstall happening first:

$ sudo port clean --all bash-completion
---  Cleaning bash-completion
$ port installed bash-completion
The following ports are currently installed:
  bash-completion @1.3_4
  bash-completion @1.3_5 (active)
$ sudo port -s upgrade --force bash-completion
---  Cleaning bash-completion
---  Unable to uninstall bash-completion @1.3_5, the following ports depend on 
it:
---git-core @1.7.9.2_0+bash_completion+doc+pcre+python27
---git-core 
@1.7.9.4_0+bash_completion+credential_osxkeychain+doc+pcre+python27
---git-core 
@1.7.9.5_0+bash_completion+credential_osxkeychain+doc+pcre+python27
---mercurial @2.1_0+bash_completion
---mercurial @2.1.2_0+bash_completion
---subversion @1.7.3_1+bash_completion
---subversion @1.7.4_0+bash_completion
Warning: Uninstall forced.  Proceeding despite dependencies.
---  Deactivating bash-completion @1.3_5
---  Unable to deactivate bash-completion @1.3_5, the following ports depend 
on it:
---git-core 
@1.7.9.5_0+bash_completion+credential_osxkeychain+doc+pcre+python27
---mercurial @2.1.2_0+bash_completion
---subversion @1.7.4_0+bash_completion
Warning: Deactivate forced.  Proceeding despite dependencies.
---  Cleaning bash-completion
---  Uninstalling bash-completion @1.3_5
---  Cleaning bash-completion
---  Fetching distfiles for bash-completion
---  Attempting to fetch bash-completion-1.3.tar.bz2 from 
http://distfiles.macports.org/bash-completion
---  Verifying checksum(s) for bash-completion
---  Extracting bash-completion
---  Applying patches to bash-completion
---  Configuring bash-completion
---  Building bash-completion
---  Staging bash-completion into destroot
---  Installing bash-completion @1.3_5
---  Activating bash-completion @1.3_5

To use bash_completion, add the following lines at the end of your 
.bash_profile:
  if [ -f /opt/local/etc/bash_completion ]; then
  . /opt/local/etc/bash_completion
  fi

---  Cleaning bash-completion
---  Updating database of binaries: 100.0%
---  Scanning binaries for linking errors: 100.0%
---  No broken files found.



smime.p7s
Description: S/MIME cryptographic signature
___
macports-users mailing list
macports-users@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macports-users


Re: Help with conjoined apaches

2012-04-28 Thread Jeremy Lavergne
 I do have an /opt/local/apache2, but not /opt/local/apache2/bin. 'which' 
 responds with /usr/sbin

That means you're always running Apple's apachectl---so far.

There should be one installed by MacPorts as well. Look for in the package list 
or peruse the /opt/local/apache2 directory, then make sure you have the path to 
it prepended to your $PATH so it gets used rather than the system one.



smime.p7s
Description: S/MIME cryptographic signature
___
macports-users mailing list
macports-users@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macports-users


Fwd: Help with conjoined apaches

2012-04-28 Thread Jeremy Lavergne
From: Bradley Giesbrecht pixi...@macports.org
 I did a 'find / -name 'apachectl' and the /usr/sbin is the only instance. Is 
 there a way to get macports to refresh the installation?
 
 You can deactivate apache2, then activate it again:
 sudo port deactivate apache2
 sudo port activate apache2
 
 First, would you mind checking the port contents though? Surely it's part of 
 the package, perhaps named apache2ctl?
 port contents apache2

It is named apachectl and /opt/local/apache2/bin needs to be in PATH _BEFORE_ 
/usr/sbin if you don't want to specify the full path to MacPorts apache2 
apachectl:

$ echo $PATH
/opt/local/apache2/bin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
$ which apachectl
/opt/local/apache2/bin/apachectl
$ port contents apache2 | grep /bin/
/opt/local/apache2/bin/ab
/opt/local/apache2/bin/apachectl
/opt/local/apache2/bin/apxs
/opt/local/apache2/bin/checkgid
/opt/local/apache2/bin/dbmmanage
/opt/local/apache2/bin/envvars-std
/opt/local/apache2/bin/htcacheclean
/opt/local/apache2/bin/htdbm
/opt/local/apache2/bin/htdigest
/opt/local/apache2/bin/htpasswd
/opt/local/apache2/bin/httpd
/opt/local/apache2/bin/httxt2dbm
/opt/local/apache2/bin/logresolve
/opt/local/apache2/bin/rotatelogs


Regards,
Bradley Giesbrecht (pixilla)




smime.p7s
Description: S/MIME cryptographic signature
___
macports-users mailing list
macports-users@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macports-users


Re: Help with conjoined apaches

2012-04-28 Thread Jeremy Lavergne
 This gets stranger and stranger. Ports says apache2 isn't installed. And I 
 have no mysql command anymore. This was all working 2 weeks ago. It appears 
 that somehow it got trashed. Should I start again with 'ports install' 
 apache2 and mysql5? 

That's pretty bizarre: but yes you can definitely reinstall. When installing 
again, it might say there are files that already exist. If that happens (and 
I'm pretty sure it will) you'll have to add the -f flag to ports, to move those 
files out of the way.

sudo port -f install apache2

When these files are moved, they're all given a suffix. You can use the find 
command to locate all files sharing this name and remove them.

find /opt/local -type f -name *.mp_XX -print -delete

Now, keep in mind the pattern MacPorts reports is what you need to put in the 
command, or you can be more cavalier and just use *.mp_*, which is obviously 
risky.



You might also want to review `port installed`, just in case something else is 
amiss.



smime.p7s
Description: S/MIME cryptographic signature
___
macports-users mailing list
macports-users@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macports-users


Re: Help with conjoined apaches

2012-04-28 Thread Jeremy Lavergne
 It wanted me to self-update and then freshen what is installed. I'm getting:
 
 Warning: Xcode appears to be installed but xcodebuild is unusable; some ports 
 will likely fail to build.
 Warning: You may need to run `sudo xcode-select -switch 
 /Applications/Xcode.app`
 
 on everything. I recently installed the ios sdk which brough with it a newer 
 version of xcode, which is likely the cause, but what will that switch do to 
 it if I execute it?

Running that command will properly set the path for xcodebuild, as some 
packages' source code is distributed as xcode projects. Be sure to check the 
Problem Hotlist on the MacPorts site for all Xcode upgrade issues:
https://trac.macports.org/wiki/ProblemHotlist#xcode43



smime.p7s
Description: S/MIME cryptographic signature
___
macports-users mailing list
macports-users@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macports-users


Re: Help with conjoined apaches

2012-04-28 Thread Bradley Giesbrecht

On Apr 28, 2012, at 6:36 PM, Jeremy Lavergne wrote:

 This gets stranger and stranger. Ports says apache2 isn't installed. And I 
 have no mysql command anymore. This was all working 2 weeks ago. It appears 
 that somehow it got trashed. Should I start again with 'ports install' 
 apache2 and mysql5? 
 
 That's pretty bizarre: but yes you can definitely reinstall. When installing 
 again, it might say there are files that already exist. If that happens (and 
 I'm pretty sure it will) you'll have to add the -f flag to ports, to move 
 those files out of the way.
 
 sudo port -f install apache2
 
 When these files are moved, they're all given a suffix. You can use the find 
 command to locate all files sharing this name and remove them.
 
 find /opt/local -type f -name *.mp_XX -print -delete
 
 Now, keep in mind the pattern MacPorts reports is what you need to put in the 
 command, or you can be more cavalier and just use *.mp_*, which is 
 obviously risky.
 
 
 
 You might also want to review `port installed`, just in case something else 
 is amiss.

Yes, please post the following commands:

echo $PATH
which port
grep -v -E ^#|^$ /opt/local/etc/macports/macports.conf
port installed


Regards,
Bradley Giesbrecht (pixilla)



smime.p7s
Description: S/MIME cryptographic signature
___
macports-users mailing list
macports-users@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macports-users


Re: Help with conjoined apaches

2012-04-28 Thread Jeremy Lavergne
 Ok, but is xcodebuild unusable because it's not there, or because the new 
 xcode version's xcodebuild isn't liked by macports?  If the latter, and it 
 changes the path, how would I switch it back in order to use the iphone sdk 
 version?

When Xcode updated, it didn't update it's command line tools to point to the 
new location (moved from /Developer to /Applications/Xcode.app). This breaks 
anything that uses the command line tools until you manually run Xcode's 
command to update this.

MacPorts likes xcodebuild, you just have to ensure xcodebuild functions.



smime.p7s
Description: S/MIME cryptographic signature
___
macports-users mailing list
macports-users@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macports-users


Re: Help with conjoined apaches

2012-04-28 Thread Bradley Giesbrecht
Jeff, try to remember to reply to the list by hitting Reply All.

On Apr 28, 2012, at 7:13 PM, j...@ayendesigns.com wrote:

 MacBook-Pro:/ acme$ echo $PATH
 /opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin

Add /opt/local/apache2/bin: to the front of you PATH env variable in 
~/.profile.

 MacBook-Pro:/ acme$ which port
 /opt/local/bin/port
 
 MacBook-Pro:/ acme$ grep -v -E ^#|^$ /opt/local/etc/macports/macports.conf
 prefix /opt/local
 portdbpath /opt/local/var/macports
 applications_dir  /Applications/MacPorts
 frameworks_dir /opt/local/Library/Frameworks
 sources_conf   /opt/local/etc/macports/sources.conf
 variants_conf  /opt/local/etc/macports/variants.conf
 universal_archsx86_64 i386

This looks reasonable.

 MacBook-Pro:/ acme$ port installed
 The following ports are currently installed:
 apr @1.4.5_1
 ...
 zlib @1.2.6_0 (active)

Ok, no apache2 or mysql5 is installed. If you added any virtualhosts to apache 
or databases to mysql they should still be there.

What is the output of this:
find /opt/local/apache2
find /opt/local/var/db/mysql5


Regards,
Bradley Giesbrecht (pixilla)



smime.p7s
Description: S/MIME cryptographic signature
___
macports-users mailing list
macports-users@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macports-users


Re: Help with conjoined apaches

2012-04-28 Thread Jeremy Lavergne
 None of these files are provided by MacPorts and files provided by apache2 
 and mysql5 are missing so somehow apache2 and mysql5 were most likely 
 uninstalled by port.
 
 Do you try to do a forced upgrade apache2 and mysql5 that failed? I think 
 that would have uninstalled apache2 and mysql5 before building and installing.

I'd check the code for that one; pretty sure uninstall should never happen 
until immediately before activate (unless the port itself commands otherwise).



smime.p7s
Description: S/MIME cryptographic signature
___
macports-users mailing list
macports-users@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macports-users


RE: Help with conjoined apaches

2012-04-28 Thread jeff
Getting warmer :) I installed apache2, mysql5, mysql5-server, php5 and phpmyadmin. Apache is pointing to the correct place for apachectl after I added the path to .profile. The trouble I'm having now is mysql. I'm getting:ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/opt/local/var/run/mysql5/mysqld.sock 
___
macports-users mailing list
macports-users@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macports-users


Help with conjoined apaches

2012-04-27 Thread Jeff Greenberg
I installed macports lamp, and what seems to be happening is that apachectl 
reports based on the osx stack in terms of where the config file is, the 
vhosts, etc, and apache uses its config files too. But requesting a page seems 
to use the macports server path and ignore the vhosts. Should I remove the 
macports stack and just add mysql to lion's apache, or is there a way to 
straighten out this mess?
___
macports-users mailing list
macports-users@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macports-users


Re: Help with conjoined apaches

2012-04-27 Thread Jeremy Lavergne
 I installed macports lamp, and what seems to be happening is that apachectl 
 reports based on the osx stack in terms of where the config file is, the 
 vhosts, etc, and apache uses its config files too. But requesting a page 
 seems to use the macports server path and ignore the vhosts. Should I remove 
 the macports stack and just add mysql to lion's apache, or is there a way to 
 straighten out this mess?

Sounds like you're just using the system's apachectl binary.

Does your path contains /opt/local/apache2/bin? Also, `which -a apachectl` may 
help you see which one you're using.



smime.p7s
Description: S/MIME cryptographic signature
___
macports-users mailing list
macports-users@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macports-users


Re: Help with conjoined apaches

2012-04-27 Thread Ryan Schmidt

On Apr 27, 2012, at 18:38, Jeff Greenberg wrote:

 I installed macports lamp, and what seems to be happening is that apachectl 
 reports based on the osx stack in terms of where the config file is, the 
 vhosts, etc, and apache uses its config files too. But requesting a page 
 seems to use the macports server path and ignore the vhosts. Should I remove 
 the macports stack and just add mysql to lion's apache, or is there a way to 
 straighten out this mess?

I don't think there's a mess, I just think there's a misunderstanding that you 
think running apachectl will get you the version installed by MacPorts, and 
that's not usually the case, unless as Jeremy said you modified your PATH. So 
either modify your PATH, or just run the MacPorts apachectl by its full path.


___
macports-users mailing list
macports-users@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macports-users