LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-17-2008, 09:28 AM   #1
hocheetiong
Member
 
Registered: Jul 2007
Location: Penang , Malaysia.
Distribution: red hat linux
Posts: 133

Rep: Reputation: 15
Smile How to enable mysql on php5?


Hi, during install the CentOS 5.2 i have choice install all the rpms packages, that mean already include php5 version:5.1.6 . Now i have complete configure my mysql, and apache at same system box.

i have try to write simple mysql php connector, than i using web browser to browse it mysqlconnect.php it come nothing just blank scree no error, than i check on my apache log file /var/log/httpd/error_log it show error: PHP Fatal error: Call to undefined function mysql_connect() in /var/www/html/3/mysqlconnect.php on line 2.

I create a simple php info phpinfo.php to see the details of my php:
<?php
phpinfo();
?>
i saw the item:"Configure Command" there have '--without-mysql', so that mean my php without mysql support so having error.

How to enable my mysql support to current php?

thank you.
 
Old 10-17-2008, 09:56 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,521

Rep: Reputation: 1502Reputation: 1502Reputation: 1502Reputation: 1502Reputation: 1502Reputation: 1502Reputation: 1502Reputation: 1502Reputation: 1502Reputation: 1502Reputation: 1502
You need to install the php-mysql package to add mysql support in php

Regards
 
Old 10-17-2008, 11:24 AM   #3
hocheetiong
Member
 
Registered: Jul 2007
Location: Penang , Malaysia.
Distribution: red hat linux
Posts: 133

Original Poster
Rep: Reputation: 15
Thank bathory, i have installed already the php-mysql, # rpm -qi php-mysql .
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
PHP5 binary with enable-sockets OliXNet Linux - Newbie 1 11-16-2006 02:37 AM
Enable DOM in PHP5, Redhat Enterprise 4 pxumsgdxpcvjm Programming 0 09-14-2006 05:19 AM
how to enable php5 for mysql after installation irfanhab Programming 1 02-01-2006 11:03 AM
enable php5 in apache on Slackware 10.2 esteeven Slackware 3 01-30-2006 05:41 PM
php5 - how to enable rjcrews Mandriva 5 06-01-2005 04:21 PM


All times are GMT -5. The time now is 12:38 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration