Help - Search - Members - Calendar
Full Version: Php With Mysql
Linuxhelp > Support > Technical Support
fobius
Hi,

I've been trying to install the latest version of PHP 4.3.3 and I'm having some problems when running the configure script. I've installed MySQL using the rpms provided at the MySQL website. I've installed the server, client and devel rpms:

MySQL-client-4.0.14-0.i386.rpm
MySQL-devel-4.0.14-0.i386.rpm
MySQL-server-4.0.14-0.i386.rpm

This is what I've been entering:

./configure --prefix=/usr/local/apache2/php --with-apxs2=/usr/local/apache2/bin/apxs --with-config-file-path=/usr/local/apache2/php --with-mysql=/usr/include/mysql

However the problem is that configure is saying that the MySQL header files cannot be found in that directory. I've done some checking around for where the files where installed and it seems that the header files are in /usr/include/mysql. I think quite a few other people might have this problem.

Any ideas?

-fobius
hughesjr
what is your linux distro .... if using RedHat, Mandrake or SUSE then you don't need to build anything ... just install the php and httpd rpms.

but my php is only 4.2.2 ... so if you want 4.3.3 then I guess you do need to do the manual install....
fobius
Hi,

I'm using Mandrake 9.1. I installed Apache by source and I'd prefer to install php by source as well. If the header files are in /usr/include/mysql, why doesn't --with-mysql=/usr/include/mysql work?
hughesjr
Everything I read tells me that should work ... what you might try is downloading the source for MySQL 4.0.14 (HERE). I would untar it and put it in /usr/src/mysql-4.0.14 and point there when running the configure script for apache2 ... obviously you must manually keep that directory (/usr/src/mysql-4.0.14) updated if you update the mysql rpms.
Joey
I see you didn't list the mysql-common rpm file. You can try installing that and seeing if it will work.
fobius
I've tried uninstalling the rpms but now i'm getting a weird error. rpm tells me that it can't uninstall:

root@localhost stuff]# rpm -e *.rpm
error: package MySQL-client-4.0.14-0.i386.rpm is not installed
error: package MySQL-devel-4.0.14-0.i386.rpm is not installed
error: package MySQL-server-4.0.14-0.i386.rpm is not installed
error: package MySQL-shared-4.0.14-0.i386.rpm is not installed

[root@localhost stuff]# rpm -Ui *.rpm
package MySQL-client-4.0.14-0 is already installed
package MySQL-devel-4.0.14-0 is already installed
package MySQL-server-4.0.14-0 is already installed
package MySQL-shared-4.0.14-0 is already installed

What's going on?
Joey
you have to run

rpm -e MySQL-client
rpm -e MySQL-devel etc etc
fobius
Hi,

I tried doing that, but I get a similar error:

root@localhost theo]# rpm -Uih MySQL-client-4.0.14-0.i386.rpm
########################################### [100%]
package MySQL-client-4.0.14-0 is already installed
[root@localhost theo]# rpm -e MySQL-client-4.0.14-0.i386.rpm
error: package MySQL-client-4.0.14-0.i386.rpm is not installed

wonder whats wrong..
Joey
its rpm -e to remove files. Check the man page for rpm.
fobius
I looked at the man pages and some other references and it seems rpm -e is the way to go. still got the same problem
hughesjr
When using rpm -e, you don't use the entire filename ... you use only the packages name ... so the command would be:

rpm -e MySQL-client-4.0.14-0 MySQL-devel-4.0.14-0 MySQL-server-4.0.14-0 MySQL-shared-4.0.14-0

When installing an rpm file, you use the full filename ... because you are working with one file; but when removing you are working with the installed package (that is, all the installed files), not the rpm file....so that's why the it's a filename for install and not the full filename for removal.
fobius
Thanks Hughes, that was very helpful. Makes sense, doesn't it?

anyone ever try installing mysql and php the way i tried? i was out of town for a few days and i'd like to try and make it work before uninstalling the rpms and installing mysql by source..

thanks
Joey
apache, mysql and php are pretty much the only things I don't install via RPM.
fobius
did you ever encounter the problem i described compiling php with the --with-mysql option activated? (basically everything i described in the earlier posts)?
Joey
Where is mysql installed? Normally it's in /usr/local/mysql when you install via tarball so your --with-mysql should point to /usr/local/mysql and not /usr/include..
fobius
Yea, I haven't tried installing mysql via tarball yet. I installed via RPM as this was the recommended way on the MySQL website. Or is it a better way to do it from source?
Joey
I've never had problems installing the source.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2017 Invision Power Services, Inc.