@simondavies Yeah its code>new>index.html but even my laravel apps with public directories I still get 404
So I'm trying to get the built-in Apache to use PHP 7. I have PHP 7 installed via Homebrew and my $PATH is being called correctly with
which php
But when I do
phpinfo();
with Laravel, it seems Apache is still using PHP 5.5.31. I know this isn't a Valet issue per se, but any help would be appreciated.
@simondavies Are you using park?
valet park
@dawiyo yup! simple say cd /Desktop/Sites and then valet park
@simondavies Sorry, meant to mention @lstables
Managed to get it sorted from reading Eric Barnes' blog post. just unable to connect to database though.
@lstables have you gone and don these:
Started MariaDb or the DB
Logged into the DB via terminal or sequel pro with the username root and blank password, host 127.0.01
Then set up your user connections details and also a intitial DB as well?
My issue was i had to log in to the db and create my current user for the project and then it connect all ok.
hope this helps if not, post what error codes etc you are getting to help
@simondavies I ran
mysql.server start
Starting MySQL
. ERROR!
@dawiyo You need to tell apache to use the php7 module ...
LoadModule php7_module /usr/local/opt/php70/libexec/apache2/libphp7.so
Yes sorry @simondavies tried that too: Service `mariadb` already started, use `brew services restart mariadb` to restart.
@lstables can you access if via an app like sequel pro or via the terminal like mysql -u root -p etc?
@simondavies No I can't
mysql -u root -p
Enter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2 "No such file or directory")
@lstables sorry, getting to my limit of knowledge, on this type of subject now, are you running apache or normal mysql etc that could be making it connect else where, etc?
all i could find or something is http://stackoverflow.com/questions/30100222/mac-terminal-error-2002-hy000-cant-connect-to-local-mysql-server-through-soc
hope you get it sort...
@simondavies Cheers, but I Dunno, will just use Valet for no DB sites for now.
My error was caused by some bug where by MySQL was saying it couldn't find some .sock file. I basically just kept trying to reinstall MariaDB and eventually when I tried mysql -uroot it worked. Bizarre.
I then logged into SequelPro as per Valet's instructions and added my 'homestead' user and it worked like a charm.
i am using a oauth server and i try to login it does not redirect and got hang all server. anyone one facing this issue?
Is there now a good reason to prefer Homestead over Valet? I find Valet simple and easy to use while Homestead is a pain to set up and use. Not sure why would anyone prefer Homestead over it.
@jcrnkovic The main difference is the separation of environments. You can model your Homestead box to match your production environment versus Valet using the built-ins on your Mac.
Sometimes you may want to isolate packages to a Homestead environment for testing. For example, let's say you needed the ImageMagick library, but didn't want to have it on your local machine, Homestead would be a better choice.
Another point, albeit more for Vagrant, is having a standardized box matching production for teams.
I got an error.
$ valet install
[DomainException]
Unable to determine linked PHP.
install
$which php
returns:
which php
/usr/local/Cellar/php70/7.0.6/bin/php
@ZimrisNepal On my end the PHP Version is stored in
/usr/local/bin/php
Did you installed the PHP Version with Homebrew? e.g brew install homebrew/php/php70
@christopher I got a solution at StackOverflow that got this working. http://stackoverflow.com/a/37187508/456912
Hello there, I'm having trouble using valet with mysql. When trying to start mysql with mysql.server start I get this
Starting MySQL
. ERROR!
Also when I try to access mysql from terminal get following error:
mysql -u rooo -p
Enter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2 "No such file or directory")
Will glad if someone can help me. Thanks.
Do you found the solution dneykov ? i´m having the same issue.
Thanks
I fixed the issue about the sock by running the following;
brew install mysql
brew services start mysql
Please or to participate in this conversation.