cancel
Showing results for 
Search instead for 
Did you mean: 

PHP and MySQL on HP-UX

Dustin Black
Advisor

PHP and MySQL on HP-UX

I am trying to utilize the PHP and MySQL instances that came pre-installed on an HP-UX server. It seems, however, that the PHP binaries were not pre-compiled with MySQL support. When I try to reference a database via PHP with a 'mysql-connect' command, the page returns:

Fatal error: Call to undefined function mysql_connect()


phpinfo() shows the following configure command:

'./configure' '--prefix=/opt/hpws/apache/php' '--enable-so' '--with-apxs2=/opt/hpws/apache/bin/apxs' '--with-apache2=/opt/hpws/apache'


I've been working through the potential of re-compiling with php 5.0.5 and adding the '--with-mysql' option my self, but it's turned into one of those instances where every time I correct a './configure' error, another one comes up. I'm now to the point where the error says it is trying to locate the mysql client libraries. I've been searching for these for HP-UX, but I can't seem to find them to download.

Maybe I'm taking entirely the wrong approach...? Can anyone help me get MySQL working with PHP on HP-UX 11i v1?
7 REPLIES
Alzhy
Honored Contributor

Re: PHP and MySQL on HP-UX

Easy...

Upgrade your HPWS (HP Web Server) to the latest version available..which will also install a later version of PHP.

You then can configure your Apache environment with webmin (http://yourserver:10000)

I am currently using Apache, MySQL and PHP and even PhpAdmin.



Hakuna Matata.
Dustin Black
Advisor

Re: PHP and MySQL on HP-UX

It appears that I am already running v2.13 of the HPWS, with Apache 2.0.54 and PHP 5.0.4. From the research I've done so far, the problem I am encountering should have to do with the PHP configuration, not the Apache configuration. Can you offer any further details on configuring Apache as you mentioned? I can't find anything in webmin that would appear to affect the interaction of PHP and MySQL.
Alzhy
Honored Contributor

Re: PHP and MySQL on HP-UX

What does your test.php return:

Mine returns:

Current PHP version: 4.3.4
Hello You are not using CGI PHP


And I am able torun PHPadmin (2.6.1-pl3) with MySQL 3.23.42 perfectly.

Hakuna Matata.
Dustin Black
Advisor

Re: PHP and MySQL on HP-UX

Current PHP version: 5.0.4
You are not using CGI PHP
Alzhy
Honored Contributor

Re: PHP and MySQL on HP-UX

My phpinfo:

'./configure' '--prefix=/opt/hpws/apache/php' '--enable-so' '--with-apxs2=/opt/hpws/apache/bin/apxs' '--with-apache2=/opt/hpws/apache'

What about your php.ini file? Does it contain references at all to MySQL? The ini is in /opt/hpws/apache/conf/php.ini


My entries:

[MySQL]
mysql.allow_persistent = On
mysql.max_persistent = -1
mysql.max_links = -1
mysql.default_port =
mysql.default_socket =
mysql.default_host =
mysql.default_user =
mysql.default_password =
mysql.connect_timeout = 60
mysql.trace_mode = Off
Hakuna Matata.
Dustin Black
Advisor

Re: PHP and MySQL on HP-UX

The MySQL entries in my php.ini file are identical to those you listed.
Alzhy
Honored Contributor

Re: PHP and MySQL on HP-UX

Then try installing PhpAdmin on your Machine if it works with MySQL as it is working on mine. There may be some configuration steps that you need to do that I simly am forgetting..
Hakuna Matata.