php with mysql extension not working via CLI (unsatisfied code symbol) (140 Views)
Reply
Frequent Advisor
Richard I Curtis
Posts: 68
Registered: ‎04-20-2006
Message 1 of 4 (140 Views)

php with mysql extension not working via CLI (unsatisfied code symbol)

Hi,
I have recently installed Apache v2.23 (with Tomcat/webmin), and also the MySQL server and libraries from the Internet Express Web2 (A.12.00-004) package. All running on 11iv3.

I have enabled the mysql extension, and it works fine via apache (ie, can connect to mysql and perform queuries), but it fails via the command line. I am guessing it is related to some shared libraries but not sure where to start resolving it.

root@prdign01 [/opt/hpws/apache/php/bin]
# egrep "extension_dir|mysql.sl" /opt/hpws/apache/conf/php.ini
extension_dir = "/opt/hpws/apache/php/lib/php/extensions"
; extension_dir directive above.
extension=mysql.sl

root@prdign01 [/opt/hpws/apache/php/bin]
# ll /opt/hpws/apache/php/lib/php/extensions/mysql.sl
-r-xr-xr-x 1 bin bin 2433648 Oct 24 2008 /opt/hpws/apache/php/lib/php/extensions/mysql.sl

root@prdign01 [/opt/hpws/apache/php/bin]
# ./php -c /opt/hpws/apache/conf/php.ini -i | grep -i mysql
PHP Warning: PHP Startup: Unable to load dynamic library '/opt/hpws/apache/php/lib/php/extensions/mysql.sl' - Unsatisfied code symbol 'SSL_connect' in load module '/opt/hpws/apache/php/lib/php/extensions/mysql.sl'. in Unknown on line 0

This works perfectly through a script served via apache, but not from the CLI.

TIA

Richard
Please use plain text.
Respected Contributor
Shinji Teragaito_1
Posts: 212
Registered: ‎12-20-2007
Message 2 of 4 (140 Views)

Re: php with mysql extension not working via CLI (unsatisfied code symbol)

Hi,

I can see just a little bit confusion here.

> I have recently installed Apache v2.23

So you should use /opt/hpws22/apache/php/bin/php, not
/opt/hpws/apache/php/bin/php. The latter is php 5.2.6 included in
HP-UX Apache-based Web Server v.2.0.5?.

Can you show the output from swlist ?

# swlist | grep Apache

One more request. Is the SSL_connect problem reproduciable for
/opt/hpws22/apache/php/bin/php using the same php code ?
Please use plain text.
Respected Contributor
Shinji Teragaito_1
Posts: 212
Registered: ‎12-20-2007
Message 3 of 4 (140 Views)

Re: php with mysql extension not working via CLI (unsatisfied code symbol)

Hello again,

Sorry for giving you some confusions. I should carefully look at
your message. Please forget about the WSS v.3.0.?.

> This works perfectly through a script served via apache

I guess you enable mod_ssl.so in your httpd.conf.

> but not from the CLI.

I can not find OpenSSL linkage in /opt/hpws/apache/php/bin/php-config.
So I guess PHP must be rebuild with --with-openssl=/opt/openssl.
Please use plain text.
Frequent Advisor
Richard I Curtis
Posts: 68
Registered: ‎04-20-2006
Message 4 of 4 (140 Views)

Re: php with mysql extension not working via CLI (unsatisfied code symbol)

Shinji: I only have an hpws directory - there is no other /opt/hpws* directory structure.

I have managed to resolve this issue by copying a copy of mysql.sl from another similar server. It looks like I had an incompatible version of the mysql.sl binary.
A "what /opt/hpws/apache/php/lib/php/extensions/mysql.sl" on the broken one gives:
$MySQL A.11.00-5.0.67.001$
$MySQL A.11.00-5.0.67.001$

Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation