Two errors and solutions encountered during PHP compilation and installation: php Compilation

Source: Internet
Author: User
Tags php development environment

Two errors and solutions encountered during PHP compilation and installation: php Compilation

I. PHP configure: error: Cannot find ldap libraries in/usr/lib

PHP5.4.8 is compiled and installed in 64-bit CentOS today. The result is displayed in configure.
Configure: error: Cannot find ldap libraries in/usr/lib
The prompt is that the related modules cannot be found under/usr/lib, because the above files are stored in the/usr/lib64 folder by default in 64-bit linux.

Solution:

Copy codeThe Code is as follows:
Cp-frp/usr/lib64/libldap */usr/lib/

Re-configure

2. PDO_MYSQL make: *** [pdo_mysql.lo] Error 1

When compiling and installing the PDO_MYSQL extension module, the following message is always displayed:
Copy codeThe Code is as follows:
In file sorted ded from/data0/software/PDO_MYSQL-1.0.2/pdo_mysql.c: 31:
/Data0/software/PDO_MYSQL-1.0.2/php_pdo_mysql_int.h: 25: 19: error: mysql. h: No such file or directory
In file sorted ded from/data0/software/PDO_MYSQL-1.0.2/pdo_mysql.c: 31:
/Data0/software/PDO_MYSQL-1.0.2/php_pdo_mysql_int.h: 36: error: expected specifier-qualifier-list before 'mysql'
/Data0/software/PDO_MYSQL-1.0.2/php_pdo_mysql_int.h: 48: error: expected specifier-qualifier-list before 'mysql _ field'
/Data0/software/PDO_MYSQL-1.0.2/php_pdo_mysql_int.h: 53: error: expected specifier-qualifier-list before 'mysql _ Res'
Make: *** [pdo_mysql.lo] Error 1

This is because the MySQL header file is required during compilation. This problem occurs only when the header file cannot be found by default. Connect the MySQL header file to/usr/local/include/through a soft connection.
For example, if your MySQL installation file is in/usr/local/mysql, run the following command:
Copy codeThe Code is as follows:
# Ln-s/usr/local/mysql/include/*/usr/local/include/


Php installation. After decompression, the following occurs during compilation,

Because your system contains Apache2, the following section of the parameter:
-- With-apxs =/usr/local/apache/bin/apxs

It should be changed:
-- With-apxs2 =/usr/local/apache/bin/apxs

After I configured the PHP development environment, why can't I compile the PHP file? After localhost, it is still displayed in the original file, as shown in figure

Php failed to connect to the parser

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.