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 10-18-2004, 07:47 PM   #1
Jake_B
LQ Newbie
 
Registered: Mar 2004
Distribution: RHEL
Posts: 27

Rep: Reputation: 15
Problem with php and mysql support...


I recently installed Red Hat Enterprise Advanced Server 3. As part of the install, I asked it to install MySQL and Apache 2. I have discovered that PHP does not seemed to have been installed with MySQL support:

Fatal error: Call to undefined function: mysql_connect() in /var/www/html/test.php on line 6

But when I look at <? phpinfo(); ?> is see:

I see that it has been configured with --with-mysql=shared,/usr.

Within php.conf (which gets included in the httpd.conf), is this line:

LoadModule php4_module modules/libphp4.so

Also when I run phpinfo() is see that --with-mysql=shared,/usr is there, so when php was installed it should have been compiled with MySQL support.

php.ini says this about MySQL:


[MySQL]
; Allow or prevent persistent links.
mysql.allow_persistent = On

; Maximum number of persistent links. -1 means no limit.
mysql.max_persistent = -1

; Maximum number of links (persistent + non-persistent). -1 means no limit.
mysql.max_links = -1

; Default port number for mysql_connect(). If unset, mysql_connect() will use
; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the
; compile-time value defined MYSQL_PORT (in that order). Win32 will only look
; at MYSQL_PORT.
mysql.default_port =

; Default socket name for local MySQL connects. If empty, uses the built-in
; MySQL defaults.
mysql.default_socket =

; Default host for mysql_connect() (doesn't apply in safe mode).
mysql.default_host =

; Default user for mysql_connect() (doesn't apply in safe mode).
mysql.default_user =

; Default password for mysql_connect() (doesn't apply in safe mode).
; Note that this is generally a *bad* idea to store passwords in this file.
; *Any* user with PHP access can run 'echo get_cfg_var("mysql.default_password")
; and reveal this password! And of course, any users with read access to this
; file will be able to reveal the password as well.
mysql.default_password =

; Maximum time (in secondes) for connect timeout. -1 means no limimt
mysql.connect_timeout = -1

; Trace mode. When trace_mode is active (=On), warnings for table/index scans and
; SQL-Erros will be displayed.
mysql.trace_mode = Off


Also, I see mysql.so at ./usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi/auto/DBD/mysql/mysql.so

Do I need to declare this in php.ini? Such as:

extension=mysql.so

Any HELP would me appreciated!
 
Old 10-18-2004, 09:13 PM   #2
UsualTuxpect
Member
 
Registered: Aug 2004
Location: New York
Distribution: --------- Gentoo-2004.2 [2.6.8] Redhat-9 [2.6.6]
Posts: 545

Rep: Reputation: 31
was the mysqld [daemon] running when u ran the php script???
 
Old 10-18-2004, 09:59 PM   #3
Jake_B
LQ Newbie
 
Registered: Mar 2004
Distribution: RHEL
Posts: 27

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by UsualTuxpect
was the mysqld [daemon] running when u ran the php script???
How would I check this?

I know that I have no problems accessing MySQL from the command line, but that's not what you are asking?

Since I let the RHEL3 GUI Installer do all of this (sellected the packages I wanted off the list...), maybe I should back out the RPMs (Apache, PHP, MySQL) and install them by hand? What worries me about that is I want to get all the ./configure flags right. This is your very basic web server box. Nothing fancy going on, dynamic web pages that draw content from mysql. Lot's of SELECT, very little INSERTS, non-critical data...

Last edited by Jake_B; 10-18-2004 at 10:24 PM.
 
Old 10-18-2004, 11:18 PM   #4
UsualTuxpect
Member
 
Registered: Aug 2004
Location: New York
Distribution: --------- Gentoo-2004.2 [2.6.8] Redhat-9 [2.6.6]
Posts: 545

Rep: Reputation: 31
check this link out
-->http://www.blazonry.com/scripting/install_apache.php

#top

u should see a process which says mysqld
 
  


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
Installing php with mysql support Elguapo Linux - Software 3 07-21-2005 09:58 PM
my PHP installation says no MySQL support Niceman2005 Linux - Software 4 06-23-2005 07:23 PM
php <-> MySql support boardtc Mandriva 8 04-06-2005 01:05 AM
Slackware 10, PHP doesn't support MySQL whoie99 Slackware 7 07-26-2004 04:59 AM
Installing MySQL.4.0.17 and php support for Mysql on RedHat 9.0 Neha Linux - Software 13 12-29-2003 12:06 AM

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

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