Manual changes need with new version of LibXML2

I have the new zlib and libxml on 3 servers, and there has not been any trouble. However today I upgraded one server from MySQL 5.1.x to MySQL 5.5.x, and then doing ./build php n after MySQL upgrade I get this error:

Code:
configure: error: wrong mysql library version or lib not found. Check config.log for more information.

*** There was an error while trying to configure php. Check the configure/suphp/configure.php5 file

Is it because of the new zlib and libxml, or is it another bug upgrading to MySQL 5.5.x?
 
I am now trying to fix the problem in post above that I get after upgrade of MySQL by running all this again:

Code:
./build zlib
./build apache
./build libxml2
./build libxslt
./build freetype
./build curl
./build php n

However after doing ./build apache I now get this error at bottom:

Code:
Restarting apache.
Stopping httpd:                                            [  OK  ]
Starting httpd: Syntax error on line 56 of /usr/local/directadmin/data/users/USERNAME/httpd.conf:
Invalid command 'suPHP_Engine', perhaps misspelled or defined by a module not included in the server configuration

So, has there been any changes to suphp lately that I should now about?
 
Last edited:
The new zlib and libxml version was running perfectly on all my 3 servers when I was using MySQL 5.1.x, after upgrading to MySQL 5.5.x I get the errors in two previous posts. It did not help to recompile everything on my list in previous post all over again.

My conlusion is that the new zlib and libxml version is only having problems when using MySQL 5.5.x, it works fine on MySQL 5.1.x

Therfor I am reinstalling the server with backup, and continue to use MySQL 5.1.x and new zlib and libxml.

John, please make a fix for the new zlib and libxml so that they work with MySQL 5.5.x!
 
Hello,
Code:
Invalid command 'suPHP_Engine', perhaps misspelled or defined by a module not included in the server configuration
type:
Code:
./build suphp
./build rewrite_confs
and make sure there are no custom changes, such as this one.

Regading MySQL and zlib (mentioned in a previous post, assuming you're using rpms, we don't create them. They're straight from dev.mysql.com, so if they don't like the new zlib, stick with the old zlib.
Not much we can do there. As mentioned, there is likely a reason most OS's don't have the new version of zlib in their packaging system.

John
 
I am running the default suPHP from custombuild. I am only doing all the upgrades using custombuild.

I can't stick with the old zlib, because I have already upgraded all 3 of my servers to your new zlib and libxm. It works without problem, until upgrading from MySQL 5.1.x to MySQL 5.5.x

I expect you to take responsebility and fix the new zlib and libxml to work with MySQL 5.5.x
 
Last edited:
What are the config errors in the php config.log when the compile fails? It's likely related to the issue described on the previous page.
 
I can't give you the config errors anymore because I have restored the server from backup.

Edit: John fixed the issue on one of my boxes, it is still not clear to me what went wrong previous. When it is clear to me, I will post some info here.
 
Last edited:
...Revert back to old zlib / libxml2...

Hi nmb, I have not been able to solve the errors that I get when doing ./build php n after I upgraded to mysql 5.5.x on one server. Therfor I have decided to downgrade zlib and libxml.

How did you downgrade zlib and libxml? Did you do only the steps provided by John here?: http://www.directadmin.com/forum/showthread.php?t=43000&p=218246#post218246

Or did you have to manually remove some links and do other stuff too? I want to downgrade zlib and libxml, but is afraid that something more must be done, and afraid to get new problems.

Edit: John (DirectAdmin) has been so kind and sent me very detailed instructions on how to downgrade. I will attempt a downgrade soon.
 
Last edited:
Hi nmb, I have not been able to solve the errors that I get when doing ./build php n after I upgraded to mysql 5.5.x on one server. Therfor I have decided to downgrade zlib and libxml.

John may help you already. For me, I just rename zlib and libxml. (To be safe, then, delete it after finish.) Then, ./build both of them. Then, ./build the rest programs. That works fine. I even tried to restart without any problem.
 
@nmb, maybe you need to do some more? I am attempting downgrade of one server today. Here is instructions from John (DirectAdmin):

1) Check /usr/local/lib

Code:
[root@server]# cd /usr/local/lib
[root@server]# ls -la libz*
 
-rw-r--r--  1 root root 92082 Feb 27 17:43 /usr/local/lib/libz.a
lrwxrwxrwx  1 root root    13 Feb 27 17:43 /usr/local/lib/libz.so -> libz.so.1.2.6
lrwxrwxrwx  1 root root    13 Feb 27 17:43 /usr/local/lib/libz.so.1 -> libz.so.1.2.6
-rwxr-xr-x  1 root root 75810 Apr  6  2010 /usr/local/lib/libz.so.1.2.3
-rwxr-xr-x  1 root root 85935 Feb 27 17:43 /usr/local/lib/libz.so.1.2.6

2) Check ssh to see what it's linked to:

Code:
[root@server]# ldd /usr/sbin/sshd | grep libz
        libz.so.1 => /usr/local/lib/libz.so.1 (0x00cee000)

3) Copy 1.2.6 to /root, in case you need it.

Code:
cp libz.so.1.2.6 /root/libz.so.1.2.6

4) Type:

Code:
ldconfig

to update the links.

5) Check #1 again to ensure that libz.so.1 points to 1.2.3, eg:

Code:
[root@server]# ls -la libz.so.1
lrwxrwxrwx  1 root root 13 Feb 27 17:43 libz.so.1 -> libz.so.1.2.3

6) Confirm that sshd loads the library correctly:

Code:
[root@server]# /usr/sbin/sshd -h
sshd: option requires an argument -- h
OpenSSH_3.9p1, OpenSSL 0.9.7a Feb 19 2003
usage: sshd [-46Ddeiqt] [-b bits] [-f config_file] [-g login_grace_time]
            [-h host_key_file] [-k key_gen_time] [-o option] [-p port] [-u len]
don't worry about the -h option or that it throws an error.
We just want to see that sshd can load without any linker errors.

------

From here, libz is downgraded... but we need to remove the new xml version too, so repeat the same basic thing, but on xml2.

1)
Code:
[root@server]# ls -la libxml2*
Code:
-rw-r--r--  1 root root 3274214 Feb 27 18:18 libxml2.a
-rwxr-xr-x  1 root root     975 Feb 27 18:18 libxml2.la
lrwxrwxrwx  1 root root      16 Feb 27 18:18 libxml2.so -> libxml2.so.2.7.8
lrwxrwxrwx  1 root root      16 Feb 27 18:18 libxml2.so.2 -> libxml2.so.2.7.8
-rwxr-xr-x  1 root root 2481508 Feb 13 19:11 libxml2.so.2.7.6
-rwxr-xr-x  1 root root 2484101 Feb 27 18:18 libxml2.so.2.7.8

2)
Code:
cp libxml2.so.2.7.8 /root/libxml2.so.2.7.8

3)
Code:
ldconfig

4)
Code:
ls -la libxml2*

Ensure you see:
Code:
libxml2.so.2 -> libxml2.so.2.7.6

5) You may want to recompile the old version of zlib and xml2 again, just to ensure the .h (development header) files get set to the correct version, then recompile php.

Code:
./build update
grep zlib versions.txt        #ensure 1.2.3
./build zlib
./build libxml2
./build php n

---

it at any point you run into a library linking error with sshd (when it should be working), copy the libz.so.1.2.6 from /root back to /usr/local/lib, and type:
Code:
ldconfig

and test sshd again with ldd.
 
It seems there is some commands missing in Johns instructions. So instead I am doing something like this:

Code:
cd /usr/local/directadmin/custombuild
perl -pi -e 's/libxml2:2.7.8:.*/libxml2:2.7.6:/' versions.txt
perl -pi -e 's/zlib:1.2.6:.*/zlib:1.2.3:/' versions.txt
rm -f /usr/local/lib/libz.so*
rm -f /usr/local/lib/libxml2.so*
ldconfig
./build zlib
./build libxml2
./build php n
 
Hello,

Looks like my step 3 should have been a "mv" instead of a "cp".. which would be the missing item.

John
 
No, I think there is more missing. Because I also tried to do after step 3:

Code:
rm -f /usr/local/lib/libz.so*

Then I did:

Code:
ldconfig

Then I did:

Code:
ls -la libz.so.1

But the I got some error that it did not exist!

So Instead I am doing my forum reply #31 above.

The instructions you gave me, is missing alot, it seems. I asked for detailed instructions, but that is not good enough.
 
Nowhere in my guide do I mention a "rm -f libz.so*".. as my strategy is to never be completely without a module at all, as that's risky (in case the box reboots, etc..)
The reason you'd see the error that no file exists is because you've deleted all of them with the rm -f libz.so.*.... in which case, just running ./build zlib would re-add it.

Your method should work fine though.. it's just a bit more dangerous since you're without any libz file until the recompile.

In any case, #31 should work, just don't reboot the box mid-run.

John
 
Nowhere in my guide do I mention a "rm -f libz.so*".. as my strategy is to never be completely without a module at all, as that's risky (in case the box reboots, etc..)...

Yes, but your guide was missing something, and therfor I was forced to look for solutions. So I found that command from http://www.directadmin.com/forum/showthread.php?t=43000&p=218246#post218246 and added it between the steps in order to try so solve the problem with missing commands. However I was only guessing.
 
Last edited:
Your guide also seems to miss these commands:

perl -pi -e 's/libxml2:2.7.8:.*/libxml2:2.7.6:/' versions.txt
perl -pi -e 's/zlib:1.2.6:.*/zlib:1.2.3:/' versions.txt

So I will just continue to experiment. I am not happy about that.
 
After I did this http://www.directadmin.com/forum/showthread.php?t=43000&p=218246#post218246

I still get 1.2.6 in zlib-current:

Code:
[root@server lib]# cd /usr/local/directadmin/custombuild
[root@server custombuild]# grep zlib versions.txt
zlib:1.2.3:debc62758716a169df9f62e6ab2bc634
[B]zlib-current:1.2.6[/B]:618e944d7c7cd6521551e30b32322f4a

So everything is not yet downgraded. It needs to be done something more.

Edit: I think zlib-current:1.2.6 maybe is correct after all. I guess everybody else also would have that in versions.txt
 
Last edited:
However, everything else looks good:

Code:
[root@server ~]# cd /usr/local/lib

[root@server lib]# ldd /usr/sbin/sshd | grep libz
        libz.so.1 => /usr/local/lib/libz.so.1 (0x00007f3b112ef000)

[root@server lib]# ls -la libz.so.1
lrwxrwxrwx 1 root root 13 Mar 10 13:00 libz.so.1 -> libz.so.1.2.3

[root@server lib]# ls -la libz*
-rw-r--r-- 1 root root 125586 Mar 10 13:00 libz.a
lrwxrwxrwx 1 root root     13 Mar 10 13:00 libz.so -> libz.so.1.2.3
lrwxrwxrwx 1 root root     13 Mar 10 13:00 libz.so.1 -> libz.so.1.2.3
-rwxr-xr-x 1 root root  98661 Mar 10 13:00 libz.so.1.2.3

[root@server lib]# ls -la libxml2*
-rw-r--r-- 1 root root 7170846 Mar 10 13:15 libxml2.a
-rwxr-xr-x 1 root root     976 Mar 10 13:15 libxml2.la
lrwxrwxrwx 1 root root      16 Mar 10 13:15 libxml2.so -> libxml2.so.2.7.6
lrwxrwxrwx 1 root root      16 Mar 10 13:15 libxml2.so.2 -> libxml2.so.2.7.6
-rwxr-xr-x 1 root root 4210973 Mar 10 13:15 libxml2.so.2.7.6

[root@server lib]# /usr/sbin/sshd -h
sshd: option requires an argument -- h
OpenSSH_5.3p1, OpenSSL 1.0.0-fips 29 Mar 2010
usage: sshd [-46DdeiqTt] [-b bits] [-C connection_spec] [-f config_file]
            [-g login_grace_time] [-h host_key_file] [-k key_gen_time]
            [-o option] [-p port] [-u len]
 
Last edited:
Code:
cd /usr/local/directadmin/custombuild
perl -pi -e 's/libxml2:2.7.8:.*/libxml2:2.7.6:/' versions.txt
perl -pi -e 's/zlib:1.2.6:.*/zlib:1.2.3:/' versions.txt
rm -f /usr/local/lib/libz.so*
rm -f /usr/local/lib/libxml2.so*
ldconfig
./build zlib
./build libxml2
./build php n

output:
Code:
Generating phar.php
/usr/local/directadmin/custombuild/php-5.4.24/sapi/cli/php: /usr/local/lib/libxml2.so.2: version `LIBXML2_2.9.0' not found (required by /usr/local/lib/libxslt.so.1)
make: *** [ext/phar/phar.php] Error 1

see http://forum.directadmin.com/showthread.php?t=48154
 
Back
Top