LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 02-22-2008, 07:25 PM   #1
Anauj0101
LQ Newbie
 
Registered: Mar 2002
Posts: 26

Rep: Reputation: 15
Centos 5, Apache, php, mysql


What yum packages do i need to install to get this to work. I have run this before on windows but im moving over to Linux (Centos 5). I have everything running and working......kinda. I can create databases from command line, and can run php scripts from my web pages. But when i use a mysql_connect statement i get nothing. So php cant talk to mysql and i think i may be missing some packages.
 
Old 02-22-2008, 07:46 PM   #2
frndrfoe
Member
 
Registered: Jan 2008
Distribution: RHEL, CentOS, Ubuntu
Posts: 379

Rep: Reputation: 38
try doing something like
Code:
yum list | grep php
my guess is that you need php-mysql. You will see RPMs for a bunch of pear modules too. Depending on your scripts you may need some of them as well.
 
Old 02-22-2008, 07:49 PM   #3
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
For PHP to work with mysql, you need to install php-mysql using yum.
 
Old 02-22-2008, 11:51 PM   #4
Anauj0101
LQ Newbie
 
Registered: Mar 2002
Posts: 26

Original Poster
Rep: Reputation: 15
I have installed php-mysql with yum allready. Problem still exists
 
Old 02-23-2008, 05:39 PM   #5
Anauj0101
LQ Newbie
 
Registered: Mar 2002
Posts: 26

Original Poster
Rep: Reputation: 15
Thanks for all the help, i fixed it by accident. Apparently i didnt initialize something because a restart fixed it.......I feel somewhat stupid now.
 
Old 02-26-2008, 10:39 PM   #6
frndrfoe
Member
 
Registered: Jan 2008
Distribution: RHEL, CentOS, Ubuntu
Posts: 379

Rep: Reputation: 38
if you installed php-mysql and didn't restart httpd that would explain it. Any changes to php require a httpd kick
 
  


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/shell script to install mysql,apache and php automatically stranger_6_7 Linux - General 2 08-11-2009 02:07 AM
Can't get PHP 5 to work on CentOS 4.2, Apache 2.0.52 tibberous Linux - Server 3 10-27-2007 06:25 AM
Apache Mysql Php: mysql with php doesn't work breakerfall Linux - Networking 6 12-27-2003 08:59 PM
php-mysql-apache spako Linux - Newbie 1 08-16-2003 07:05 AM
php-nuke with apache php mysql c0c0deuz Linux - Software 0 03-30-2003 06:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:32 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