Jump to content

Noob question for web devs

rans
Go to solution Solved by leonfagan71,
Just now, Ranz said:

Hello thanks for the reply and help!
is that the minimum i could install to solve my problem?

I have used Xampp in the past and I find it to work well for small dev things.

If you plan to use a database, you can allow MySQL to install, (it is selected by default)

but you'd need Apache with PHP and MySQL if you want it.

 

Regards,

Leon.

Hello there i'm just newbie here learning html +php
anyway i do not know how to explain but i'll try my best so you guys can help me. LOL.
whenever i try to edit a php file (with an html in it) php script does not work on local. i mean i just open my browser and open the file like C:\Users\name\Desktop\myfolder\file.php and it only read the html parts. 
do i need to install something?
is there a way to install only the php or i mean minimum requirement in order to make it work?

Thanks! Please forgive me on my question i'm just starting to learn :D

Link to comment
Share on other sites

Link to post
Share on other sites

You'll need to install a web server of some sort, PHP is not built into the operating system.

 

This is Xampp, it includes a few other features but you will need to install Apache/PHP

https://www.apachefriends.org/index.html

 

You can then place your files in c:\xampp\htdocs and browse to http://localhost in your browser.

 

If you need further help with this, please PM me and I'll see what I can do to help.

 

Regards,

Leon.

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, leonfagan71 said:

You'll need to install a web server of some sort, PHP is not built into the operating system.

 

This is Xampp, it includes a few other features but you will need to install Apache/PHP

https://www.apachefriends.org/index.html

 

You can then place your files in c:\xampp\htdocs and browse to http://localhost in your browser.

 

If you need further help with this, please PM me and I'll see what I can do to help.

 

Regards,

Leon.

Hello thanks for the reply and help!
is that the minimum i could install to solve my problem?

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, Ranz said:

Hello thanks for the reply and help!
is that the minimum i could install to solve my problem?

I have used Xampp in the past and I find it to work well for small dev things.

If you plan to use a database, you can allow MySQL to install, (it is selected by default)

but you'd need Apache with PHP and MySQL if you want it.

 

Regards,

Leon.

Link to comment
Share on other sites

Link to post
Share on other sites

To be clear xamp is not the software that makes php script run.

 

Apache is the webserver that serves the the requested document to the server like html/js and even php documents

 

The thing is apache cant execute the code thats in there so if you renamed it to .php it will most of the times just download the file. So ypu have to install php and let it WORK WITH Apache to serve it correctly. Php gets executed on the serverside once its done basicly apache will serve it to the user who has requested it with the php results in there.

 

XAMPP or WAMP even MAMP are bundles of these software for example wamp stands for Windows, Apache, MySQL, PHP.

 

TLDR install onces of these software bundles to get started quickly. Like it says you have a webserver php and even mysql since most applications need a mysql server.

Quote or mention me if not feel ignored 

Link to comment
Share on other sites

Link to post
Share on other sites

There are also alternatives for Apache to run a webserver.

 

Like https://www.nginx.com/

https://caddyserver.com/

https://www.lighttpd.net/

 

I do not know how accurate this is https://news.netcraft.com/archives/2016/07/19/july-2016-web-server-survey.html

 

I personally use NGINX, find the configs easier to understand fast. But i havent had much time with Apache and i mostly forgot the big part of it.

Quote or mention me if not feel ignored 

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×