472,811 Members | 1,631 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,811 software developers and data experts.

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 2507
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
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
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
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
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
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
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
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
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
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
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: lllomh | last post by:
How does React native implement an English player?
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth

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.