Integrated _php tutorials for Apache2.0.35 and Php4.3-dev

Source: Internet
Author: User
Tags parse error sapi
When Apache 2.0.35 was released as an official version, it was found that few mentions on the network could successfully integrate Apache 2 and PHP 4. Even the famous phpbuilder.com forum is full of negative discussions. I belong to the kind of people who dare not to be discouraged, yesterday evening work to the no results, today continue to fight hard, from 9:00 to 0:00 in the evening, basically have the idea, but because Freelamp.com uses zope+fast_cgi combination and Apache integration, and Fas T_CGI's Apache 2 version is still under development, so the current version of this website is still 1.3.24.

The commands to compile Apache are:
./configure--prefix=/apache2--enable-auth-anon--enable-auth-dbm
--enable-file-cache--enable-cache--enable-disk-cache--enable-mem-cache
--enable-ext-filter--enable-proxy--enable-proxy-connect--enable-proxy-http
--enable-http--enable-dav--enable-rewrite--enable-so
I use the old--enable-module=most--enable-shared=max to compile, found that does not work, Apache 2 will not allow the installation of the most modules, so the use of the above long long list of options.
Then it was Make;make install, which looked very successful. Modify the httpd.conf, change the listening port to 1234, and then use the www.freelamp.com:1234 up to see, good, the traditional version of the Index.html.big out. (How about the simplified version of our continent?) )
I know it's going to be very difficult to get PHP to run, so I'm not sad about the end of the night when it got really late. Hopefully, you will be able to deploy a combination of Apache 2 and PHP 4 soon. To be honest, to install PHP, you must first find a suitable version, the latest stable version of the existing can not be "combined" up. You have to go to snaps.php.net (this site is a bit slow!) ) to download the php4-latest.tar.bz2 before it can be compiled with the new version. I have used:

./configure--with-apxs2=/apache2/bin/apxs--with-mysql=/usr/local/mysql--with-pgsql=/usr/local/pgsql
To start, but make when you find the System report:

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 of the programs, and it is a Addlong macro that uses the definition of (long), which does not seem to be very related, which is removed from the two lines of 91 and 92. Keep make, it's done!
Then, I don't say, you know: Make install.
It's so easy!
However, you need to include the following instructions in httpd.conf to let Apache know. php Files:
Addoutputfilter php. php
Addinputfilter php. php
AddType text/html. php
Apache 2 Adds a lot of new features that I've introduced in previous articles. The attached links later in the article, as important references, will help you understand the features of Apache 2.0. This site will continue to translate/create articles about Apache 2.0, as I said in the forum, Apache 2.0 will become an important product, research to enhance value. The study of Apache 2 will also enhance the value of this site. I believe!

http://www.bkjia.com/PHPjc/531777.html www.bkjia.com true http://www.bkjia.com/PHPjc/531777.html techarticle when Apache 2.0.35 was released as an official version, it was found that few mentions on the network could successfully integrate Apache 2 and PHP 4. Even the famous phpbuilder.com on the forum 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.