Integration of Apache2.0.35 and PHP4.3-Dev _ PHP Tutorial

Source: Internet
Author: User
Tags parse error sapi
Integration of Apache2.0.35 and PHP4.3-Dev. When Apache2.0.35 was released in the official version, it was found that Apache2 and PHP4 were successfully integrated on the network. Even the Forum on the famous PhpBuilder.com is full of negative information. When Apache 2.0.35 was released in the official version, it was found that Apache 2 and PHP 4 could be successfully integrated on the Internet. Even the famous PhpBuilder.com forum is full of negative discussions. I belong to the kind of guy who is not discouraged. after I worked at AM last night, I went on fighting hard today. from AM to AM, I got my eyebrows, however, FreeLAMP.com uses a combination of Zope + Fast_CGI to integrate with Apache, while Fast_CGI's Apache 2 version is still under development. Therefore, the current version of this website is still 1.3.24.

The command for compiling Apache is:
./Configure -- prefix =/apache2 -- enable-auth-anon -- enable-auth-dbm
-- Enable-file-cache -- enable-disk-cache -- enable-mem-cache
-- Enable-ext-filter -- enable-proxy-connect -- enable-proxy-http
-- Enable-http -- enable-dav -- enable-rewrite -- enable-so
When I use the old -- enable-module = most -- enable-shared = max for compilation, I find that it does not work. Apache 2 does not allow the installed module most, therefore, the above long series of options are used.
Then make; make install. it looks very successful. Modify httpd. conf, change the listening port to 1234, and then use www.freelamp.com: 1234 to check it out. Good, the traditional version of index.html. big has come out. (Why is there no Chinese simplified version ?)
I know that it will be very difficult for PHP to run, so I am not sad about the end of the last night, which still has no results. I hope that you will soon deploy a combination of Apache 2 and PHP 4. To be honest, to install PHP, you must first find a suitable version. the latest and stable versions available are not "combined. You must go to snaps.php.net (This website is a little slow !) Download the php4-latest.tar.bz2 before you can compile it with the new version. I used:

./Configure -- with-apxs2 =/apache2/bin/apxs -- with-mysql =/usr/local/mysql -- with-pgsql =/usr/local/pgsql
But the system report is found in make:

00-I/apache2/include-I/usr/local/src/php4-200204090000/Zend-I/usr/local/mysql/include/mysql-I/usr/local/pgsql/ include-I/usr/local/src/php4-200204090000/ext/xml/expat-D_REENTRANT-I/usr/local/src/php4-200204090000/TSRM-g-O2-pthread-DZTS- prefer-pic-c/usr/local/src/php4-200204090000/sapi/apache2filter/php_functions.c-o sapi/apache2filter/php_functions.lo
/Usr/local/src/php4-200204090000/sapi/apache2filter/php_functions.c: In function 'zif _ apache_lookup_uri:
/Usr/local/src/php4-200204090000/sapi/apache2filter/php_functions.c: 91: parse error before '(
/Usr/local/src/php4-200204090000/sapi/apache2filter/php_functions.c: 92: parse error before '(
Make: *** [sapi/apache2filter/php_functions.lo] Error 1
[Root @ www php4-200204090000] #
It seems that there is a problem with the parentheses of one program. it is because the definition of (long) is used in a macro of ADDLONG. it seems that it is not very relevant, remove this (long) in lines 91 and 92. Continue to make. success!
Then, I will not say it, you also know: make install.
That's easy!
However, you need to add the following instructions in httpd. conf to make Apache understand the. php file:
AddOutputFilter PHP. php
AddInputFilter PHP. php
AddType text/html. php
Apache 2 has added many new features, which I have introduced in my previous articles. The additional connections later in the article, as an important reference, will help you understand the characteristics of Apache 2.0. This site will continue to translate/create articles on Apache 2.0. As I said in the forum, Apache 2.0 will become an important product and research will increase its value. Studying Apache 2 will also increase the value of this site. I believe!

When Apache 2.0.35 was released in the official version, it was found that Apache 2 and PHP 4 were successfully integrated on the network. Even the Forum on the famous PhpBuilder.com is full of negative...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.