LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-14-2005, 04:04 PM   #1
Ziggie
Member
 
Registered: Nov 2005
Distribution: Red Hat AS 3
Posts: 49

Rep: Reputation: 15
Convincing MySQL and PHP to talk to each other


Here's hoping someone knows more than me (it's a sure thing at this point. )

Running Linux RedHat Enterprise AS 3, with Apache web server, php, and mySQL. All three of these are working. PHP and mySQL are not talking to each other however. When I check php settings, they look ok. When I check mySQL it's running, and accessible from the commandline.

In talking it over with other php know-it-alls they think php might need to be reinstalled, with mySQL included. Here's where I need the help.

I'm still relatively new to Linux and havent figured out how to actually install anything (or when I do, how to find it afterwards). So is someone familiar with an Apache, php, mySQL setup on linux that can talk me through some things to check before I try to reinstall php/sql?

Failing that, can someone talk me through how to install software?

I know it's a tall order, so mucho thanks in advance for even taking a look at this post.

Ziggs -- who really needs to stop taking on tasks he's nowhere near qualified to handle.
 
Old 12-14-2005, 04:08 PM   #2
quarry_06
Member
 
Registered: Oct 2004
Posts: 77

Rep: Reputation: 15
create a file info.php with following contents:
PHP Code:
<?php
phpinfo
();
?>
save it in your /var/www or wherever your files are stored and access it

localhost/info.php

post the results which appear under mysql. if nothing appears, then you have installed a php without mysql(i) support. That is rather unlikely, but it can happen (if you compile from source and don't add a --with-mysql-support line or something)
 
Old 12-14-2005, 04:14 PM   #3
Ziggie
Member
 
Registered: Nov 2005
Distribution: Red Hat AS 3
Posts: 49

Original Poster
Rep: Reputation: 15
I've done that, and there is no mysql listed in the long list of everything.
I didn't actually install php on this system, just walked into it...mess and all.
So since it appears that php is installed with no sql support (even though php.ini references mysql and has all the correct settings) how do I get php to have sql support?
Running php 4.3...
 
Old 12-14-2005, 04:21 PM   #4
GL1800
Member
 
Registered: Jun 2005
Location: Lilburn, Ga
Distribution: FC5
Posts: 175

Rep: Reputation: 30
There's really no point in wrestling all that, using a lamp stack is sooo much easier. It's a "just works" solution.

http://www.apachefriends.org/en/
 
Old 12-15-2005, 07:02 AM   #5
Ziggie
Member
 
Registered: Nov 2005
Distribution: Red Hat AS 3
Posts: 49

Original Poster
Rep: Reputation: 15
So there's no way to simply find a flag, set it to on, restart apache et al, and have everything work happy together? Reinstalling Apache seems like overkill (if I understood that lamp stack approach).
 
Old 12-15-2005, 12:25 PM   #6
Ziggie
Member
 
Registered: Nov 2005
Distribution: Red Hat AS 3
Posts: 49

Original Poster
Rep: Reputation: 15
OK, I found a redhat rpm for php-mysql, went to install it and got the error:

Quote:
error: Failed dependencies:
libmysqlclient.so.10 is needed by php-mysql-4.3.2-24.ent
Suggested resolutions:
/mysql-3.23.58-16.RHEL3.1.i386.rpm
Does this mean that it's not recognizing MySQL as installed? And if that's the case, how do I show it that MySQL is installed and working?

the file that it's looking for [libmysqlclient.so.10] is located in /usr/lib
 
Old 12-16-2005, 04:41 AM   #7
GL1800
Member
 
Registered: Jun 2005
Location: Lilburn, Ga
Distribution: FC5
Posts: 175

Rep: Reputation: 30
Perhaps this has to do with the versions of things. If you solve this, how many more issues lie between today, and putting it on the air? These challenges are what led to the creation and popularity of LAMP stacks.
 
Old 12-16-2005, 07:07 AM   #8
Ziggie
Member
 
Registered: Nov 2005
Distribution: Red Hat AS 3
Posts: 49

Original Poster
Rep: Reputation: 15
I see your point.

But I did force it to install, ignoring the dependencies, and it installed. Restarted apache and mysql and everything seems to be working.

Thanks for all the advice, and I will definitely keep LAMP stacks in mind for future upgrades.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
php 438 and mysql 41 fedora 2 wont talk phoebebright Linux - Software 0 11-02-2004 03:49 PM
Domo and mysql wont talk linux_console Linux - Software 0 08-08-2004 09:50 PM
Getting PHP to talk to MySql ? Greenman Linux - General 19 10-01-2003 02:49 PM
php wont talk to postgresql Pete Dogg Linux - Software 0 09-10-2003 03:16 PM
getting php and mysql to talk! modestmouse Programming 4 04-04-2003 11:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:31 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration