LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices


Reply
  Search this Thread
Old 04-02-2005, 06:38 PM   #1
boardtc
Member
 
Registered: Feb 2004
Location: London, England
Distribution: MDK 9.2
Posts: 53

Rep: Reputation: 15
php <-> MySql support


I am trying to install http://www.dotproject.net which uses php and mySql. I have 9.2 lamp installed and running. It seems I need php to have mysql support installed... or maybe it's the other way around.

Sorry for the vagueness i'm a newbie.

Thanks for any advice, cheers, tom.
 
Old 04-02-2005, 10:32 PM   #2
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
I think you need a package called php_mysql (or ssomething similar) or mod_php depending on the version of apache you are using. You can install them using urpmi/rpmdrake if you don't have them already installed.
 
Old 04-03-2005, 08:39 AM   #3
boardtc
Member
 
Registered: Feb 2004
Location: London, England
Distribution: MDK 9.2
Posts: 53

Original Poster
Rep: Reputation: 15
urpmi rpmdrake says :
Everything already installed

i did urpmi mod_php, it gave :
To satisfy dependencies, the following packages are going to be installed (0 MB):
libmm1-1.3.0-3mdk.i586
mod_php-4.3.3-2mdk.i586
installing /var/cache/urpmi/rpms/mod_php-4.3.3-2mdk.i586.rpm /var/cache/urpmi/rpms/libmm1-1.3.0-3mdk.i586.rpm
Preparing...
1:libmm1
Recreating httpd-perl.conf from compat file
Recreating httpd.conf from compat file
2:mod_php
Shutting down httpd2: [ OK ]
Checking configuration sanity for Apache 2.0: [ OK ]
Starting httpd2: [ OK ]

But unfortunately, php still can't find the MySql database connector.

Thanks for the help. Still trying to figure this out.... tom.
 
Old 04-04-2005, 01:52 AM   #4
bunnadik
Member
 
Registered: Jan 2005
Location: Övik, Sweden
Distribution: MDK 10.1
Posts: 450

Rep: Reputation: 30
Make sure you have MySQL installed: 'rpm -q MySQL' . If you don't do a 'urpmi MySQL'
Next do a 'urpmi php-mysql' .
Also make sure MySQL is started: 'service mysql start'

- Peder
 
Old 04-04-2005, 06:24 AM   #5
caladbolg
Member
 
Registered: Jul 2004
Distribution: Mandrake 10.x, Fedora Core 3, Archlinux 0.7, Ubuntu 5.04
Posts: 303

Rep: Reputation: 31
To get them all to work nicely, you need:

apache
php
php_mysql (or mod_mysql, I forget)

URPMI those and you're good to go
 
Old 04-05-2005, 02:23 AM   #6
boardtc
Member
 
Registered: Feb 2004
Location: London, England
Distribution: MDK 9.2
Posts: 53

Original Poster
Rep: Reputation: 15
/etc/init.d/mysql status gives :
mysqld (pid 1963) is running...
1962 (pid 1961) is running...

I don't know how to check of the others are running. How can I check apache and php_mod are running?

Are there are gui tools like webadmin for lamp to open up linux to the non experts?

Thanks, Tom.
 
Old 04-05-2005, 04:02 AM   #7
bunnadik
Member
 
Registered: Jan 2005
Location: Övik, Sweden
Distribution: MDK 10.1
Posts: 450

Rep: Reputation: 30
To check apache run ' service httpd status' or surf to the computer and see if it answers.

To check php, put this <?php phpinfo(); ?> in the file /var/www/html/test.php, chmod the file 755 and surf to your-computer/test.php
If that doesn't work make sure you have "AddType application/x-httpd-php .php" in /etc/httpd/conf/commonhttpd.conf
and "LoadModule php4_module" and "AddModule mod_php4.c" in etc/httpd/conf/httpd.conf

- Peder
 
Old 04-05-2005, 01:41 PM   #8
boardtc
Member
 
Registered: Feb 2004
Location: London, England
Distribution: MDK 9.2
Posts: 53

Original Poster
Rep: Reputation: 15
Thanks a lot for the help.

Apache is running.

I created the test.php and navigated to it in the browser - this shjows a page for php 4.3.3 which I assume is good.

doing a
chmod test.php 755
gave :
chmod: invalid mode string: `test.php'

I added that line to file:/etc/httpd/conf/commonhttpd.conf
and http.conf already had the line you mention.

Going to the dotProject (php) install page it still can not see a mySql connection. It says that they "use the ADODB database abstraction layer which comes with drivers for many databases."

I reinstalled php-mysql and restarted apache and it's working now!

Thanks a lot for the help, Tom.

Last edited by boardtc; 04-05-2005 at 06:53 PM.
 
Old 04-06-2005, 01:05 AM   #9
bunnadik
Member
 
Registered: Jan 2005
Location: Övik, Sweden
Distribution: MDK 10.1
Posts: 450

Rep: Reputation: 30
Glad it worked.
Just for the record: the reason you got the "chmod: invalid mode string: `test.php'" is that you
did it in the wrong order. It's 'chmod 755 test.php'

- Peder
 
  


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
my PHP installation says no MySQL support Niceman2005 Linux - Software 4 06-23-2005 07:23 PM
Problem with php and mysql support... Jake_B Linux - Software 3 10-18-2004 11:18 PM
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
How do I install php-mysql support? joseph_k Linux - Software 5 04-03-2003 05:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva

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