PHP 5 installation Question

software development

#1

In short It fails to install libXML2. I have scoured the web for install scripts and I have tried several different versions of the LibXML2 script I am quite sure I need to set some flag when I compile it I just don’t know what the specific flag is.

I have found numerous articles discussing the install and none of them seem to be working because it always Fails from me on libXML2.

I have also scoured the web for information on gcc + debian + 64 bit still no luck if anyone could help me out with this it would rock!

Target: x86_64-linux-gnu
Configured with: …/src/configure -v --enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --program-suffix=-4.1 --enable-__cxa_atexit --enable-clocale=gnu --enable-libstdcxx-debug --enable-mpfr --enable-checking=release x86_64-linux-gnu
Thread model: posix
gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)

Error Message is
In file included from /usr/include/netinet/in.h:365,
from /usr/include/netdb.h:28,
from nanohttp.c:40:
/usr/include/bits/byteswap.h:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘package’
/usr/include/bits/byteswap.h:1: error: missing terminating ’ character
/usr/include/bits/byteswap.h:16: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘can’
/usr/include/bits/byteswap.h:20: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘version’
/usr/include/bits/byteswap.h:26: error: stray ‘' in program /usr/include/bits/byteswap.h:26: error: missing terminating ' character /usr/include/bits/byteswap.h:27: error: stray '’ in program
/usr/include/bits/byteswap.h:27: error: missing terminating ’ character
nanohttp.c: In function ‘xmlNanoHTTPConnectHost’:
nanohttp.c:1018: warning: implicit declaration of function '__bswap_16’
nanohttp.c:1018: warning: nested extern declaration of '__bswap_16’
make[2]: *** [nanohttp.lo] Error 1
make[2]: Leaving directory /home//++++++//source/libxml2-2.6.27' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory/home/++++++/source/libxml2-2.6.27’
make: *** [all] Error 2


#2

[code]LOC=[wherever]
export PATH=$LOC/bin:$PATH

libiconv="[color=#0000CC]libiconv-1.12[/color]“
libxml2=”[color=#0000CC]libxml2-2.6.32[/color]"

cd [libiconv_src]
./configure --prefix=$LOC
nice -n 19 make
make install

cd [libxml2_src]
./configure --prefix=$LOC --with-iconv=$LOC
nice -n 19 make
make install[/code]

Maximum Cash Discount on any plan with MAXCASH

How To Install PHP.INI / ionCube on DreamHost


#3

for what ever reason it still fails. Even with “nice” in the script it still fails same spot…

Error Message is
In file included from /usr/include/netinet/in.h:365,
from /usr/include/netdb.h:28,
from nanohttp.c:40:
/usr/include/bits/byteswap.h:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘package’
/usr/include/bits/byteswap.h:1: error: missing terminating ’ character
/usr/include/bits/byteswap.h:16: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘can’
/usr/include/bits/byteswap.h:20: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘version’
/usr/include/bits/byteswap.h:26: error: stray ‘' in program /usr/include/bits/byteswap.h:26: error: missing terminating ' character /usr/include/bits/byteswap.h:27: error: stray '’ in program
/usr/include/bits/byteswap.h:27: error: missing terminating ’ character
nanohttp.c: In function ‘xmlNanoHTTPConnectHost’:
nanohttp.c:1018: warning: implicit declaration of function '__bswap_16’
nanohttp.c:1018: warning: nested extern declaration of '__bswap_16’
make[2]: *** [nanohttp.lo] Error 1
make[2]: Leaving directory /home//++++++//source/libxml2-2.6.27' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory/home/++++++/source/libxml2-2.6.27’
make: *** [all] Error 2


#4

Use the versions and config lines in my previous post.

Maximum Cash Discount on any plan with MAXCASH

How To Install PHP.INI / ionCube on DreamHost


#5

I am thinking their version of GCC and libXML no longer work together or this method is no longer working at all. I have honestly used the exact versions above that code etc… It always fails with error 2 after receiving error 1 on nanohttp.lo knowing that things change a lot at dreamhost I am betting these scripts won’t work anymore. Like I have said I have used “nice” tried many different versions of LibXML2 including much older versions and it still crashes:(

In file included from /usr/include/netinet/in.h:365,
from /usr/include/netdb.h:28,
from nanohttp.c:40:
/usr/include/bits/byteswap.h:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘package’
/usr/include/bits/byteswap.h:1: error: missing terminating ’ character
/usr/include/bits/byteswap.h:16: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘can’
/usr/include/bits/byteswap.h:20: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘version’
/usr/include/bits/byteswap.h:26: error: stray ‘' in program /usr/include/bits/byteswap.h:26: error: missing terminating ' character /usr/include/bits/byteswap.h:27: error: stray '’ in program
/usr/include/bits/byteswap.h:27: error: missing terminating ’ character
nanohttp.c: In function ‘xmlNanoHTTPConnectHost’:
nanohttp.c:1017: warning: implicit declaration of function '__bswap_16’
nanohttp.c:1017: warning: nested extern declaration of '__bswap_16’
make[2]: *** [nanohttp.lo] Error 1
make[2]: Leaving directory /home/icreateo/source/libxml2-2.6.32' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory/home/icreateo/source/libxml2-2.6.32’
make: *** [all] Error 2

What is most irritating to me is I have been with Dreamhost for years I remember when you could just simply select it from a drop down menu know you have to use divine intervention to imagine what their systems would like then do that and was a day or two in the process. Not only is that frustrating when they migrated everything for whatever reason I am on PHP version 4.4.9. Please if anyone knows a solution to this please let me know I am very interested in being able to install libXML2.


#6

You can get the version in shell with gcc -v

In regard to the PHP version, are you referring to the shell CLI (php -v) or the version being echoed by phpinfo(); over a browser?

Maximum Cash Discount on any plan with MAXCASH

How To Install PHP.INI / ionCube on DreamHost


#7

Yep I placed it on my first post ->Target: x86_64-linux-gnu
Configured with: …/src/configure -v --enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --program-suffix=-4.1 --enable-__cxa_atexit --enable-clocale=gnu --enable-libstdcxx-debug --enable-mpfr --enable-checking=release x86_64-linux-gnu
Thread model: posix
gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)

gcc version 4.1.2 20061115 running on Debian x86_64 pretty sure I need to set some flag to get libXML2 working again just not sure what it is on a side note ROR rocks on DH just want to get PHP5 working! So if anyone has gone threw this process has a similar configuration and has done this in the last few months your input would be greatly appreciated thanks in advanced.


#8

I did this install very recently so that I could enable zip in php on my own webspace and I used the script on the DreamHost wiki: http://wiki.dreamhost.com/PHP_5_install_script

I am not sure about the target architecture though, I don’t see it in the DHW script.


#9

Built 7 yesterday, just finished the 3rd for today :slight_smile:

Of course, you are aware that DreamHost’s default PHP includes libxml, right?

libXML support active libXML Version 2.6.16 libXML streams enabled

Maximum Cash Discount on any plan with MAXCASH

How To Install PHP.INI / ionCube on DreamHost


#10

Has anyone received this error?

In file included from /usr/include/netinet/in.h:365,
from /usr/include/netdb.h:28,
from nanohttp.c:40:
/usr/include/bits/byteswap.h:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘package’
/usr/include/bits/byteswap.h:1: error: missing terminating ’ character
/usr/include/bits/byteswap.h:16: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘can’
/usr/include/bits/byteswap.h:20: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘version’
/usr/include/bits/byteswap.h:26: error: stray ‘' in program /usr/include/bits/byteswap.h:26: error: missing terminating ' character /usr/include/bits/byteswap.h:27: error: stray '’ in program
/usr/include/bits/byteswap.h:27: error: missing terminating ’ character
nanohttp.c: In function ‘xmlNanoHTTPConnectHost’:
nanohttp.c:1017: warning: implicit declaration of function '__bswap_16’
nanohttp.c:1017: warning: nested extern declaration of '__bswap_16’
make[2]: *** [nanohttp.lo] Error 1
make[2]: Leaving directory /home/icreateo/source/libxml2-2.6.32' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory/home/icreateo/source/libxml2-2.6.32’
make: *** [all] Error 2

sXi what process do you use to install it? Script?
I am not in a big hurry to get this done just want to do it correctly.
Next question how do I check libxml version from ssh?
libxml -v didn’t work:(
I am currently running PHP 4.4.9 and I am assuming on Dreamhost not ever config is created equally…

Any way thanks and any help with the error would be greatly appreciated am I the only one to receive this error?


#11

Install it “by hand” (copy/pasta scripts are full of fail).

Call phpinfo() in a browser to see the working web version info.

<?php phpinfo(); ?>

Maximum Cash Discount on any plan with MAXCASH

How To Install PHP.INI / ionCube on DreamHost


#12

[quote]
Install it “by hand” (copy/pasta scripts are full of fail).[/quote]
DH’s script worked perfectly for me, so it must not be full of fail lol. I would like to hear about these pasta scripts though.


#13

Doing things “by hand” helps one more clearly understand the processing involved. Understanding a process is of paramount importance when troubleshooting any problem that may occur in any given situation.

Try it sometime :wink:

Maximum Cash Discount on any plan with MAXCASH

How To Install PHP.INI / ionCube on DreamHost


#14

I just need to know if anyone besides me has had this error believe it or not I do receive it.

In file included from /usr/include/netinet/in.h:365,
from /usr/include/netdb.h:28,
from nanohttp.c:40:
/usr/include/bits/byteswap.h:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘package’
/usr/include/bits/byteswap.h:1: error: missing terminating ’ character
/usr/include/bits/byteswap.h:16: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘can’
/usr/include/bits/byteswap.h:20: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘version’
/usr/include/bits/byteswap.h:26: error: stray ‘' in program /usr/include/bits/byteswap.h:26: error: missing terminating ' character /usr/include/bits/byteswap.h:27: error: stray '’ in program
/usr/include/bits/byteswap.h:27: error: missing terminating ’ character
nanohttp.c: In function ‘xmlNanoHTTPConnectHost’:
nanohttp.c:1017: warning: implicit declaration of function '__bswap_16’
nanohttp.c:1017: warning: nested extern declaration of '__bswap_16’
make[2]: *** [nanohttp.lo] Error 1
make[2]: Leaving directory /home/icreateo/source/libxml2-2.6.32' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory/home/icreateo/source/libxml2-2.6.32’
make: *** [all] Error 2

Does anyone have a recent example of how too install libxml2??


#15

Yes. It is the primary content of the first reply to this thread.

Maximum Cash Discount on any plan with MAXCASH

How To Install PHP.INI / ionCube on DreamHost


#16

SXI I am not going to pay you to help me so I would appreciate it if you would no longer comment on this post. If your suggestion would have worked than I wouldn’t be posting now. Move on I am not going to pay you.


#17

The first reply to this thread contains the information required to build libxml2 on any Linux system you care to throw it at. It is current, applicable, and most certainly has no price tag attached.

Happy coding! :slight_smile:

Maximum Cash Discount on any plan with MAXCASH

How To Install PHP.INI / ionCube on DreamHost