[PHP] Top 27 common PHP compilation error and solutions

193

With the article you are prepared to read, I will present the content ‘27 common PHP compilation error and solutions‘ to handle them.

Installing php by compiling source PHP is not easy like installing with ‘yum‘ repo. The advantage of compilation is you can customize PHP version with different modules that you need or do not need. On the other hand that also make PHP is compatible with more systematic.

I will list below 27 common errors arise when compiling PHP source and processing solutions by installing the appropriate library package. I hope you will find ways to handle errors that you encounter in this article.

If you are so lazy to find the solution to handle your issue when PHP compilation in many times, you can use this command to install almost necessary php librarys.

Note:
– Only install the packages on CentOS / Fedora / RHEL because packages name will be different if you install on Ubuntu / Debian.

Installing almost necessary library for PHP compilation :

 
Top 27 common PHP compilation error and solutions

1. Error bzip


Solution:

 
2. Error ‘cURL’

 
Solution:

 
3. Error ‘png.h’

 
Solution:

 
4. Error ‘db4’

 
Solution: 

 
5. Error ‘xpm’

 
Solution:
– Re-configure compiling PHP with option : –with-xpm-dir=/usr
– Install ‘freetype’ lib.

 
6. Error ‘libXpm’

 
Solution:

 
7. Error ‘gmp’


Solution:

 
8. Error ‘libc’

 
Solution:

 
9. Error ‘ldap’

 
Solution:

10. Error ‘unixODBC’

 
Solution:

 
11. Error ‘postgresql’

 
Solution:

 
12. Error ‘sqlite’

 
Solution:

 
13. Error ‘aspell’

 
Solution:

 
14. Error ‘net-snmp’

 
Solution:

 
15. Error ‘libxslt-devel’

 
Solution:

 
16. Error ‘libxml’

 
Solution:

 
17. Error ‘pcre-devel’

 
Solution:

 
18. Error ‘libidn’

 
Solution:
– Download and install ‘libidn’.

 
19. Error ‘libxml2.la’


Solution:
– Download and install ‘libxml’.

 
20. Error ‘t1lib’

 
Solution:

 
21. Error ‘mcrypt.h:

 
Solution:

 
22. Error ‘libtidy’

 
Solution:

 
23. Error ‘jpeglib.h’

 
Solution:

 
24. Error ‘mysql-devel’

 
Solution:

 
25. Error ‘libicu’

 
Solution:

 
26. Error ‘recode.h’

 
Solution:

 
27. Error ‘mm’

 
Solution:

 
Very simple to follow and find your solution to deal with your issue when compiling PHP. Comment if you have any questions ?

LEAVE A REPLY