Click to See Complete Forum and Search --> : how to install PHP for Apache


Anon
11-13-2000, 05:39 AM
Dear helper,

I have installed Apache web server (Window version) and would like to install PHP 4.0 for Apache.

I have download PHP 4.0.3pl1 (CGI binary and ISAPI module included, MySQL support built-in, packaged as zip) and PHP 4.0.3pl1 (CGI only, MySQL support built-in, packaged as Windows installer to install and configure PHP, and automatically configure IIS, PWS and Xitami, with manual configuration for other servers. N.B. no external extensions included)

I have unzipped the first one and execute the second one.

A PHP webpage file (test.php) was put in subdirectory (test) of Apache/htdocs. I type localhost/test/test.php in IE and a blank page was displayed instead of expected message.

Would any helper tell me what should be download and done for installing PHP 4.0 for Apache?

Thank you!
Hin

Anon
11-14-2000, 04:20 AM
1. Install apache (I am running 1.3.14)
2. Download PHP 4.03pl1.... extract the contents of the zip file to a location of your choosing... (I used c:\web\php403)
3. Edit httpd.conf for the following:
ServerName localhost <== Uncomment this line
BindAddress * <== Uncomment this line
LoadModule /web/php403/sapi/php4apache.dll <== add this line as last in section

[ Uncomment or add these lines ]
AddType application/x-httpd-php .phtml .php [add any other extensions you want]
AddType application/x-httpd-php-source .phps

4. Make edits to the php.ini file to your liking <= Change "extension_dir" to the location of your PHP distribution's extension directory
5. Copy php4ts.dll and php.ini to any dir in your path => [ c:\winnt or c:\winnt\system32 on NT ]
6. Start your apache server
7. Save the following as test.php
=== BEGIN TEST FILE ===
<?
phpinfo()
?>
=== END TEST FILE ===

Anon
11-14-2000, 12:44 PM
Thanks !!!
I\'ve tried to find the .dll file for 2 hours.

Now it works....

Thanx
-.-.-.
GodBear with me !

Anon
11-14-2000, 01:24 PM
Hi all,
so how is it with this php4apache.dll file.
I think I have the same problem.
Where to get it, I can't build it (no httpd.h).

Thanks for answer.
Bosta

Anon
11-15-2000, 05:02 AM
Hi!
Today I tried to follow your "to do list", but when I try to start Apache I have this error message:

Syntax error on line 205 of c:/internet/apache/conf/httpd.conf:
LoadModule takes two arguments, a module name and the name of a shared object fi
le to load it from
Note the errors or messages above, and press the <ESC> key to exit.

You said (at point 3) to write

LoadModule /Internet/Php/sapi/php4apache.dll

(I have Php on c:/internet/php)

what must I write as first argument?
(I tried whit
LoadModule php_module /Internet/Php/sapi/php4apache.dll

but without success)

Thanks in advance,
Emanuel

Anon
11-15-2000, 05:12 AM
In Apache httpd.conf

LoadModule php4_module modules/php4apache.dll

Anon
11-17-2000, 04:01 PM
i am now getting the following error now.

Syntax error on line 205 of c:/program files/apache group/apache/conf/httpd.conf
:
Cannot load /web/php403/sapi/php4apache.dll into server: (1157) One of the libra
ry files needed to run this application cannot be found:


What am i supposed to do now?

Anon
11-23-2000, 07:17 AM
Try this:


LoadModule php4_module "D:/Programme/php4/extensions/php4apache.dll"


You just have to edit the path where you put your php extension modules - it worked for me, at least... <:^)

g'd luck
Marce

Anon
04-04-2001, 12:54 PM
I had the same problem just now and finally figured it out:

php4ts.dll has to be put in your "c:\windows" directory
php4tx.dll has to be put in your apache\lib directory

These files are found in the root c:\php directory.

I guess they figured these two details were too elementary (?) to include in the documentation ; )

Try it out!

cheers,
-kent

beckydd
10-26-2001, 01:40 AM
Hi, I faced the same problem and your help is really great! Thanks a lot!!

Regards,
Becky