1

I updated to Yosemite about 3 hours ago; now all my Laravel projects show a 404 page when trying to load ANY route. It 'lists' the files when trying to go to the home route?

I created a new Laravel project and it works just fine; how can I fix this?

Here is what I mean:

As you can see, there is data there; mamp is running just fine. So I cannot figure out why it is not working?

Dave Cribbs
  • 809
  • 1
  • 6
  • 16
Haring10
  • 1,517
  • 1
  • 19
  • 37

4 Answers4

0

This is most likely a problem with MAMP more than Laravel. I run Laravel with Homestead and when I updated to Yosemite everything worked fine after restarting my VM. You may look at this post. Apache may not be starting on MAMP.

MAMP Folks just posted the workaround

Workaround for the 10.10 Preview 5 bug: Rename the file “envvars” located in /Applications/MAMP/Library/bin into “_envvars”

Test Update: It works!

If you get the courage as well you should really give Homestead a shot for developing with a Laravel. I even use it for Wordpress and everything else.

Community
  • 1
  • 1
Ross Edman
  • 798
  • 5
  • 14
0

So I created a new project via Terminal and coppied the code (I tried just dragging the files in finder and it gave the same results. So I created new files, and literally coppied the code and it worked just fine. I have no clue what it is, weird.

Haring10
  • 1,517
  • 1
  • 19
  • 37
  • If you use git for code management you could try taking your old files and your new files and doing a diff. Did you try updating Laravel or anything else? – Ross Edman Oct 20 '14 at 05:54
  • I am not using git for this project unfortunately. But I plan to in the future. I did not try updating Laravel, even though, it still is weird how the yosemite update broke MAMP and the laravel projects – Haring10 Oct 20 '14 at 06:07
  • If it keeps happening I would move the project into a Virtual Machine so you can isolate where the problem is. This would give you a clear indication if its MAMP or Laravel. – Ross Edman Oct 20 '14 at 06:13
0

I had to remove the comment (#) from the beginning of LoadModule php5_module in /etc/apache2/httpd.conf to enable PHP after updating to Yosemite, you may have to do the same.

robbymarston
  • 344
  • 3
  • 16
0

Yosemite does some serious changes to the environment. Apache is updated from 2.2 to 2.4, so one should check the httpd configuration.

PHP is updated from 5.4 to 5.5 - if you have had a working mcrypt module, you will have to reinstall that too. This is the most referenced link: http://coolestguidesontheplanet.com/install-mcrypt-php-mac-osx-10-10-yosemite-development-server/

What worked for me was updating XCode to 6.1 and then

brew update

brew install php55-mcrypt.

Be sure to link the correct php Module in your /etc/httpd.conf afterwards.

Community
  • 1
  • 1