PHP Installation Tutorials

Source: Internet
Author: User
Tags bz2 install php posix

Install PHP (php-5.1.6.tar.bz2)

CP Php-5.1.6.tar.bz2/home
Cd/home
tar jxf php-5.1.6.tar.bz2
CD php-5.1.6
./configure--with-apxs2=/usr/local/apache/bin/apxs--disable-debug--enable-safe-mode--enable-trans-sid--wi Th-xml--with-mysql--enable-short-tags--with-gd--with-zlib--with-jpeg--with-png--enable-memory-limit-- Disable-posix--with-config-file-path=/usr/local/lib

1, solve Configure:error:libpng. ( A|SO) not found.
# ln-s/usr/lib64/libjpeg.so/usr/lib/# ln-s/usr/lib64/libpng.so/usr/lib/
2. Error description

The following error occurred during the./configure Step when PHP was installed on the CENTOS64 bit version
Configure:error:Cannot Find Libmysqlclient under/usr.
Note that the MySQL client library isn't bundled anymore!

Cause analysis and solution

By looking for libmysqlclient, found to be in the/usr/lib64/mysql/directory libmysqlclient.so.15.0.0 do the soft connection, PHP default is to go to the/usr/lib/search, so did not find.
The solution is:
cp/usr/lib64/mysql/*/usr/lib/mysql/
Then proceed to./configure, if the server does not have a/usr/lib/mysql/directory, create a MySQL directory in the/usr/lib/directory



Description:
--WITH-APXS2=/USR/LOCAL/APACHE/BIN/APXS \ This is the location to join Apache for the DSO module
--disable-debug \ #关闭php内部调试
--enable-safe-mode \ #打开php的安全模式
--enable-trans-sid \
--with-xml \ #支持xml
--with-mysql \ #支持mysql
--enable-short-tags \ #支持PHP的短标记
--with-gd \ #支持GD库
--with-zlib \ #支持zlib
--with-jpeg \
--with-png \
--enable-memory-limit \
--disable-posix \
--with-config-file-path=/usr/local/lib
anyway, copy and paste is fine,-_-.
Make
Make Install
cp php.ini-dist/usr/local/lib/php/php.ini Copy PHP configuration file
cd/usr/local/lib/php/
vi php.ini modifying configuration files
register_globals = on generally 399 rows
Save Exit


This article is from the "Welcome" blog, make sure to keep this source http://wjpingok.blog.51cto.com/5374697/1737118

PHP Installation Tutorials

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.