Search

I'm getting the hang of a local installation of Symphony on 2 different macs. 1 is an iMac the other an laptop. I've tried a the old .zip way and using GIT. I've got the iMac setup both ways, everything is good, databases are up installation went smooth.

(I setup the Apache/PHP/MySQL using the guide on maestric.com. I've got some vhosts for local development and everything usually goes pretty good.)

But when I try the laptop setup I can get all the way to the database and where I should use localhost for the Host and 3306 for the Port I get an error and Symphony says: "Symphony was unable to connect to the specified database. You may need to modify host or port settings."

The weird thing I don't get is if I change 'localhost' to 127.0.0.1 then everything is fine, the installation goes through and I'm sent to the Symphony login page.

Does it matter if I'm using localhost vs 127.0.0.1 (they're the same, no?) Why would I be able to use localhost on my iMac, but not on my laptop? Is there a setting that I'm missing on the laptop for using localhost (I may have screwed it up on my own poking around in config files).

I guess in the end I'd like everything to be the same as far as getting Symphony installed... it messes with my learning when I'm faced with differences :-)

It looks as though you may have accidentally removed your localhost line from the hosts file.

check the file /etc/hosts to see if the line 127.0.0.1 localhost is there.

Thanks! I was excited for minute, but it looks like that's in there right. I was expecting to have done something like that... anywhere else I can look for something like that?

##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##
127.0.0.1   localhost
255.255.255.255 broadcasthost
::1             localhost 
fe80::1%lo0 localhost

#dev
127.0.0.1 dev.studio.yo
127.0.0.1 dev.studio-symphony.yo

I keep trying, that's my problem :-) So I created another setup, did the GIT thing and instead of using phpMyAdmin to make the new db I used Sequel Pro and the localhost setting was fine. I'll have to try again with phpMyAdmin and see if I get the same error.

I did upgrade phpMyAdmin today and added mycrypt because I got those messages when I went to use it. So I'm thinking it's the phpMyAdmin that's the culprit. I think that phpMyAdmin version update was pretty recent too, so I may go backwards and see if that fixes things.

Worth a try ;o)

localhost uses a socket connection, the ip uses a tcp/ip connection in PHP. Maybe there is something wrong with the socket or the socket settings?

When I recently set a mac dev environment up I had to manually create the socket. Can't remember why now, I think it was because of the particular homebrew formula I had used. Might be a good idea to at least check that /var/mysql/mysql.sock exists, and that php is looking for it there. Should be listed in a phpinfo();

sudo mkdir /var/mysql
sudo ln -s /tmp/mysql.sock /var/mysql/mysql.sock

Thanks guys! It looks like I've got the /tmp/mysql.sock setting for the default socket.

I did end up clearing up that issue by rolling back a version on phpMyAdmin (I'm at 3.4.1 now), it was a recent update 3.4.9 (12-21-11) that gave me that problem. I figured it was phpMyAdmin and not me. I'm rolling now.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details