Solved

Trying to install php 5.0.4 on Centos 6.4 failing at make

Posted on 2013-11-21
4
1,626 Views
Last Modified: 2013-11-22
Here is the whole process after installen httpd and mysql:


yum install gcc gcc-c++ httpd httpd-devel apr-devel libxml2-devel zlib zlib-devel mysql-devel openssl-devel make flex bzip2 bzip2-devel curl-devel libjpeg-devel libc-client-devel libmcrypt-devel libX11-devel gd-devel libpng-devel gmp gmp-devel pcre pcre-devel mingw32-pcre php-pspell aspell-devel

ln /usr/lib64/libpcre.so /usr/libpcre.so

cd /tmp
wget http://museum.php.net/php5/php-5.0.4.tar.gz
tar xzvf php-5.0.4.tar.gz
cd php-5.0.4

./configure --with-config-file-path=/etc --with-config-file-scan-dir=/etc/php.d --with-apxs2 --with-libdir=lib64 --with-zlib --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --disable-debug --with-pic --disable-rpath --with-bz2 --with-curl --with-exec-dir=/usr/bin --with-freetype-dir=/usr --with-png-dir=/usr --enable-gd-native-ttf --without-gdbm --with-gettext --with-gmp --with-iconv --with-jpeg-dir=/usr --with-openssl --with-png --with-pspell --with-expat-dir=/usr --with-pcre-regex=/usr --with-zlib --with-layout=GNU --enable-exif --enable-ftp --enable-magic-quotes --enable-sockets --enable-sysvsem --enable-sysvshm --enable-sysvmsg --enable-track-vars --enable-trans-sid --enable-yp --enable-wddx --with-pear=/usr/share/pear --with-kerberos --enable-ucd-snmp-hack --with-unixODBC=shared,/usr --enable-memory-limit --enable-shmop --enable-calendar --enable-dbx --enable-dio --with-mime-magic=/etc/httpd/conf/magic --without-sqlite --with-libxml-dir=/usr --with-xml --with-apxs2=/usr/sbin/apxs --without-mysql --without-gd --without-odbc --disable-dom –disable-dba

make clean
make

I get this:

/bin/sh /tmp/php-5.0.4/libtool --silent --preserve-dup-deps --mode=compile gcc  -Iext/openssl/ -I/tmp/php-5.0.4/ext/openssl/ -DPHP_ATOM_INC -I/tmp/php-5.0.4/include -I/tmp/php-5.0.4/main -I/tmp/php-5.0.4 -I/usr/include/libxml2 -I/usr/include/pspell -I/tmp/php-5.0.4/TSRM -I/tmp/php-5.0.4/Zend    -g -O2  -prefer-pic -c /tmp/php-5.0.4/ext/openssl/openssl.c -o ext/openssl/openssl.lo
/tmp/php-5.0.4/ext/openssl/openssl.c:201: error: expected specifier-qualifier-list before 'LHASH'
/tmp/php-5.0.4/ext/openssl/openssl.c:362: error: expected declaration specifiers or '...' before 'LHASH'
/tmp/php-5.0.4/ext/openssl/openssl.c: In function 'php_openssl_config_check_syntax':
/tmp/php-5.0.4/ext/openssl/openssl.c:367: error: 'config' undeclared (first use in this function)
/tmp/php-5.0.4/ext/openssl/openssl.c:367: error: (Each undeclared identifier is reported only once
/tmp/php-5.0.4/ext/openssl/openssl.c:367: error: for each function it appears in.)
/tmp/php-5.0.4/ext/openssl/openssl.c: In function 'add_oid_section':
/tmp/php-5.0.4/ext/openssl/openssl.c:385: error: 'struct php_x509_request' has no member named 'req_config'
/tmp/php-5.0.4/ext/openssl/openssl.c:389: error: 'struct php_x509_request' has no member named 'req_config'
/tmp/php-5.0.4/ext/openssl/openssl.c: In function 'php_openssl_parse_config':
/tmp/php-5.0.4/ext/openssl/openssl.c:434: error: 'struct php_x509_request' has no member named 'config_filename'
/tmp/php-5.0.4/ext/openssl/openssl.c:434: error: 'struct php_x509_request' has no member named 'config_filename'
/tmp/php-5.0.4/ext/openssl/openssl.c:435: error: 'struct php_x509_request' has no member named 'section_name'
/tmp/php-5.0.4/ext/openssl/openssl.c:435: error: 'struct php_x509_request' has no member named 'section_name'
/tmp/php-5.0.4/ext/openssl/openssl.c:436: error: 'struct php_x509_request' has no member named 'global_config'
/tmp/php-5.0.4/ext/openssl/openssl.c:437: error: 'struct php_x509_request' has no member named 'req_config'
/tmp/php-5.0.4/ext/openssl/openssl.c:437: error: 'struct php_x509_request' has no member named 'config_filename'
/tmp/php-5.0.4/ext/openssl/openssl.c:439: error: 'struct php_x509_request' has no member named 'req_config'
/tmp/php-5.0.4/ext/openssl/openssl.c:444: error: 'struct php_x509_request' has no member named 'req_config'
/tmp/php-5.0.4/ext/openssl/openssl.c:455: error: 'struct php_x509_request' has no member named 'digest_name'
/tmp/php-5.0.4/ext/openssl/openssl.c:455: error: 'struct php_x509_request' has no member named 'digest_name'
/tmp/php-5.0.4/ext/openssl/openssl.c:455: error: 'struct php_x509_request' has no member named 'req_config'
/tmp/php-5.0.4/ext/openssl/openssl.c:455: error: 'struct php_x509_request' has no member named 'section_name'
/tmp/php-5.0.4/ext/openssl/openssl.c:457: error: 'struct php_x509_request' has no member named 'extensions_section'
/tmp/php-5.0.4/ext/openssl/openssl.c:457: error: 'struct php_x509_request' has no member named 'extensions_section'
/tmp/php-5.0.4/ext/openssl/openssl.c:457: error: 'struct php_x509_request' has no member named 'req_config'
/tmp/php-5.0.4/ext/openssl/openssl.c:457: error: 'struct php_x509_request' has no member named 'section_name'
/tmp/php-5.0.4/ext/openssl/openssl.c:459: error: 'struct php_x509_request' has no member named 'extensions_section'
/tmp/php-5.0.4/ext/openssl/openssl.c:459: error: 'struct php_x509_request' has no member named 'extensions_section'
/tmp/php-5.0.4/ext/openssl/openssl.c:459: error: 'struct php_x509_request' has no member named 'req_config'
/tmp/php-5.0.4/ext/openssl/openssl.c:459: error: 'struct php_x509_request' has no member named 'request_extensions_section'
/tmp/php-5.0.4/ext/openssl/openssl.c:461: error: 'struct php_x509_request' has no member named 'priv_key_bits'
/tmp/php-5.0.4/ext/openssl/openssl.c:461: error: 'struct php_x509_request' has no member named 'priv_key_bits'
/tmp/php-5.0.4/ext/openssl/openssl.c:461: error: 'struct php_x509_request' has no member named 'req_config'
/tmp/php-5.0.4/ext/openssl/openssl.c:461: error: 'struct php_x509_request' has no member named 'section_name'
/tmp/php-5.0.4/ext/openssl/openssl.c:464: error: 'struct php_x509_request' has no member named 'priv_key_type'
/tmp/php-5.0.4/ext/openssl/openssl.c:464: error: 'struct php_x509_request' has no member named 'priv_key_type'
/tmp/php-5.0.4/ext/openssl/openssl.c:467: error: 'struct php_x509_request' has no member named 'priv_key_encrypt'
/tmp/php-5.0.4/ext/openssl/openssl.c:469: error: 'struct php_x509_request' has no member named 'req_config'
/tmp/php-5.0.4/ext/openssl/openssl.c:469: error: 'struct php_x509_request' has no member named 'section_name'
/tmp/php-5.0.4/ext/openssl/openssl.c:471: error: 'struct php_x509_request' has no member named 'req_config'
/tmp/php-5.0.4/ext/openssl/openssl.c:471: error: 'struct php_x509_request' has no member named 'section_name'
/tmp/php-5.0.4/ext/openssl/openssl.c:474: error: 'struct php_x509_request' has no member named 'priv_key_encrypt'
/tmp/php-5.0.4/ext/openssl/openssl.c:476: error: 'struct php_x509_request' has no member named 'priv_key_encrypt'
/tmp/php-5.0.4/ext/openssl/openssl.c:481: error: 'struct php_x509_request' has no member named 'digest_name'
/tmp/php-5.0.4/ext/openssl/openssl.c:482: error: 'struct php_x509_request' has no member named 'digest_name'
/tmp/php-5.0.4/ext/openssl/openssl.c:482: error: 'struct php_x509_request' has no member named 'req_config'
/tmp/php-5.0.4/ext/openssl/openssl.c:482: error: 'struct php_x509_request' has no member named 'section_name'
/tmp/php-5.0.4/ext/openssl/openssl.c:484: error: 'struct php_x509_request' has no member named 'digest_name'
/tmp/php-5.0.4/ext/openssl/openssl.c:485: error: 'struct php_x509_request' has no member named 'digest'
/tmp/php-5.0.4/ext/openssl/openssl.c:485: error: 'struct php_x509_request' has no member named 'md_alg'
/tmp/php-5.0.4/ext/openssl/openssl.c:485: error: 'struct php_x509_request' has no member named 'digest_name'
/tmp/php-5.0.4/ext/openssl/openssl.c:487: error: 'struct php_x509_request' has no member named 'md_alg'
/tmp/php-5.0.4/ext/openssl/openssl.c:488: error: 'struct php_x509_request' has no member named 'md_alg'
/tmp/php-5.0.4/ext/openssl/openssl.c:488: error: 'struct php_x509_request' has no member named 'digest'
/tmp/php-5.0.4/ext/openssl/openssl.c:491: error: 'struct php_x509_request' has no member named 'extensions_section'
/tmp/php-5.0.4/ext/openssl/openssl.c:491: error: 'struct php_x509_request' has no member named 'config_filename'
/tmp/php-5.0.4/ext/openssl/openssl.c:491: error: 'struct php_x509_request' has no member named 'extensions_section'
/tmp/php-5.0.4/ext/openssl/openssl.c:491: error: 'struct php_x509_request' has no member named 'req_config'
/tmp/php-5.0.4/ext/openssl/openssl.c:491: error: too many arguments to function 'php_openssl_config_check_syntax'
/tmp/php-5.0.4/ext/openssl/openssl.c:494: error: 'struct php_x509_request' has no member named 'req_config'
/tmp/php-5.0.4/ext/openssl/openssl.c:494: error: 'struct php_x509_request' has no member named 'section_name'
/tmp/php-5.0.4/ext/openssl/openssl.c:500: error: 'struct php_x509_request' has no member named 'request_extensions_section'
/tmp/php-5.0.4/ext/openssl/openssl.c:501: error: 'struct php_x509_request' has no member named 'request_extensions_section'
/tmp/php-5.0.4/ext/openssl/openssl.c:501: error: 'struct php_x509_request' has no member named 'req_config'
/tmp/php-5.0.4/ext/openssl/openssl.c:501: error: 'struct php_x509_request' has no member named 'section_name'
/tmp/php-5.0.4/ext/openssl/openssl.c:503: error: 'struct php_x509_request' has no member named 'request_extensions_section'
/tmp/php-5.0.4/ext/openssl/openssl.c:503: error: 'struct php_x509_request' has no member named 'config_filename'
/tmp/php-5.0.4/ext/openssl/openssl.c:503: error: 'struct php_x509_request' has no member named 'request_extensions_section'
/tmp/php-5.0.4/ext/openssl/openssl.c:503: error: 'struct php_x509_request' has no member named 'req_config'
/tmp/php-5.0.4/ext/openssl/openssl.c:503: error: too many arguments to function 'php_openssl_config_check_syntax'
/tmp/php-5.0.4/ext/openssl/openssl.c: In function 'php_openssl_dispose_config':
/tmp/php-5.0.4/ext/openssl/openssl.c:510: error: 'struct php_x509_request' has no member named 'priv_key'
/tmp/php-5.0.4/ext/openssl/openssl.c:511: error: 'struct php_x509_request' has no member named 'priv_key'
/tmp/php-5.0.4/ext/openssl/openssl.c:512: error: 'struct php_x509_request' has no member named 'priv_key'
/tmp/php-5.0.4/ext/openssl/openssl.c:514: error: 'struct php_x509_request' has no member named 'global_config'
/tmp/php-5.0.4/ext/openssl/openssl.c:515: error: 'struct php_x509_request' has no member named 'global_config'
/tmp/php-5.0.4/ext/openssl/openssl.c:516: error: 'struct php_x509_request' has no member named 'global_config'
/tmp/php-5.0.4/ext/openssl/openssl.c:518: error: 'struct php_x509_request' has no member named 'req_config'
/tmp/php-5.0.4/ext/openssl/openssl.c:519: error: 'struct php_x509_request' has no member named 'req_config'
/tmp/php-5.0.4/ext/openssl/openssl.c:520: error: 'struct php_x509_request' has no member named 'req_config'
/tmp/php-5.0.4/ext/openssl/openssl.c: In function 'php_openssl_x509_from_zval':
/tmp/php-5.0.4/ext/openssl/openssl.c:770: warning: passing argument 1 of 'PEM_ASN1_read_bio' from incompatible pointer type
/usr/include/openssl/pem.h:417: note: expected 'void * (*)(void **, const unsigned char **, long int)' but argument is of type 'char * (*)()'
/tmp/php-5.0.4/ext/openssl/openssl.c: In function 'php_openssl_make_REQ':
/tmp/php-5.0.4/ext/openssl/openssl.c:1230: error: 'struct php_x509_request' has no member named 'req_config'
/tmp/php-5.0.4/ext/openssl/openssl.c:1230: error: 'struct php_x509_request' has no member named 'section_name'
/tmp/php-5.0.4/ext/openssl/openssl.c:1234: error: 'struct php_x509_request' has no member named 'req_config'
/tmp/php-5.0.4/ext/openssl/openssl.c:1238: error: 'struct php_x509_request' has no member named 'req_config'
/tmp/php-5.0.4/ext/openssl/openssl.c:1238: error: 'struct php_x509_request' has no member named 'section_name'
/tmp/php-5.0.4/ext/openssl/openssl.c:1242: error: 'struct php_x509_request' has no member named 'req_config'
/tmp/php-5.0.4/ext/openssl/openssl.c:1370: error: 'struct php_x509_request' has no member named 'priv_key'
/tmp/php-5.0.4/ext/openssl/openssl.c: In function 'zif_openssl_csr_sign':
/tmp/php-5.0.4/ext/openssl/openssl.c:1597: error: 'struct php_x509_request' has no member named 'request_extensions_section'
/tmp/php-5.0.4/ext/openssl/openssl.c:1601: error: 'struct php_x509_request' has no member named 'req_config'
/tmp/php-5.0.4/ext/openssl/openssl.c:1602: error: 'struct php_x509_request' has no member named 'req_config'
/tmp/php-5.0.4/ext/openssl/openssl.c:1602: error: 'struct php_x509_request' has no member named 'request_extensions_section'
/tmp/php-5.0.4/ext/openssl/openssl.c:1608: error: 'struct php_x509_request' has no member named 'digest'
/tmp/php-5.0.4/ext/openssl/openssl.c: In function 'zif_openssl_csr_new':
/tmp/php-5.0.4/ext/openssl/openssl.c:1663: error: 'struct php_x509_request' has no member named 'priv_key'
/tmp/php-5.0.4/ext/openssl/openssl.c:1664: error: 'struct php_x509_request' has no member named 'priv_key'
/tmp/php-5.0.4/ext/openssl/openssl.c:1668: error: 'struct php_x509_request' has no member named 'priv_key'
/tmp/php-5.0.4/ext/openssl/openssl.c:1671: error: 'struct php_x509_request' has no member named 'priv_key'
/tmp/php-5.0.4/ext/openssl/openssl.c:1680: error: 'struct php_x509_request' has no member named 'req_config'
/tmp/php-5.0.4/ext/openssl/openssl.c:1683: error: 'struct php_x509_request' has no member named 'request_extensions_section'
/tmp/php-5.0.4/ext/openssl/openssl.c:1683: error: 'struct php_x509_request' has no member named 'req_config'
/tmp/php-5.0.4/ext/openssl/openssl.c:1684: error: 'struct php_x509_request' has no member named 'request_extensions_section'
/tmp/php-5.0.4/ext/openssl/openssl.c:1686: error: 'struct php_x509_request' has no member named 'request_extensions_section'
/tmp/php-5.0.4/ext/openssl/openssl.c:1690: error: 'struct php_x509_request' has no member named 'priv_key'
/tmp/php-5.0.4/ext/openssl/openssl.c:1690: error: 'struct php_x509_request' has no member named 'digest'
/tmp/php-5.0.4/ext/openssl/openssl.c:1699: error: 'struct php_x509_request' has no member named 'priv_key'
/tmp/php-5.0.4/ext/openssl/openssl.c:1700: error: 'struct php_x509_request' has no member named 'priv_key'
/tmp/php-5.0.4/ext/openssl/openssl.c:1702: error: 'struct php_x509_request' has no member named 'priv_key'
/tmp/php-5.0.4/ext/openssl/openssl.c:1709: error: 'struct php_x509_request' has no member named 'priv_key'
/tmp/php-5.0.4/ext/openssl/openssl.c: In function 'php_openssl_generate_private_key':
/tmp/php-5.0.4/ext/openssl/openssl.c:1876: error: 'struct php_x509_request' has no member named 'priv_key_bits'
/tmp/php-5.0.4/ext/openssl/openssl.c:1878: error: 'struct php_x509_request' has no member named 'priv_key_bits'
/tmp/php-5.0.4/ext/openssl/openssl.c:1882: error: 'struct php_x509_request' has no member named 'req_config'
/tmp/php-5.0.4/ext/openssl/openssl.c:1882: error: 'struct php_x509_request' has no member named 'section_name'
/tmp/php-5.0.4/ext/openssl/openssl.c:1885: error: 'struct php_x509_request' has no member named 'priv_key'
/tmp/php-5.0.4/ext/openssl/openssl.c:1886: error: 'struct php_x509_request' has no member named 'priv_key_type'
/tmp/php-5.0.4/ext/openssl/openssl.c:1888: error: 'struct php_x509_request' has no member named 'priv_key'
/tmp/php-5.0.4/ext/openssl/openssl.c:1888: error: 'struct php_x509_request' has no member named 'priv_key_bits'
/tmp/php-5.0.4/ext/openssl/openssl.c:1889: error: 'struct php_x509_request' has no member named 'priv_key'
/tmp/php-5.0.4/ext/openssl/openssl.c:1899: error: 'struct php_x509_request' has no member named 'priv_key'
/tmp/php-5.0.4/ext/openssl/openssl.c:1900: error: 'struct php_x509_request' has no member named 'priv_key'
/tmp/php-5.0.4/ext/openssl/openssl.c: In function 'zif_openssl_pkey_new':
/tmp/php-5.0.4/ext/openssl/openssl.c:1973: error: 'struct php_x509_request' has no member named 'priv_key'
/tmp/php-5.0.4/ext/openssl/openssl.c:1975: error: 'struct php_x509_request' has no member named 'priv_key'
/tmp/php-5.0.4/ext/openssl/openssl.c: In function 'zif_openssl_pkey_export_to_file':
/tmp/php-5.0.4/ext/openssl/openssl.c:2016: error: 'struct php_x509_request' has no member named 'priv_key_encrypt'
/tmp/php-5.0.4/ext/openssl/openssl.c: In function 'zif_openssl_pkey_export':
/tmp/php-5.0.4/ext/openssl/openssl.c:2067: error: 'struct php_x509_request' has no member named 'priv_key_encrypt'
make: *** [ext/openssl/openssl.lo] Error 1

So is there any remedy? The server is going to run php code made in 2005 for php 5.0.4. I was guessing we would run into trouble with that code if we were using the newest php package coming for Centos 6.4. Correct?
0
Comment
Question by:itnifl
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 83

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 115 total points
ID: 39666872
Not necessarily.  I would try running the old code and see if you get any errors.  I think that compiling the old PHP 5.0.4 may be more difficult than fixing the PHP code.  Most things in PHP have not changed, just few things.  Near the bottom of this page http://www.php.net/manual/en/ are the upgrade guides.
0
 
LVL 34

Assisted Solution

by:Duncan Roe
Duncan Roe earned 115 total points
ID: 39667310
Absolutely agree with DaveBaldwin. Compiling old code with new infrastructure is almost bound to end in tears. Note that you are having problems with an openssl module - you haven't even got to PHP yet!
As a rule, when you encounter trouble building a package, you need to concentrate on fixing the first reported error to the exclusion of all others. Once you fix the first error, many following errors may disappear.
But you're on a hiding to nothing building old software to run old scripts. You must run your script against current software and fix your script if it's now broken. That's the only sane maintenance policy.
0
 
LVL 34

Accepted Solution

by:
Seth Simmons earned 155 total points
ID: 39667629
this version of php won't work on CentOS 6
the errors you are getting refer to open ssl

if you were to remove that (in case you didn't need ssl support) then it would fail in curl functions so i'm guessing it's referring to functions that have been removed/deprecated in later versions

however, this does compile fine on CentOS 5.10
i just tested it and it worked

the first make failed looking for an odbc header file but after installing unixODBC-devel the next make was successful, throwing only a few odbc warnings.  i also removed the -disable-dba from the end of the configure statement since it's invalid

i'm attaching the output from the build for your review
output.txt
0
 
LVL 110

Assisted Solution

by:Ray Paseur
Ray Paseur earned 115 total points
ID: 39667689
The current versions of PHP are shown in the upper right of the PHP home page.
http://php.net/

PHP 5.0.4 is very, very old and not supported any more, not even for security updates.  It's like driving a rusting-out car with bad brakes.  Sometimes you just have to do the common-sense thing and upgrade.  Every release has a migration guide.  Example:
http://php.net/manual/en/migration55.changes.php
0

Featured Post

Building an interactive eFuture classroom

Watch and learn how ATEN provided a total control system solution including seamless switching matrix switch, HDBaseT extenders, PDU, lighting control to build an interactive eFuture classroom.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Multi line FPDF footer: 3 27
How to use session variables in php? 22 51
RPM creation 6 23
Looking for suggestions on different user roles best design practices 4 30
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question