473,491 Members | 2,133 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Need help building PHP3 with MySQL as DSO on Solaris 8, PHP4 + MySQL built and loads fine

Greetings, I need help configuring/building PHP3 with MySQL as a DSO
on a Solaris 8 box - this module is needed to host some existing
sites I will be migrating
Note. I built PHP4 from source and it loads without an error.

When I try t run "apachectl configtest" I get the following error:
--
Cannot load /usr/local/apache/libexec/libphp3.so into server: ld.so.1:
/usr/local/apache/bin/httpd:
fatal: relocation error: file /usr/local/apache/libexec/libphp3.so:
symbol mysql_create_db: referenced symbol not found

I would like to know how to fix this, below are some of the many
different approaches I have tried
------

I am trying to build php-3.0.18 with Apache 1.3.31
I am using gcc 3.3.2
My configure string looks like the following
--
../configure --with-mysql=/usr/local/mysql
--with-apxs=/usr/local/apache/bin/apxs --with-xml --enable-versioning
--prefix=/usr/local/php3
------

I have tried modifying my LD_LIBRARY_PATH to include
/usr/local/mysql/lib and alternatively /usr/local/mysql/lib/mysql

I have tried configuring my run time linking environment with crle as
follows:
--
Default Library Path (ELF):
/usr/lib:/usr/local/lib:/usr/local/ssl/lib:/usr/local/mysql/lib
and alternatively
/usr/lib:/usr/local/lib:/usr/local/ssl/lib:/usr/local/mysql/lib/mysql
------

I also tried adding the following statements to the Makefile in the
APXS_LDFLAGS and LIBS definitions: "-lmysqlclient" as follows
--
APXS_LDFLAGS = -L/usr/local/lib -L/usr/local/mysql/lib/mysql
-lpam -lm -ldl -lsocket -lnsl -lresolv -lmysqlclient

LIBS = -Wl,-R'/usr/local/mysql/lib/mysql'
-L/usr/local/mysql/lib/mysql pcrelib/libpcre.a
-lpam -lm -ldl -lsocket -lnsl -lresolv -lmysqlclient

(thank you to Mika Tuupola for his posting in mailing.www.php-user)
------

if I run nm on the installed module I see a lot of unlinked calls, see

nm /usr/local/apache/libexec/libphp3.so | grep mysql

[3121]|0|0|NOTY |GLOB |0|UNDEF|mysql_affected_rows
[2974]|0|0|NOTY |GLOB |0|UNDEF|mysql_change_user
[3132]|0|0|NOTY |GLOB |0|UNDEF|mysql_close
[2895]|0|0|NOTY |GLOB |0|UNDEF|mysql_create_db
[2983]|0|0|NOTY |GLOB |0|UNDEF|mysql_data_seek
[3091]|0|0|NOTY |GLOB |0|UNDEF|mysql_drop_db
[3117]|0|0|NOTY |GLOB |0|UNDEF|mysql_errno
[2850]|0|0|NOTY |GLOB |0|UNDEF|mysql_error
[2880]|0|0|NOTY |GLOB |0|UNDEF|mysql_fetch_field
[3126]|0|0|NOTY |GLOB |0|UNDEF|mysql_fetch_lengths
[3050]|0|0|NOTY |GLOB |0|UNDEF|mysql_fetch_row
[3084]|0|0|NOTY |GLOB |0|UNDEF|mysql_field_count
[2856]|0|0|NOTY |GLOB |0|UNDEF|mysql_field_seek
[2945]|0|0|NOTY |GLOB |0|UNDEF|mysql_free_result
------
I tried modifying the apachectl script with a LD_LIBRARY_PATH
statement to include the path to the mysql libraries but that did not
work either.
If I run ldd on the installed module I get the following:

ldd /usr/local/apache/libexec/libphp3.so
libpam.so.1 => /usr/lib/libpam.so.1
libm.so.1 => /usr/lib/libm.so.1
libdl.so.1 => /usr/lib/libdl.so.1
libsocket.so.1 => /usr/lib/libsocket.so.1
libnsl.so.1 => /usr/lib/libnsl.so.1
libresolv.so.2 => /usr/lib/libresolv.so.2
libmysqlclient.so.12 =>
/usr/local/mysql/lib/mysql/libmysqlclient.so.12
libc.so.1 => /usr/lib/libc.so.1
libcmd.so.1 => /usr/lib/libcmd.so.1
libmp.so.2 => /usr/lib/libmp.so.2
libz.so =>/usr/lib/libz.so
librt.so.1 => /usr/lib/librt.so.1
libcrypt_i.so.1 =>/usr/lib/libcrypt_i.so.1
libgen.so.1 => /usr/lib/libgen.so.1
libgcc_s.so.1 => /usr/local/lib/libgcc_s.so.1
libaio.so.1 => /usr/lib/libaio.so.1
/usr/platform/SUNW,Ultra-250/lib/libc_psr.so.1
So if I understand this correclty the libraries in
/usr/local/mysql/lib/mysql are being used.
Does anyone have any helpful suggestions for me?

Jul 17 '05 #1
2 2556
On Fri, 25 Jun 2004 11:28:21 -0400, pa****@acadia.net wrote:
Greetings, I need help configuring/building PHP3 with MySQL as a DSO
on a Solaris 8 box - this module is needed to host some existing
sites I will be migrating
Note. I built PHP4 from source and it loads without an error.
Solaris 8 for Intel or Sparc?

When I try t run "apachectl configtest" I get the following error:
--
Cannot load /usr/local/apache/libexec/libphp3.so into server: ld.so.1:
/usr/local/apache/bin/httpd:
fatal: relocation error: file /usr/local/apache/libexec/libphp3.so:
symbol mysql_create_db: referenced symbol not found

I would like to know how to fix this, below are some of the many
different approaches I have tried
------

I am trying to build php-3.0.18 with Apache 1.3.31
Why not Apache2? Just curious.
I am using gcc 3.3.2
My configure string looks like the following
--
./configure --with-mysql=/usr/local/mysql
--with-apxs=/usr/local/apache/bin/apxs --with-xml --enable-versioning
--prefix=/usr/local/php3
------

I have tried modifying my LD_LIBRARY_PATH to include
/usr/local/mysql/lib and alternatively /usr/local/mysql/lib/mysql

I have tried configuring my run time linking environment with crle as
follows:
--
Default Library Path (ELF):
/usr/lib:/usr/local/lib:/usr/local/ssl/lib:/usr/local/mysql/lib
and alternatively
/usr/lib:/usr/local/lib:/usr/local/ssl/lib:/usr/local/mysql/lib/mysql
------

I also tried adding the following statements to the Makefile in the
APXS_LDFLAGS and LIBS definitions: "-lmysqlclient" as follows


The order you do this stuff is important:

build a base of apache and install it
build mysql and install it
build php with your config settings and install
rebuild apache telling it where mysql and php are.

Depending on if it's Solaris for Intel or Sparc, you can find some
pre-compiled stuff at www.sunfreeware.com
--
gburnore@databasix dot com
---------------------------------------------------------------------------
How you look depends on where you go.
---------------------------------------------------------------------------
Gary L. Burnore | ÝÛ³ºÝ³Þ³ºÝ³³Ýۺݳ޳ºÝ³Ý³Þ³ºÝ³ÝÝÛ³
| ÝÛ³ºÝ³Þ³ºÝ³³Ýۺݳ޳ºÝ³Ý³Þ³ºÝ³ÝÝÛ³
DataBasix | ÝÛ³ºÝ³Þ³ºÝ³³Ýۺݳ޳ºÝ³Ý³Þ³ºÝ³ÝÝÛ³
| ÝÛ³ 3 4 1 4 2 ݳ޳ 6 9 0 6 9 ÝÛ³
Black Helicopter Repair Svcs Division | Official Proof of Purchase
================================================== =========================
Want one? GET one! http://www.databasix.com
================================================== =========================
Jul 17 '05 #2
On Fri, 25 Jun 2004 12:27:59 -0400, Gary L. Burnore
<gb******@databasix.com> wrote:
On Fri, 25 Jun 2004 11:28:21 -0400, pa****@acadia.net wrote:
Greetings, I need help configuring/building PHP3 with MySQL as a DSO
on a Solaris 8 box - this module is needed to host some existing
sites I will be migrating
Note. I built PHP4 from source and it loads without an error.

Solaris 8 for Intel or Sparc?

When I try t run "apachectl configtest" I get the following error:
--
Cannot load /usr/local/apache/libexec/libphp3.so into server: ld.so.1:
/usr/local/apache/bin/httpd:
fatal: relocation error: file /usr/local/apache/libexec/libphp3.so:
symbol mysql_create_db: referenced symbol not found

I would like to know how to fix this, below are some of the many
different approaches I have tried
------

I am trying to build php-3.0.18 with Apache 1.3.31


Why not Apache2? Just curious.
I am using gcc 3.3.2
My configure string looks like the following
--
./configure --with-mysql=/usr/local/mysql
--with-apxs=/usr/local/apache/bin/apxs --with-xml --enable-versioning
--prefix=/usr/local/php3
------

I have tried modifying my LD_LIBRARY_PATH to include
/usr/local/mysql/lib and alternatively /usr/local/mysql/lib/mysql

I have tried configuring my run time linking environment with crle as
follows:
--
Default Library Path (ELF):
/usr/lib:/usr/local/lib:/usr/local/ssl/lib:/usr/local/mysql/lib
and alternatively
/usr/lib:/usr/local/lib:/usr/local/ssl/lib:/usr/local/mysql/lib/mysql
------

I also tried adding the following statements to the Makefile in the
APXS_LDFLAGS and LIBS definitions: "-lmysqlclient" as follows


The order you do this stuff is important:

build a base of apache and install it
build mysql and install it
build php with your config settings and install
rebuild apache telling it where mysql and php are.

Depending on if it's Solaris for Intel or Sparc, you can find some
pre-compiled stuff at www.sunfreeware.com

I built on SPARC, and used Apache 1.3.31 rather than 2 as I am using
OpenSSL and cURL and a few other tricks, and I will have to set up an
instance of Apache to use FrontPage as well for some of my userbase (I
would like to avoid that but it isn't possible) and I am familiar with
this version of Apache as I have been working with it for 10 years
I am building PHP to load as dynamic modules so I can match what my
subscribers need by editing httpd.conf, and have several instances of
apache running on the same box. This is also a great idea for if one
server dies not all the customers are equally affected.
I built Apache, then installed Openssl And Openssh, and cURL, then
MySQL. I built and installed PHP4 without any issues at all. I cannot
seem to get PHP3 to link in everything on the build
Some other people have had this problem, see
http://groups.google.com/groups?hl=e...%3Dng%26sa%3DN
and the postings at the bottom of this page
http://www.php.net/manual/en/install.solaris.php
Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2772
by: David | last post by:
Hi, I am running Debian 3.0r1 with Apache 1.3.27, MySQL 3.23.49 and PHP 4.3.3RC3. I installed Apache and MySQL when I originally installed Debian and these work fine. I recently wanted to run...
1
5960
by: Ravi & Paami | last post by:
After I tried upgrading my php version from 3 to 4, all my code which passes parameters between web pages have stopped working. Not sure what the problem is. Have tried defining the parameters in...
4
1827
by: Hal Halloway | last post by:
can mysql work in Windows but not Solaris? Is there any reason you can see why the fulltext php/mysql code below works OK on my win2k php4.3.6. mysql 4.1.3 pc but does *not* work when put on a...
1
4089
by: Ed | last post by:
I am trying to use a Perl script which requires a Database module other than "dbm" to be the default Mod. So, what the script is checking is import anydbm if (anydbm._defaultmod.__name__ ==...
0
1932
by: muergano terrible | last post by:
Hello, I have been trying to compile MySQL 4.0.15a on a Sparc Solaris 9 machine without any success. I do not know if the reason of my failure is the fact that I want to include SSL support on...
4
1786
by: Andy Baxter | last post by:
hello, I'm using the php4-mysql module with php4 under debian linux (sarge). I have a script, schedule.php, which runs fine when I invoke it from the command line, but fails with the error: ...
2
1660
by: gavino | last post by:
REHDAT LINUX 4S PHP 4.3.9 LEGACY APP I MOVED NOW EATS MEMORY CAN ANYONE TAE A LOOK ? I FIXED ONE PARTIALLY BY CHANGING TO here are my apache settings: 1 page laoding for a few seconds eat like...
1
2834
by: edfialk | last post by:
Hi all, I'm desperately trying to get a simple mysql connection working in php 4.3.9 and I think I have a doozy for you guys. First of all, I didn't set up ANY of this system, I'm just working...
3
1595
by: Gordon | last post by:
Has anybody had any success compiling a PHP build for Leopard, specifically for Leopard running on a 64 bit Intel architecture? I have been using the Entropy builds up to now but there has been a...
0
7115
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7154
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7190
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6858
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7360
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
4578
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3086
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1392
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
633
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.