Installing PHP on a server, what does that mean?
Here in the tutorial on PHP I read:
If your server supports PHP you don't need to do anything.
Just create some .php files in your web directory, and the server will parse them for you. Because it is free, most web hosts offer PHP support.
However, if your server does not support PHP, yo开发者_如何学运维u must install PHP.
Firstly, I am not quite sure what it means to "install PHP" here. (How can a programming language be installed?)
Secondly, does this mean that I can go to any free host, even a host that doesn't support PHP, "install PHP" on it and it will start doing all PHP tasks for me?
The webservers doesn't know what to do with PHP files, therefore you have to tell it to direct those requests to the PHP interpreter, which you need to install seperately.
Your webhost needs to have this installed, it's not something you can do yourself on a shared webhost.
You can find more information here:
http://nl3.php.net/manual/en/intro-whatcando.php
Installing a programming language is the same as installing other software. The difference is the place where you install it. Usually shared hosting servers have it installed and if they don't you probably can not do that by yourself. So, since there is a lot of options you can choose one that has.
If you, for example, want to install it somewhere where you are allowed to (your machine :) there are different options
1) Windows - download binary and click and install.
2) *Nix - automatic installation - use some package manager tool like yum
or apt-get
to install binaries that are already prepared for you
3) *Nix - build it by yourself by make tools provided on the system you are running.
I have never compiled and built it on windows so I don't know how it works there ;)
Source and binaries are here - http://www.php.net/downloads.php
You can find more info about installing and configuring php here http://php.net/manual/en/install.php
PHP Installing means either manually compiling the source code ( common if you're setting up a customized PHP on the server ), or more practically downloading packages such as
php5
,php5-common
and related packages with a tool such asyum
orapt-get
( at least on Linux ).You can't install PHP on a free shared host, you can install PHP on a server that you have root access to, such as a dedicated or VPS server.
Yes a programming language can be installed (or more precisely, the support files for compiling/interpreting a language are). On Linux machine, installing Apache & PHP is done through either
apt-get
(Ubuntu) oryum
(Fedora).On Windows machines, you can get a Apache& PHP setup quite easily: just grab WAMP.
No you cannot go to any "free host" and expect to install stuff as you wish. Usually you get what you pay for: free hosting -> less degrees of liberty.
精彩评论