Re: [PHP] PHP + Multiple MySQL-4.0.20

2004-06-07 Thread Curt Zirzow
* Thus wrote Minuk Choi ([EMAIL PROTECTED]):
> I have a RedHat9 machine.
> 
> I needed to have multiple MySQL installations, so I removed the RPM
> installation and did a binary installation of MySQL-4.0.20.  As it stands, I
> have the following installations
> 
> /usr/local/mysql-4.0.20-webpage
> /usr/local/mysql-4.0.20-exp
> /usr/local/mysql-4.0.20-def

This seems a little odd. You should be able to use the same
binaries with different startup scripts. But if its working no need
to step backward and redo you're mysql installation.

> 
> BUT, I can't seem to make PHP access these databases.  More specifically,
> phpMyAdmin-2.5.6 says

To get more detailed information as what is happening try this:

php -d display_errors=On \
-d display_startup_errors=On \
-d error_reporting=E_ALL \
-r mysql_connect()

> 
> cannot load MySQL extension,
> please check PHP Configuration.
> Documentation
> 

solution 1 (recommended):
remove the php rpm and install from source. this can be a nightmare
since most *-dev rpm's wont be installed.


solution 2:
you're going to need to rebuild the mysql.so that it is looking at
the right mysqlclient. And change you're php.ini settings to the
appropriate port/socket

In theory you can do something like this:
 - download exact version of php's source used with redhat.
 - extract and issue the following commands:

   cd php-4.x.x/ext/mysql
   phpize
   ./configure --with-mysql=shared,/usr/local/mysql-4.x.x-webpage
   make
   su 
   make install

This will make the mysql.so and should place it in the right place,
see the /etc/php.ini:extension_dir setting for the right place.


As for you mysql port settings see:

php.ini:
mysql.default_port = ;set to mysql-webpage mysql port
mysql.default_socket =   ;set to mysql-webpage mysql socket



Curt
--
First, let me assure you that this is not one of those shady pyramid schemes
you've been hearing about.  No, sir.  Our model is the trapezoid!

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] PHP + Multiple MySQL-4.0.20

2004-06-06 Thread Minuk Choi
I have a RedHat9 machine.

I needed to have multiple MySQL installations, so I removed the RPM
installation and did a binary installation of MySQL-4.0.20.  As it stands, I
have the following installations

/usr/local/mysql-4.0.20-webpage
/usr/local/mysql-4.0.20-exp
/usr/local/mysql-4.0.20-def

These are all the same BINARY installations of MySQL-4.0.20, I just need to
have 3 distinct set of mysql databases(along with their specific custom
database/tables).  It seems to have worked, as I can get the mysql instances
up and running.

BUT, I can't seem to make PHP access these databases.  More specifically,
phpMyAdmin-2.5.6 says

cannot load MySQL extension,
please check PHP Configuration.
Documentation

I haven't a clue as to how to resolve this.  My guess is, like the MySQL
RPM, uninstall it and do a non-RPM install...

If I get the source and run configure... it seems like the --with-mysql=
field only takes 1 mysql path.  What should I do in my case, where there are
3 paths, 3 sockets, and 3 ports on which mysql resides?

Thanks in advance,

-Minuk

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php