Re: Upgrading to PHP 5.2, MySQL no longer bundled

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



William Beaumont wrote:
> I'm trying to upgrade to PHP 5.2 on a Linux machine (RedHat). For the
> "./configure" step, I copied the configure command exactly as it
> appears in the results of "php -i". When I run it in the new
> installation folder, I get a message telling me that the program can't
> find the MySQL header files in the location specified, and warns me
> that MySQL is no longer bundled with PHP. (The location specified is
> "/usr".)
Would be nice to have that ./configure line
>
> I've looked around on the Internet, and apparently one key file is
> "mysql.h". Indeed, there is no such file under /usr/include/, though
> there are tons of other header files. I used "find" to locate the
> file, and it's nowhere on the server. (I didn't setup the server, the
> hosting company did that.) I guess the header files don't exist if
> MySQL comes bundled with the server, or something like that? I'm not
> sure. My server is running MySQL 5.0.45.
Usually, when software is distributed as binary, there is a "-dev"
package to hold headers files (among other things), then try to install
a package like mysql-dev would help (if mysql is installed with package
manager, but you would then probably want to install php with package
manager as well).
>
> Some have suggested that, rather than re-installing MySQL (ugh), you
> simply run this command: "yum install mysql-devel". When I do that,
> the program analyzes my system and tells me it needs to update two
> packages: "mysql" and "mysql-server". I don't like the sound of that.
> I don't want to change anything to do with MySQL, I just want my new
> version of PHP to work with it. What should I do?
This depends why mysql/mysql-server are older than newest package.
If it is because of a poorly managed server, ask them to upgrade or do
it yourself (I suggest you to make a SQL dump of all databases, even if
binary format should be compatible over versions, can be a good idea to
check for compromission too, depending on the case).
If it is for other reasons, tell them their reasons should be excellent
to keep an old package, and read yum manual to install the -devel
version that matches mysql{,-server} versions.

Anyway, I would advise you to choose between two options :
1. Have both php/mysql (and probably apache and maybe some others)
managed through package manager
2. Have all of these software compiled by hand from source, and ideally
kept in some path (usually /usr/local/)

[Index of Archives]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [Postgresql]     [PHP Books]     [PHP Databases]     [PHP SOAP]
  Powered by Linux