The error encountered

Source: Internet
Author: User

/USR/BIN/LD:/usr/local/lib/libz.a (CRC32.O): Relocation r_x86_64_32 against '. Rodata'  can not is used when m Aking a shared object; Recompile with-fpic/usr/local/lib/libz.a:could not read Symbols:bad value

When installing Apache,

./configure--prefix=/usr/local/apache2/--sysconfdir=/usr/local/apache2/etc/--with-included-apr--enable-so-- enable-deflate=shared--enable-expires=shared--enable-rewrite=shared

Appears as above error

----------------------

Recompile zlib and recompile

Solution: Recompile zlib in 64-bit fashion
961 Tar zxvf zlib-1.2.3.tar.gz
962 CD zlib-1.2.3
963 cflags= "-o3-fpic"./configure
964 make
965 make Install
966 Make clean

Install PHP

./configure--prefix=/usr/local/php--with-apxs2=/usr/local/apache2/bin/apxs--WITH-LIBXML-DIR=/USR/LOCAL/LIBXML2

------------------------------------------------------------

Morning php becomes a download, is not there "this statement and CP this php.ini" file

Cp/lamp/php-5.2.6/php.ini-dist/usr/local/php/etc/php.ini "No copy of this sentence also come out PHP interface, indicating that Apache support PHP or to have these two sentences

LoadModule php5_module modules/libphp5.so "Apache compiles the installation, if added--enable so will be added automatically on the"
AddType application/x-httpd-php. php. phtml. Phps "is manually added, but it's best to point to the Apache installation directory when PHP is compiled and installed--with-apxs2=/usr/local/ Apache2/bin/apxs "

Test the connectivity between Apache and PHP to see if Apache can parse PHP files

Vi/usr/local/apache2/etc/httpd.conf

AddType application/x-httpd-php. php. phtml. PHPS (Note the case of T)

*. phtml syntax highlighting for the. Phps as a php source file

Restart Apache service:/usr/local/apache2/bin/apachectl stop

/usr/local/apache2/bin/apachectl start

* Apache cannot start, prompt cannot restore segment prot after reloc:permission denied error, for selinux problem, can turn selinux off or execute command chcon-t texrel_ Shlib_t/usr/local/apache2/modules/libphp5.so

Test: vi/usr/local/apache2/htdocs/test.php

<?

Phpinfo ();

?>

Encountered an error

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.