Installing php 5 on apache




















Statements prefixed by the hash " " sign are regarded as having been commented out. This is not a typographical error. You do not have to do this in any of the Apache 2 series of web servers. Next, search for "AddType" in the file, and add the following line after the last "AddType" statement. Do this no matter which version of Apache you are using.

For Apache 2. Finally, for those using one of the Apache 2 versions, you will need to indicate the location of your PHP ini file. Add the following line to the end of your httpd. If you are using Apache 1, you will have already placed your php.

If you have configured PHP 5 to run as an Apache module, skip forward to the next section. Search for the portion of your Apache configuration file which has the ScriptAlias section. Add the line from the box below immediately after the ScriptAlias line for "cgi-bin". If you use Apache 2. You will need to do the same. Search for the "AddType" comment block explaining its use, and add the AddType line in the box below after it.

Add the following somewhere in the file, such as after the comment block explaining "Action". If you create a file index. To do this, look for the line in the file that begins with "DirectoryIndex" and add "index. For example, if the line used to be:. Restart your Apache server. This is needed because Apache needs to read the new configuration directives for PHP that you have placed into the httpd.

The Apache 2. Save the file as "test. If you are using Notepad, remember to save as "test. Do not open the file directly on the hard disk — you'll only see the words you typed in earlier. You need to use the above URL so that the browser will try to access your Apache web server, which in turn runs PHP to interpret your script. I neither created phpcgi, nor did I create php I found a posting by David Brogdon to be a good complement to Wittich's answer for those who are new to the configure, make, and make install commands:.

I searched the Internet for hours and never found anything as helpful as Brogdon's post and Wittich's answer. Wittich's answer must have worked perfectly on his Unix system, but I had to modify it a bit in order to get it to work on mine. Stack Overflow for Teams — Collaborate and share knowledge with a private group.

Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Installing PHP 5. Asked 6 years, 10 months ago. Active 1 year, 6 months ago. Viewed 33k times. I successfully installed PHP 5. Some people asked me to run this: sudo apt-get install libapache2-mod-php5 But after running the command, it installed PHP 5. Open a text editor. Save this file in your Web server's document root as info.

Start any Web browser and browse the file. You will see a long table of information about your new PHP installation message Congratulations! Malhar Lathkar. Syed Raza. If your PHP and Apache versions are different then please take care accordingly. Download Apache server from www. The installer will also ask you whether you want to run Apache as a service or from the command line or DOS prompt.

We recommend you do not install as a service, as this may cause problems with startup. Copy some. You need php5ts.

It's possible that you will also need others from the dlls subfolder. Copy either php.



0コメント

  • 1000 / 1000