Simpler Navigation coming for Servers and Operating Systems
Coming soon: a much simpler Servers and Operating Systems section of the Community. We will combine many of the older boards, and you won't have to click through so many levels to get at the information you need. If you are looking for an older board and do not find it, check the consolidated boards, as the posts are still there.
cancel
Showing results for 
Search instead for 
Did you mean: 

Hp-ux 11, php 4 & MySql

SOLVED
Go to solution
Antti Yli-Karhu
Occasional Advisor

Hp-ux 11, php 4 & MySql

Hi !

I am having problems getting php(4.0.5) and
mysql(3.23.38) to work on an apache(1.3.9) webserver.
Both php and mysql works fine
separately, but when I try to load mysql in httpd.conf, php complains about some Unresolved symbols, refering to php's mysql functions. Almost as if php didn't recognize
the presence of mysql..(?)

LoadModule mysql_module libexec/libmysqlclient.so

Php is running without complications for
the moment.

Has anybody got this combination up and running ?

Any ideas ?



ayk
11 REPLIES
Rainer von Bongartz
Honored Contributor

Re: Hp-ux 11, php 4 & MySql

You have to configure php to use mysql.

if you have the php sources installed, first configure with

./configure --with-mysql=/opt/mysql --with-apache=/opt/apache_1.3.19 --with-
config-file-path=/opt/apache/conf

and than create binaries with make and make install

This should work just fine, good luck

rainer
He's a real UNIX Man, sitting in his UNIX LAN making all his UNIX plans for nobody ...
Antti Yli-Karhu
Occasional Advisor

Re: Hp-ux 11, php 4 & MySql

Thanks for the quick response !

I have configured php with :

./configure --with-mysql=/usr/local/mysql --with-apxs --with-config-file-path=/opt/apache_1.3.9/conf/ --enable-track-vars --enable-trans-sid

Still wondering...

ayk
Rainer von Bongartz
Honored Contributor

Re: Hp-ux 11, php 4 & MySql

Hmm..

What are you using
LoadModule mysql_module libexec/libmysqlclient.so
for ????

Compiling mysql support into libphp4.so should be sufficient.
I only use
LoadModule php4_module libexec/libphp4.so
and have no problems
Check if you really compiled mysql support into libphp4.so.
cd libexec
nm libphp4.so | grep mysql
you should get a list of all mysql functions included in your php4 library
He's a real UNIX Man, sitting in his UNIX LAN making all his UNIX plans for nobody ...
Antti Yli-Karhu
Occasional Advisor

Re: Hp-ux 11, php 4 & MySql

Hi again !

You are right of course Rainer.
I don't have to use LoadModule mysql_..
if I compile it into php.

I recompiled php with mysql.
In httpd.conf I used LoadModule php4_..

When trying to run a configtest on the
httpd.conf, the following was printed (a small part of it) :

# ./apachectl configtest
/usr/lib/dld.sl: Unresolved symbol: mysql_list_dbs (code) from /opt/apache_1.3.9/libexec/libphp4.so
/usr/lib/dld.sl: Unresolved symbol: mysql_list_fields (code) from /opt/apache_1.3.9/libexec/libphp4.so
/usr/lib/dld.sl: Unresolved symbol: mysql_get_host_info (code) from /opt/apache_1.3.9/libexec/libphp4.so
...

A check with nm libphp4.so | grep mysql
produced this :

mysql_list_dbs | |undef |code |
mysql_list_dbs | 694300|uext |stub |
... and many other functions

Well, what do you think about this mess ?!?

Note: The compilation of php did not produce
a libphp4.so file, it did, however, create a
libphp4.sl file.
I've read somewhere that this file could be
renamed to libphp4.so and used - and so I did.
Hmm..

ayk
Rainer von Bongartz
Honored Contributor
Solution

Re: Hp-ux 11, php 4 & MySql

Antti,

really looks like a bit of mess...
what worries me is that your nm output shows i.e
mysql_list_dbs as undef (ined)
so that dld.sl must have problems to load this module

My nm shows:
mysql_list_dbs | 712852|uext |stub |
mysql_list_dbs | 743032|extern|entry |
mysql_list_dbs | 743056|extern|code |$CODE$

so I think that mysql support is not correctly included in your libphp4.so

You should re-make yout php binaries and check why no libphp4.so is created. (make clean ,configure,make,make install)

Alternativly you could download binaries for apache from

http://www.software.hp.com/cgi-bin/swdepot_parser.cgi/cgi/displayProducts.pl?group_name=HP%20Apache-based%20Web%20Server&group_image=cat_featured.gif&group_type=family

this version has PHP and MySql support compiled in and is to be installed with swinstall.

Let me know your successes,
Rainer
He's a real UNIX Man, sitting in his UNIX LAN making all his UNIX plans for nobody ...
Antti Yli-Karhu
Occasional Advisor

Re: Hp-ux 11, php 4 & MySql

Alright..
I did what you suggested (make clean, configure, make, make install).

The attachment contains screen dumps of this.
Please check it out.

I am considering resorting to the Apache binary that you pointed out.

Is it possible to use the current configuration with this (i.e httpd.conf) ?

How does it affect the system in general ?

Since this is a server that is hosting other companies domains, I want to be sure of the
consequenses of loading a new binary.

Can I make a "smooth" switch ?

Thanks again for your help !

ayk
Rainer von Bongartz
Honored Contributor

Re: Hp-ux 11, php 4 & MySql

well...., i must confess I dont't really know where to go now
Obviously libs/libphp4.s sn not created as a shared library but should be.

If you decide to install the compiled binaries think that you are installing 1.3.19 whereas you currently have 1.3.9 I think.

hp Apache-based web server for hp-ux 11.0/11i
v.1.3.19.00

I came from something like 1.3.1 to 1.3.19 and as far as I can remember had no problems with httpd.conf.
(but please don't take this as a guarantee)
What I can say is that hp Apache-based web server for hp-ux 11.0/11i has no drawbacks and no further influence on your system.

Good luck
Rainer
He's a real UNIX Man, sitting in his UNIX LAN making all his UNIX plans for nobody ...
Antti Yli-Karhu
Occasional Advisor

Re: Hp-ux 11, php 4 & MySql

Rainer,

I downloaded the binaries for the HP based
Apache server.
While I was browsing the product specification file, I noticed that nothing was said about MySQL though PHP was mentioned.
Did you use this version ?
Are you sure it contains MySQL ?

B9415AA_PA_1.3.19.depot

Regards,
Antti
ayk
Rainer von Bongartz
Honored Contributor

Re: Hp-ux 11, php 4 & MySql

Antti,

yeah,this binary has MySql support compiled into its php4 library.Look at the installed opt/apache/libexec
/libphp4.so with nm and you will see.

I have this apache running on a K360 HP-UX 11.0 with MySql and it works perfect.



He's a real UNIX Man, sitting in his UNIX LAN making all his UNIX plans for nobody ...
Antti Yli-Karhu
Occasional Advisor

Re: Hp-ux 11, php 4 & MySql

OK.

Now I've got it up and running !

I had to install the HP binary with
MySQL and PHP compiled in, then it
started working properly.

I did not have any problems with the
httpd.conf nor any other part of the
system after this.

Thanx, Rainer for all your help !

:-)
ayk
Rainer von Bongartz
Honored Contributor

Re: Hp-ux 11, php 4 & MySql

Hi Antti,

good to hear you got it finally running.
According to my experience you won't have any problems
with this config.

Regards
Rainer
He's a real UNIX Man, sitting in his UNIX LAN making all his UNIX plans for nobody ...