User authentication using AngularJS, PHP, MySQL

I appreciate Swadesh Behera for contributing so much to Web Community who provides several  demo application on Angular JS, PHP and mySQL.

Particularly http://www.angularcode.com/user-authentication-using-angularjs-php-mysql/ is great.

I did setup on my local windows 2007 Laptop with PHP Separate distribution using Windows Apache 2.4.

People have consistently faced problem when they are running the Demo application in their local env.

session, signup and login HTTP Get and Post services consistently failed with 404 error.

I faced too and understood that issue would be primarily by doing two things.

  1. .htaccess
  2. httpd.conf allowing URL so 404 error could be resolved.

Steps i did to fix the issue.

  1. .htaccess

    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.*)$ %{ENV:BASE}index.php [QSA,L]

  2. httpd.conf.. Allowoveride ALL has to be done to fix 404 error.
    <Directory “Z:/Projects/xyz/Apache24/htdocs”>
    #
    # Possible values for the Options directive are “None”, “All”,
    # or any combination of:
    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    #
    # Note that “MultiViews” must be named *explicitly* — “Options All”
    # doesn’t give it to you.
    #
    # The Options directive is both complicated and important.  Please see
    # http://httpd.apache.org/docs/2.4/mod/core.html#options
    # for more information.
    #
    Options Indexes FollowSymLinks

    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be “All”, “None”, or any combination of the keywords:
    #   AllowOverride FileInfo AuthConfig Limit
    #

        AllowOverride All

    #
    # Controls who can get stuff from this server.
    #
    Require all granted
    </Directory>

 

 

 

 

 

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s