(this means modifying file c:/program files/apache group/apache2/conf/httpd.conf)
Setting-up DocumentRoot:
Oh, btw, default MySQL username is "root" and password is empty, "". :)
If you are using mod_rewrite and .htaccess and getting "No input file specified." error, add following to PHP.INI file:
Setting-up DocumentRoot:
DocumentRoot "C:/www" ServerName localhost ServerAdmin your@email.comModule mod_rewrite:
LoadModule rewrite_module modules/mod_rewrite.soAllow .htaccess:
<Directory> Options FollowSymLinks AllowOverride None </Directory> <Directory "C:/www"> Options Indexes Includes FollowSymLinks MultiViews AllowOverride All Order allow,deny Allow from all </Directory>Dissalow clients to access .htacces:
<Files ~ "^\.ht"> Order allow,deny Deny from all </Files>Install PHP as a CGI skript - NOT recommended:
ScriptAlias /php4/ "C:/php/" AddType application/x-httpd-php .php AddType application/x-httpd-php .php3 AddType application/x-httpd-php .php4 Action application/x-httpd-php "/php4/php.exe"Install PHP as a module - recommended:
LoadModule php4_module "c:/php/sapi/php4apache2.dll" AddType application/x-httpd-php .php AddType application/x-httpd-php .php3 AddType application/x-httpd-php .php4Add index.php to Apache search pattern:
DirectoryIndex index.html index.htm index.php
PHP settings
(you need to modify file c:/php/php.ini, assuming PHP installation at C:/php/):; report all errors error_reporting = E_ALL display_errors = On ; set to On, if your scripts do not work, ; but your scripts should be able to work in ; Off setting as well; this is more secure register_globals = Off ; includes and extensions include_path = ".;c:\php\includes" extension_dir = "c:\php\extensions\" ; iconv support extension=php_iconv.dll ; mbstring support extension=php_mbstring.dll ; smtp SMTP = smtp.email.com sendmail_from = your@email.com [MySQL] ; Allow or prevent persistent links. mysql.allow_persistent = On [Session] session.save_handler = files session.save_path = "c:/php/tmp" session.use_cookies = 1 session.name = PHPSESSID
What's left?
Finally, copy- all files from c:/php/dlls/ into c:/windows/system32/
- file c:/php/php4ts.dll into c:/windows/system32/
- file c:/php/php.ini into c:/windows/system32/ and c:/windows/
Oh, btw, default MySQL username is "root" and password is empty, "". :)
If you are using mod_rewrite and .htaccess and getting "No input file specified." error, add following to PHP.INI file:
cgi.fix_pathinfo=1
Testing
Want to test your installation? Create, under DocumentRoot, file index.php with the following content:<?php phpinfo(); ?>This will display 5 pages of info about Apache and PHP configuration.
0 comments:
Post a Comment