Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing MySql client API to latest!! Pls Help 1

Status
Not open for further replies.

Forri

Programmer
Joined
Oct 29, 2003
Messages
479
Location
MT
Hi all

I have no idea how to change my mySQL client api! i have version 3.23.49 according to phpinfo() but according to winmysqladmin its 5.0.0!

How can i update php (which i have version 4.3.6 ) to check for the newer version of MySql Client!!

Pls can give me at least a hint but a full blown explanation would be better!

Thanks
Nick
 
If your PHP installation has MySQL functionality compiled in, you'll have to recompile PHP.

If your PHP installation has MySQL functionality available through an external library extension, point the extension to the new library.



Want the best answers? Ask the best questions!

TANSTAAFL!!
 
thanks .....

but how do i:

a) recompile PHP; and what should be changed

b) or how do i point to external library and what library is it (name!)

Thanks
Ncik
 
I think you need to first figure out which it is.

Do you have an uncommented "extension" line in php.ini that points to a MySQL library?




Want the best answers? Ask the best questions!

TANSTAAFL!!
 
I'll check...o you have any idea what it looks like ...aprt from the # thing! ?


Tahnks
 
PHP uses the octothorpe (the "#" symbol) to comment out a line. You simply need to look for a line that has the word "extension" and a reference to mysql that does NOT have an octothorpe at the beginning of the line.



Want the best answers? Ask the best questions!

TANSTAAFL!!
 
No there is nothing uncommented which referes to a mysql extension!

What should i do? pls i beg to help...completly lost!

Nick
 
Ok here it goes:

OS: Red Hat Linux 9
Web Server : Apache v2
PHP: v4.2.2
MySql : v5.0.0

By the way if i run phpinfo() i get these extensions which is i have no idea where to edit and retrieve!


Client API version : 3.23.56
MYSQL_MODULE_TYPE : external
MYSQL_SOCKET : /var/lib/mysql/mysql.sock
MYSQL_INCLUDE : -I/usr/include/mysql
MYSQL_LIBS : -L/usr/lib/mysql -lmysqlclient



Thanks again
Nick
 
I've chosen the rpm during Red hat installation!
 
Okay.

If you're running RedHat 9, you're not going to be getting an more updates for the distribution. RedHat stopped support for version 9 on April 30th.

I recommend that you uninstall the RPMs for Apache and PHP and reinstall both from source. It's the only way you'll be able to keep both current.

First, take stock of how you're using PHP. Specifically, which function families are you using? Do you have all the support libraries for all those functions available? Install whatever you do not already have -- each section of the PHP manual has instructions on how to do this.




Want the best answers? Ask the best questions!

TANSTAAFL!!
 
hmmm..thats going to be tedious i have no idea on how to play around with linux ...just taught that i could have changed a couple of settings!! :<

But i don;t loose hope that easliy so i'll try! can you just give me a hint and a start off...I've downloaded the source files for php ...how would i be able to configure what i have to configure and how to compile!?

I know its a load ...but i appreciate a kick off!! hehe!

Thanks fpr your help
Nick

ps if you get to know somthing pls post!
 
First, uninstall the Apache and PHP RPMs (rpm -e packagename).

Then follow the general directions here

Installing both is following the general form of "unpack tarball; cd to directory; configure; make; make install".

It's how you handle the "configure" step that makes the difference.

If you're used to the RedHat layout of Apache configuration files, run configure with the options:

./configure --enable-mods-shared=all --enable-ssl --enable-deflate --enable-layout=RedHat --enable-proxy

this will compile into Apache most of its functionality in modules (which can be turned off if you don't need them) and turns on SSL, deflate and proxy support. The "enable-layout" option will instruct Apache to install files where you're used to their being.

What I do to make life easier is to create a bash script which runs configure with the command-line options:

#! /bin/bash
./configure --enable-mods-shared=all --enable-ssl --enable-deflate --enable-layout=RedHat --enable-proxy | tee configuration_last_run.txt

The last part uses the "tee" command (see man tee) to send the output of the configure script both to a file and to the console. That way you have something to examine should you run into problems.


Running PHP's configure script requires that you let it know what function families you wish to activate. I do a lot with my PHP installation, so my configure-invoking bash script looks like:

#! /bin/bash
./configure --with-apxs2=/usr/sbin/apxs --with-config-file-path=/etc --with-openssl --enable-bcmath --with-dom --enable-ftp --with-mysql=/usr
--with-zlib --with-mcrypt=/usr --with-curl --enable-calendar --with-freetype-dir=/usr --with-png-dir=/usr --with-jpeg-dir=/usr --with-gd --ena
ble-gd-native-ttf --with-mssql=/usr/local --enable-exif --with-ldap --with-gmp --with-imap=/usr/local/imap-2002e --with-pdflib=/usr/local/lib
/PDFlib/bind/c --enable-sockets | tee configuration_last_run.txt

I'm also running PHP 5.0RC2. The same configure parameters should work with both PHP 4.3.6 and PHP 5.0RC2.



Want the best answers? Ask the best questions!

TANSTAAFL!!
 

Your only other option besides sleipnir's would be to find a source rpm, build it on your machine, then upgrade using the resultant rpm.

It's not really any less work, it just avoids having to remove the existing rpms and leaves everything where you have learned to find it.

Sleipnir, please comment on my (as soon as I write it) post about migrating from 4.x to 5.0.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top