The step of I installed PHP and apache as
follows:
1. I downloaded the apache_1.3.12.tar.gz and php-4_0_2_tar.tar from internet and put it in /usr/local/etc/httpd.
2. gunzip apache_1.3.12.tar.gz
tar xvf apache_1.3.12
tar zxvf php-4_0_2_tar.tar
3. cd apache_1.3.12
4. ./configure --prefix=/www
5. cd ../php-4.0.2
6. ./configure --with-mysql
--with-apache=../apache_1.3.12
--enable-track-vars
7. make
8. make install
9. cd ../apache_1.3.12
10. ./configure --prefix=/www
--activatemodule=src/module/php4/libphp4.a
11. /etc/rc.d/init.d/httpd stop
12. make
13. make install
14. cd ../php-4.0.2
15. cp php.ini-dist /usr/local/lib/php.ini
(copy php.ini-dist to /etc/httpd in Redhat linux)
16. modify httpd.conf
modify #AddType application/x-httpd-php .php
to AddType application/x-httpd-php .php
17. /etc/rc.d/init.d/httpd restart
18. I write a test.php with vi in /home/httpd/html
<?php
print("this is a test!");
?>
19. When I watch it in IE,the result is:
test.php: parse error, expecting `'('' on line 3
print("this is a test.");
20. But I watch index.html in IE,the result is show It worked,that is say the apache is
setup successfully.
Why? What can I do?
Thanks
tszzpfbb.