Mobile app version of vmapp.org
Login or Join
Carla537

: User Accounts on a website A website that I'm making on my mac has been giving me issues. I'm trying to create user accounts for the site using php but chrome/firefox keeps downloading it

@Carla537

Posted in: #Firefox #GoogleChrome #Html #Php

A website that I'm making on my mac has been giving me issues. I'm trying to create user accounts for the site using php but chrome/firefox keeps downloading it instead. So I use my iPad and it keeps trying to also download the php script. So I'm starting over. How can I:

Prevent Chrome/firefox from downloading my php scripts
Is there a basic tutorial for making user accounts on a website?
My Setup: Macbook Pro running 10.6.8 Mamp Google Chrome

10.03% popularity Vote Up Vote Down


Login to follow query

More posts by @Carla537

3 Comments

Sorted by latest first Latest Oldest Best

 

@Rivera981

if your server is asking you to download .php files instead of displaying them, something is wrong with your PHP Handler. This should be set up already in your Apache httpd.conf file, but you can also add it in an .htaccess file like so:

AddHandler application/x-httpd-php .php .html


or

AddHandler application/x-httpd-php5 .php .html


depending on your server setup

.html is not necessary but just shown here to demonstrate you can list multiple file extensions and have them all be treated as PHP files.

to make sure your server will process .htaccess files, be sure the AllowOverride directive is not set to All instead of None or it will ignore .htaccess files.

10% popularity Vote Up Vote Down


 

@Lee4591628

Why don't you just take/copy all the project files to the mamp localhost root directory /Applications/MAMP/htdocs/ then launch the mamp server and go to localhost or 127.0.0.1 on your url.
expressionengine.com/wiki/MAMP_setup/#Basic_Setup
Hope that helps.

10% popularity Vote Up Vote Down


 

@Yeniel560

Looks like your webserver is not setup correctly. Make sure that it is actually processing the PHP script rather than just serving the file directly to the browser (without any server-side processing).

The most basic of user account scripts is where a username and password are stored in a MySQL database and when a login is posted via a form to the PHP script, the supplied details are checked against the database and if correct, a cookie is given to the user to show that the computer is logged in.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme