Simpler Navigation for Servers and Operating Systems
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
Languages and Scripting
cancel
Showing results for 
Search instead for 
Did you mean: 

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

Richard I Curtis
Frequent Advisor

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
3 REPLIES
Shinji Teragaito_1
Respected Contributor

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 ?
Shinji Teragaito_1
Respected Contributor

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.
Highlighted
Richard I Curtis
Frequent Advisor

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$