php5 mysql installation and configuration method

藏色散人
Release: 2023-03-03 10:54:02
Original
2578 people have browsed it

php5 Mysql installation method: first select the dynamically added module of apache2; then compile on redhat linux 9; then install the non-CGI version of PHP; and finally install the required software packages.

php5 mysql installation and configuration method

Recommended: "PHP Tutorial"

Installation and configuration of php5 and mysql5

Select the dynamic addition module of apache2, compile on redhat linux 9, and install the non-CGI version of PHP

The software packages I used:

apache 2.0.54
php 5.1.4
zlib 1.2.3
mysql 5.0.22
libxml2 2.6.26
Copy after login

Problems encountered:

1. mysql has been installed locally

Countermeasures: rpm -e --nodeps mysql-VERSION-NUMBER. The rest of the software is similar

2. The zlib version is too low

Countermeasures: Download a new version to install, such as zlib-1.2.3.tar.tar

3. The version of mysql cannot be It is the installed version mysql-standard-5.0.22-linux-i686.tar.gz with a static library, otherwise PHP cannot configure

Countermeasures: Download the source code and compile it, such as mysql-5.0.22.tar. gz

4. Do not compile on the disk mounted, especially in NTFS format, otherwise inexplicable errors will occur

5. Mysql configure command, excerpted from mysql-5.0.22.tar INSTALL file in .gz

CFLAGS="-O3" CXX=gcc CXXFLAGS="-O3 -felide-constructors /
            -fno-exceptions -fno-rtti" ./configure /
            --prefix=/usr/local/mysql --enable-assembler /
            --with-mysqld-ldflags=-all-static
Copy after login

6. PHP configure command

./configure /
--disable-cgi /
--with-apxs2=/usr/local/apache2/bin/apxs /
--with-mysql=/usr/local/mysql /
--with-xml /
--with-dom /
--with-zlib /
--with-libxml /
--enable-inline-optimization /
--enable-safe-mode /
--enable-track-vars /
--enable-trans-sid /
--enable-xml /
--enable-libxml /
--enable-so
Copy after login

7. Since the lib library on each machine is different, there may be problems when loading libphp5.so in apache2 Some symbols undefined

Countermeasures: Change the --enable and --with options in configure. Add --disable-all if necessary. Note that --disable-all does not install php5-extension, which is compatible with perl, and will make many functions unable to run.

Other points to note can be found in the INSTALL files of each installation package and online articles. For example

web server-apache2+php5+mysql5 for linux::Apache  
web server-apache2+php5+mysql5 for linux OS::Php
web server-apache2+php5+mysql5 for linux::Mysql
web server-apache2+php5+mysql5 for windows OS
Copy after login

The above is the detailed content of php5 mysql installation and configuration method. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template