Developers.TestingEnvironment.Server.HTTP: Difference between revisions

From Shareaza Wiki
Jump to navigation Jump to search
No edit summary
m (Added small notice: Note that only structural updates have been made. The content itself has not been checked for correctness.)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{{do not translate}}
{{Updated|2010-08-28|2.x.x.x| Note that only structural updates have been made. The content itself has not been checked for correctness.}}
== Setting up a HTTP server ==
If you want to install an HTTP server, I recommend using Apache2 from [http://httpd.apache.org/ Apache.org].  More comprehensive instructions should be posted to this page later about how to download and install the server (or links to pages that do); but Apache.org has very comprehensive [http://httpd.apache.org/docs/2.0/ help documentation].
If you want to install an HTTP server, I recommend using Apache2 from [http://httpd.apache.org/ Apache.org].  More comprehensive instructions should be posted to this page later about how to download and install the server (or links to pages that do); but Apache.org has very comprehensive [http://httpd.apache.org/docs/2.0/ help documentation].


If you want to take a hand at installing PHP, MySQL, and Perl in conjunction with an Apache server, check out [http://programmerworld.net/articles/tips/install_apache.php this article] at programmerworld.net for detailed (and slightly outdated) instructions on how you might go about doing that.  (Can someone post a better article in place of this reference? :) )
If you want to take a hand at installing PHP, MySQL, and Perl in conjunction with an Apache server, check out [http://programmerworld.net/articles/tips/install_apache.php this article] at programmerworld.net for detailed (and slightly outdated) instructions on how you might go about doing that.  (Can someone post a better article in place of this reference? :) )


===Installing PHP5===
=== Installing PHP5 ===


If you want to install PHP5, I recommend downloading the .ZIP package from [http://www.php.net/ PHP.net] that includes all of the extra modules.  You will probably want these modules later, so you might as well install them now.  The binary installer does not include these extras yet.  Go figure.  The .ZIP package contains instructions about how to add lines to your Apache configuration to make it work.  I have used the following additional .conf file as an include to configure use of PHP (assuming PHP is installed to C:/php):
If you want to install PHP5, I recommend downloading the .ZIP package from [http://www.php.net/ PHP.net] that includes all of the extra modules.  You will probably want these modules later, so you might as well install them now.  The binary installer does not include these extras yet.  Go figure.  The .ZIP package contains instructions about how to add lines to your Apache configuration to make it work.  I have used the following additional .conf file as an include to configure use of PHP (assuming PHP is installed to C:/php):


[code phpinit.conf]##################################
[code phpinit.conf]
# PHP Type Declarations (Common) #
##################################
##################################
# PHP Type Declarations (Common) #
 
##################################
AddType application/x-httpd-php .php .php5 .php4 .php3
 
AddType application/x-httpd-php .php .php5 .php4 .php3
DirectoryIndex index.html index.html.var index.htm index.htm.var index.php default.html default.html.var default.htm default.htm.var default.php
 
DirectoryIndex index.html index.html.var index.htm index.htm.var index.php default.html default.html.var default.htm default.htm.var default.php
#########################
# Configure PHP for CGI #
#########################
# (Vulnerable to Attack)#
# Configure PHP for CGI #
#########################
# (Vulnerable to Attack)#
 
#########################
#ScriptAlias /php/ "c:/php/"
 
#ScriptAlias /php/ "c:/php/"
# For PHP 4
#Action application/x-httpd-php "/php/php.exe"
# For PHP 4
 
#Action application/x-httpd-php "/php/php.exe"
# For PHP 5
#Action application/x-httpd-php "/php/php-cgi.exe"
# For PHP 5
 
#Action application/x-httpd-php "/php/php-cgi.exe"
##################################
# Configure PHP as Apache Module #
##################################
##################################
# Configure PHP as Apache Module #
 
##################################
# Configure the path to php.ini
PHPIniDir "C:/php"
# Configure the path to php.ini
 
PHPIniDir "C:/php"
# ... or this line ...
#SetEnv PHPRC "C:/php"
# ... or this line ...
 
#SetEnv PHPRC "C:/php"
# For PHP 4
#LoadModule php4_module "c:/php/php4apache2.dll"
# For PHP 4
 
#LoadModule php4_module "c:/php/php4apache2.dll"
# For PHP 5
LoadModule php5_module "c:/php/php5apache2.dll"</source>
# For PHP 5
LoadModule php5_module "c:/php/php5apache2.dll"


This .conf file adds an alias to a dedicated php directory if you want to place scripts in an isolated environment (perhaps with execution privelages or away from your website or system drive).
This .conf file adds an alias to a dedicated php directory if you want to place scripts in an isolated environment (perhaps with execution privelages or away from your website or system drive).


[code phpalias.conf]Alias /cgi-bin/php "C:/isolated/php"
[code phpalias.conf]
Alias /cgi-bin/php "C:/isolated/php"
&lt;Location /cgi-bin/php&gt;
#  Options
&lt;/Location&gt;


&lt;Location /cgi-bin/php&gt;
{{Navigation1|Developers.TestingEnvironment}}
#  Options
&lt;/Location&gt;</source>




[[Category:External Links]]
[[Category:External Links]]

Latest revision as of 23:41, 27 August 2010

  Translation

Do not translate this page into other languages. It is either low priority, too specific or incomplete.

e
  Updated:

This page has been updated on 2010-08-28 for the release of Shareaza v2.x.x.x. Note that only structural updates have been made. The content itself has not been checked for correctness.

e

Setting up a HTTP server

If you want to install an HTTP server, I recommend using Apache2 from Apache.org. More comprehensive instructions should be posted to this page later about how to download and install the server (or links to pages that do); but Apache.org has very comprehensive help documentation.

If you want to take a hand at installing PHP, MySQL, and Perl in conjunction with an Apache server, check out this article at programmerworld.net for detailed (and slightly outdated) instructions on how you might go about doing that. (Can someone post a better article in place of this reference? :) )

Installing PHP5

If you want to install PHP5, I recommend downloading the .ZIP package from PHP.net that includes all of the extra modules. You will probably want these modules later, so you might as well install them now. The binary installer does not include these extras yet. Go figure. The .ZIP package contains instructions about how to add lines to your Apache configuration to make it work. I have used the following additional .conf file as an include to configure use of PHP (assuming PHP is installed to C:/php):

[code phpinit.conf]

##################################
# PHP Type Declarations (Common) #
##################################

AddType application/x-httpd-php .php .php5 .php4 .php3

DirectoryIndex index.html index.html.var index.htm index.htm.var index.php default.html default.html.var default.htm default.htm.var default.php

#########################
# Configure PHP for CGI #
# (Vulnerable to Attack)#
#########################

#ScriptAlias /php/ "c:/php/"

# For PHP 4
#Action application/x-httpd-php "/php/php.exe"

# For PHP 5
#Action application/x-httpd-php "/php/php-cgi.exe"

##################################
# Configure PHP as Apache Module #
##################################

# Configure the path to php.ini
PHPIniDir "C:/php"

# ... or this line ...
#SetEnv PHPRC "C:/php"

# For PHP 4
#LoadModule php4_module "c:/php/php4apache2.dll"

# For PHP 5
LoadModule php5_module "c:/php/php5apache2.dll"

This .conf file adds an alias to a dedicated php directory if you want to place scripts in an isolated environment (perhaps with execution privelages or away from your website or system drive).

[code phpalias.conf]

Alias /cgi-bin/php "C:/isolated/php"

<Location /cgi-bin/php>
#  Options 
</Location>



Navigation:     ShareazaWiki > Developers.TestingEnvironment > Developers.TestingEnvironment.Server.HTTP