I can't install php-5.2.6

Issues related to applications and software problems
Post Reply
dcervera
Posts: 1
Joined: 2017/05/10 09:10:04

I can't install php-5.2.6

Post by dcervera » 2017/05/10 09:23:37

good morning everyone
I am trying to install php-5.2.6 and get the following error message

Code: Select all

Thank you for using PHP.

Notice: Following unknown configure options were used:

--enable-zlib

Check './configure --help' for available options

#########################################################################
# PHP: configure OK                                                     #
#########################################################################
/bin/sh /opt/php-5.2.6/libtool --silent --preserve-dup-deps --mode=compile gcc  -Iext/dom/ -I/opt/php-5.2.6/ext/dom/ -DPHP_ATOM_INC -I/opt/php-5.2.6/include -I/opt/php-5.2.6/main -I/opt/php-5.2.6 -I/usr/include/libxml2 -I/opt/php-5.2.6/ext/date/lib -I/opt/php-5.2.6/TSRM -I/opt/php-5.2.6/Zend    -I/usr/include -g -O2   -c /opt/php-5.2.6/ext/dom/node.c -o ext/dom/node.lo
/opt/php-5.2.6/ext/dom/node.c: In function 'dom_canonicalization':
/opt/php-5.2.6/ext/dom/node.c:1950:21: error: dereferencing pointer to incomplete type
    ret = buf->buffer->use;
                     ^
In file included from /opt/php-5.2.6/main/php.h:38:0,
                 from /opt/php-5.2.6/ext/dom/node.c:26:
/opt/php-5.2.6/ext/dom/node.c:1952:40: error: dereferencing pointer to incomplete type
     RETVAL_STRINGL((char *) buf->buffer->content, ret, 1);
                                        ^
/opt/php-5.2.6/Zend/zend_API.h:472:14: note: in definition of macro 'ZVAL_STRINGL'
   char *__s=(s); int __l=l;  \
              ^
/opt/php-5.2.6/ext/dom/node.c:1952:5: note: in expansion of macro 'RETVAL_STRINGL'
     RETVAL_STRINGL((char *) buf->buffer->content, ret, 1);
     ^
make: *** [ext/dom/node.lo] Error 1
#########################################################################
# PHP: make ERROR                                                       #
#########################################################################
Can anybody help me
Thank you

User avatar
remirepo
Posts: 447
Joined: 2014/09/21 09:07:12
Location: France
Contact:

Re: I can't install php-5.2.6

Post by remirepo » 2017/05/10 11:57:52

5.2.6, seriously ? (5.2 is EOL for >6 years)

You should consider using CentOS 6 and PHP 5.3 as a minimal version (or CentOS 7 and php 5.4)

Nobody serious maintains 5.2 packages
And it won't build on a modern distro (as you have already noticed)
And build from sources is usually discouraged here.
Remi's Repository - Forum - Blog

bertalanimre
Posts: 140
Joined: 2015/06/02 13:04:03

Re: I can't install php-5.2.6

Post by bertalanimre » 2017/05/22 09:11:37

I aggree, you shouldn't try to install PHP 5.2. But in case you HAVE TO, try to find and install a docker image. That way you won't hurt your current install of PHP and you still can use a website written for PHP 5.2.

Post Reply