MySQL error installing Drupal

Jasper Frumau jasperfrumau at gmail.com
Thu Jan 14 03:02:17 PST 2010


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

> Ugh, ignore my last email post, slip of the finders on the stupid phone...
>
> What command did you run to generate that output? That shows php info for
> Apples php, not MacPorts.
>

php -i

Yes I believe PHP and Apache are Apple. I turned of Websharing and now there
is Apache running

>
> You can tell from the following in your paste
>
> > phpinfo()
> > PHP Version => 5.3.0
>
> Suspect, this is Apple's version, MacPorts is:
> $port info php5
> php5 @5.3.1, Revision 1 (lang, php, www)
>
>   This is not concrete evidence that this is Apple's kit just yet, but we
> are close.
>
> > Build Date => Jul 19 2009 00:29:44
>
> Another suspect line, the build date is probably a lot earlier than that of
> when you built php with MacPorts.
>
> > Configure Command =>
>  '/var/tmp/apache_mod_php/apache_mod_php-53~1/php/configure'
>  '--prefix=/usr' '--mandir=/usr/share/man' '--infodir=/usr/share/info'
> '--disable-dependency-tracking' '--sysconfdir=/private/etc'
> '--with-apxs2=/usr/sbin/apxs' '--enable-cli' '--with-config-file-path=/etc'
> '--with-libxml-dir=/usr' '--with-openssl=/usr' '--with-kerberos=/usr'
> '--with-zlib=/usr' '--enable-bcmath' '--with-bz2=/usr' '--enable-calendar'
> '--with-curl=/usr' '--enable-exif' '--enable-ftp' '--with-gd'
> '--with-jpeg-dir=/BinaryCache/apache_mod_php/apache_mod_php-53~1/Root/usr/local'
> '--with-png-dir=/BinaryCache/apache_mod_php/apache_mod_php-53~1/Root/usr/local'
> '--enable-gd-native-ttf' '--with-ldap=/usr' '--with-ldap-sasl=/usr'
> '--enable-mbstring' '--enable-mbregex' '--with-mysql=mysqlnd'
> '--with-mysqli=mysqlnd' '--with-pdo-mysql=mysqlnd'
> '--with-mysql-sock=/var/mysql/mysql.sock' '--with-iodbc=/usr'
> '--enable-shmop' '--with-snmp=/usr' '--enable-soap' '--enable-sockets'
> '--enable-sysvmsg' '--enable-sysvsem' '--enable-sysvshm' '--with-xmlrpc'
> '--with-iconv-dir=/usr' '--with-xsl=/usr' '--with-pcre-regex=/usr'
>
> Here is the evidence above, all the paths to the libraries, modules, etc,
> are all system paths, or places that Apple ( and other *nix's are known to
> isntall, but MacPorts is near never known to install ) generally puts stuff.
>
> --sysconfdir=/private/etc
> --with-apxs2=/usr/sbin/apxs
> --with-mysql-sock=/var/mysql/mysql.sock
>
> Those are your giveaway's there that show this is an Apple php, and not a
> MacPorts.  MacPorts will use ${prefix} as a path, default, and known in your
> case to to /opt/local.
>
> The other clue is the sock location of '/var/mysql/mysql.sock', which is
> not anywhere near /opt/local/var/mysql
>
> > Configuration File (php.ini) Path => /etc
> > Loaded Configuration File => /private/etc/php.ini
>
> Two more clues this is Apple's php you are working with.
>
> > short_open_tag => On => On
>
> As a side note, you may want to turn these off, to force your development
> to not use short tags, and to also learn what apps do use them.  Those that
> do, you can enable short tags for that one site within your Apache config
> file, .htaccess, or within the code itself.  Ideally, you could file a bug
> and see how receptive the developers are to changing this.  It will only
> cause you trouble down the road.  At least, in my experience, that is all it
> ever has for me.
>
> > date.timezone => no value => no value
>
> This will need to be set, or you will spew errors to your Apache error_log
> all day long, and depending on your error reporting levels, you may also
> generate those errors to your http browser output as well.  The php docs are
> pretty clear about how to set this.
>
> > PATH =>
> /opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/b
>
> I previously asked for this value in another email, it looks like your PATH
> is correct. My estimation then is that you have Apache by Apple enabled in
> system prefs, turn that off, then you need to run the launchctl load command
> to load in Apache:
>
> $cd /Library/LaunchDaemons
> Look for "org.macports.apache2.plist" if it is there, then run:
> $sudo launchctl load -w org.macports.apache2.plist
>
> I get:
> org.macports.apache2: Already loaded
>
> You however, should not, I believe it will just return nothing,


Correct as there is no apache2.plist:

Jaspers-MacBook-Pro:LaunchDaemons jasper$ ls -a
.                    com.vmware.launchd.vmware.plist
 org.macports.mysql5.plist
..                    org.freedesktop.dbus-system.plist


> meaning success, and you can check it is working with:
> $sudo launchctl list | grep macports
>
> That will list everything macports is has loaded, in your case, I would
> expect to see:
> xxxxx   -       org.macports.apache2
> xxxxx   -       org.macports.mysql5
>

Only MySQL5 is listed..


>
> > PHP Variables
> >
> > _SERVER["PATH"] =>
> /opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
>
> I think this is part of your trouble.  While you are loading Apple's php,
> with Apple's Apache, it is still picking up bits of the MacPorts parts,
> based on your PATH telling it to look with precedence in /opt/local
>
> That is more a hunch, I do not completely understand this type of
> internals, since it is never really a goal to run a setup this way for me.
>
> Good luck.  Hopefully some others will have better answers for you
> tomorrow.
>

Thanks for all the help so far. I am sure I will get there eventually...

> --
> 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/a1d360db/attachment.html>


More information about the macports-users mailing list