PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Monday, March 14, 2022

[FIXED] Laravel: no joy after MAMP upgrade from 3.4 to 4.1

 March 14, 2022     laravel, mamp, php     No comments   

Issue

As I am suffering a weird redirect problem and I read MAMP could be the cause I decided to upgrade it. I have my virtual hosts set and they are enabled in the conf. I set correct ports and set PHP version to 5.6.31 (it was 5.6.10). What happens when I start the servers is I can open the welcome screen of the laravel project (project.dev) but then the routes don't work with error 404. Example project.dev/home or project.dev/login etc. Any clue?

--- edit

I added this to my vhost and now it's working. Not sure if all the stuff there is needed as I just copied from the web. Strangely I didn't have anything of this in the past and it worked. Could it be apache was configured to allow mod_rewrite or something?

<Directory />
        Options Indexes FollowSymLinks MultiViews
        AllowOverride all
        Order allow,deny
        Allow from all
</Directory>

Solution

In your httpd.conf file set AllowOverride directive from None to All, for example:

<Directory />
    Options Indexes FollowSymLinks
    AllowOverride All
</Directory>

The default in Apache 2.3.9 and later is None, previous versions is was All. From the online docs:

When this directive is set to None and AllowOverrideList is set to None, .htaccess files are completely ignored. In this case, the server will not even attempt to read .htaccess files in the filesystem.

When this directive is set to All, then any directive which has the .htaccess Context is allowed in .htaccess files.



Answered By - Danny Thompson
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home
View mobile version

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing