1832973 Members
2342 Online
110048 Solutions
New Discussion

php with mysql

 
mkulke
New Member

php with mysql

Hello,

I am trying to get my php script which needs mysql functions to work on hp-ux (11.23 Itanium).

Therefore i installed "HP-UX Apache-based Web Server" and the mysql libraries from the "HP-UX Internet Express" bundle.

PHP seems to work in general. "http://myhost/test.php" returns a correct rendered page. When i use mysql functions in a script, the interpreter doesn't know the functions.

The readme from "HP-UX Apache-based Web Server" says that the mysql php extension needs libmysql from "HP-UX Internet Express". However it says it is not supported on 64bit IPF, only on 32bit IPF.

I'm not sure what this means. is it impossible to run it on a common Itanium machine or will the libs just run in some 32bit mode? Anyway, the mysql libs installed without errors to /opt/iexpress/mysql.

Just in case, i fetched the IA64 HP-UX binaries of mysql (which includes the libs) from mysql.com aswell.

Both binary packages include libmysqlclient.so.15, which seems to be the lib php needs.

When i run:

cd /opt/hpws/apache/php/bin
./php -z ../lib/php/extensions/mysql.sl

...i get:

Failed loading ../lib/php/extensions/mysql.sl: Unable to find library 'libmysqlclient.so.15'.

Where do i put the lib for php to find it?

Greets,

Magnus
2 REPLIES 2
Steven E. Protter
Exalted Contributor

Re: php with mysql

Shalom Magnus,

http://bugs.mysql.com/bug.php?id=16332

I think you may need to modify the SHLIB_PATH in the startup script. Check if the library is present at at new location.

This problem has happened fairly frequently with mysql/php on HP-UX.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
mkulke
New Member

Re: php with mysql

Hi,

thanks for the prompt answer! i am starting apache manually by calling

/opt/hpws/apache/bin/apachectl start

my $SHLIB_PATH is set to:

/opt/iexpress/mysql/lib/mysql/lib:/opt/iexpress/mysql/lib/mysql:/opt/iexpress/mysql/lib

(libmysqlclient.so.15 is in /opt/iexpress/mysql/lib/mysql/)

i tried:

/opt/hpws/apache/php/bin/php -z /opt/hpws/apache/php/lib/php/extensions/mysql.sl

but i still get:

Failed loading /opt/hpws/apache/php/lib/php/extensions/mysql.sl: Unable to find library 'libmysqlclient.so.15'.

i'm not sure how a mysql bug could affect my php settings, since the error occurs when trying to include the php mysql extension. the mysql server isn't running locally, i just need the client libraries.

Greets,

Magnus