LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Mandriva (https://www.linuxquestions.org/questions/mandriva-30/)
-   -   php <-> MySql support (https://www.linuxquestions.org/questions/mandriva-30/php-mysql-support-309075/)

boardtc 04-02-2005 06:38 PM

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.

reddazz 04-02-2005 10:32 PM

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.

boardtc 04-03-2005 08:39 AM

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.

bunnadik 04-04-2005 01:52 AM

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

caladbolg 04-04-2005 06:24 AM

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 :)

boardtc 04-05-2005 02:23 AM

/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.

bunnadik 04-05-2005 04:02 AM

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

boardtc 04-05-2005 01:41 PM

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.

bunnadik 04-06-2005 01:05 AM

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


All times are GMT -5. The time now is 06:16 PM.