Bug during Apache/PHP compile

trparky

Well-Known Member
Apr 23, 2003
184
1
168
Syntax error on line 210 of /usr/local/apache/conf/httpd.conf:
Cannot load /usr/local/apache/libexec/libphp4.so into server: libmysqlclient.so.12: cannot open shared object file: No such file or directory
/etc/rc.d/init.d/httpd start: httpd could not be started

So, I did some investigatation and found this...

[email protected] [/usr/lib]# ls -al | grep mysql
lrwxrwxrwx 1 root root 26 Sep 15 22:21 libmysqlclient_r.so -> libmysqlclient_r.so.14.0.0*
lrwxrwxrwx 1 root root 26 Sep 15 22:21 libmysqlclient_r.so.14 -> libmysqlclient_r.so.14.0.0*
-rwxr-xr-x 1 root root 1227559 Jul 18 09:27 libmysqlclient_r.so.14.0.0*
lrwxrwxrwx 1 root root 24 Sep 15 22:21 libmysqlclient.so -> libmysqlclient.so.14.0.0*
lrwxrwxrwx 1 root root 20 Sep 15 22:22 \tlibmysqlclient.so.12\ \=>\ not\ found -> libmysqlclient.so.14*
lrwxrwxrwx 1 root root 24 Sep 15 22:21 libmysqlclient.so.14 -> libmysqlclient.so.14.0.0*
-rwxr-xr-x 1 root root 1219682 Jul 18 09:28 libmysqlclient.so.14.0.0*
drwxr-xr-x 2 root root 4096 Sep 15 22:21 mysql/

I have marked what I find wierd in bold.

Only after I do this...
[email protected] [/usr/lib]# ln -s libmysqlclient.so.14 libmysqlclient.so.12
Does Apache and PHP work again.
 

DN-Paul

Well-Known Member
Oct 30, 2003
91
0
156
Anyone got a solution?
I just found this problem too and php 4.x is unacceptable since more of our scripts require php5 :(
 
Last edited:

firexit

Active Member
Nov 4, 2004
29
1
158
same issue in 2 diffrent clean installion

using centOS 4.1
and
WHM 10.6.0 cPanel 10.8.0-R27
CentOS 4.1 i686 - WHM X v3.1.0

after upgrading the mysql to ver 4.1.13 and recompliing apache i get the same error
 

DN-Paul

Well-Known Member
Oct 30, 2003
91
0
156
Oh yeah, all the boxes I'm having the problem on are RHE3 latest "RELEASE" cpanel, mysql 4.1.13.

On one I've tried ln -s libmysqlclient.so.14 libmysqlclient.so.12 as mentioned above, after doing so apache starts but php dosen't work (any php scripts requested from the server are offered as a download rather than being parsed and the output shown)
 

DN-Paul

Well-Known Member
Oct 30, 2003
91
0
156
dreamwiz said:
same here, any official word from cpanel?
Nope. And no-one has looked at it in bugzilla (#3290), even though it's marked as "blocker" (since it is for me as I have 2 boxes out of action at the moment).
 

tjfulopp

Member
Sep 22, 2005
21
0
151
Slovakia / Belgium
This is crazy. It is not any obscure or hard-to-trace problem, it must be very obvious to cPanel folks that this just does not work and needs urgent fixing. The question is why do they not care?
 

chirpy

Well-Known Member
Verifed Vendor
Jun 15, 2002
13,465
30
473
Go on, have a guess
Have you logged a ticket with cPanel through your cPanel license provider to get their official response to the issue? Have you also voted for the bug? You should do both if you want to bring it to their attention. The more tickets they get about a specific issue from different people the more likely they're going to be able to fix it for you.
 

dreamwiz

Well-Known Member
Aug 28, 2003
93
0
156
i have been voting for the bug and even opened a ticket with my cpanel licenser and cpanel itself. Any of these actions has led to no results.. even tried to bring this issue on #cpanel in case some of cpanel staff would take a look at it.

This bug has been around for quite some while now.. and it is a blocker. I cant really say else except im seriously considering to migrate away from Cpanel to some other controlpanel who takes their bugs more seriously...
 

DN-Paul

Well-Known Member
Oct 30, 2003
91
0
156
Anyone had a response from cpanel?

I'll be removing cpanel from all our boxes and recommending our clients remove it from theirs if this hasn't been looked into by the end of the week.
 

Miraenda

Well-Known Member
Jul 28, 2004
243
5
168
Coralville, Iowa USA
cPanel Access Level
Root Administrator
We ran into this issue and to correct it, we simply did the following:

Code:
ln -s /usr/lib/libmysqlclient.so.14 /usr/lib/libmysqlclient.so.12
After this, Apache restarted fine. This suggestion was via http://forums.cpanel.net/showthread.php?t=42398 thread.

We are running PHP5 and MySQL 4.1.13-standard, so you do not have to downgrade to PHP4.4.0 to get it working at all.
 

DN-Paul

Well-Known Member
Oct 30, 2003
91
0
156
Miraenda said:
We ran into this issue and to correct it, we simply did the following:

Code:
ln -s /usr/lib/libmysqlclient.so.14 /usr/lib/libmysqlclient.so.12
After this, Apache restarted fine. This suggestion was via http://forums.cpanel.net/showthread.php?t=42398 thread.

We are running PHP5 and MySQL 4.1.13-standard, so you do not have to downgrade to PHP4.4.0 to get it working at all.
You must have been having a different problem to us, we were having this problem, as now confirmed by cpanel:

Cpanel Bugzilla said:
------- Comment #1 From Brian Vincent 2005-10-20 22:23 [reply] -------

I've confirmed this bug on 10.8.0-STABLE_59. It appears that our build script
for php is giving ./configure both --with-mysqli and --with-mysql=/usr on
systems with mysql 4.1 and above.

When php is < 5.0 --with-mysqli is just ignored and everything builds fine.

When php is >= 5.0, using both --with-mysql and --with-mysqli causes duplicate
definitions of functions and php does not compile.

We need to make sure that we use --with-mysqli ONLY when mysql >= 4.1 and php
>= 5.0, otherwise, we need to use --with-mysql=location


------- Comment #2 From Brian Vincent 2005-10-20 22:29 [reply] -------

Created an attachment (id=207)
patch to buildapache/modules/php_prep

This patch uses the $NEWPHP variable which is only set to "1" when php >= 5.0.

If $NEWPHP != "1" or ./mysqlstring did not return --with-mysqli because it
thinks mysql is too old, then it sets WITHMYSQL to be --with-mysql=location

otherwise php>=5.0 and mysql>=4.1 and WITHMYSQL is set to --with-mysqli

I havent thuroughly tested this yet, but I have tested this with mysql 4.1 and
php 5.0.4 and it only used --with-mysqli and php built fine.
Shame I only have 1 cpanel box left now, and since it's a production box don't want to run untested patches on it :(