How to get an apache that recognizes php, how to init mysql.
I want to have apache + php + mysql.
My apache does not recognize php and mysql is only partially installed. Php works but not thru apache. The apache conf file has no reference to it. I'm on fedora 2.6.31.5-127.fc12.i686. In case it matters, I insalled some security updates that created a defective later version - 2.6.32.5 which loops and displays garbage. At startup I interrupt grub and tell it to run the old one. I would remove the defective one but don't know how. I'm an experienced systems programmer with almost no unix time. (pdp8-os8, pdp11-rsx, tandem-tal, vax-vms,os360, etc) I ran yum install mysql-develop -- with no understanding of what it did. If in super user mode I type 'mysql - v' it responds ERROR 2002 (HY000) Can't connect to local MySql server through socket /var/lib/mysql/mysql.sock(2). If I could load a pre asembled apache that would be ideal. My primary question - what is the easiest (i.e. least needing of unix expertise) way to get the apache I want. If necessary I will wade thru the documentation apparently needed to assemble it, but am in hope that there is a less time consuming way. ( Friend with Windows merely loaded 'wamp' and was immeditely up and running.) Maybe someone can suggest the way to get there with minimum unix expertise. Secondary issue - how to get mysql functioning - I suspect that a little research would solve this one, but if a friendly expert has some advice I would be happy to take it. Thanks in advance. Dick ### |
Do you have mod_php installed? If you do it should be in /etc/apache2/mods-available/.
|
how did you install apache/mysql/php?
on fedora you (should) just need: yum install httpd mysql mysql-server php php installation should take care of the apache config so that apache recognizes .php files. are you trying to get the mysql version with mysql -v? if so, it's mysql -V or mysql --version mysql should've been started upon installation, but you can double check by running sudo /etc/init.d/mysql status or sudo service mysql status |
Quote:
in fedora (red hat, centos, etc.) it should be in /usr/lib/httpd/modules/ and is called libphp5.so instead of mod_php.so (at least on my centos box here right now) substitute lib/ for lib64/ on an x86_64 box. php installation should add the php.conf file to /etc/httpd/conf.d containing Code:
<IfModule prefork.c> |
when I look in /etc/httpd/modules i do not find mod_php
when I type sudo service mysql status it says mysql: unrecognized service when i type sudo /etc/init.d/mysql status it says sudo /etc/init.d/mysql: command not found |
service name is "mysqld" (note the "d").
search for "php" instead in httpd.conf |
ah right, it's mysqld, sorry about that.
did you install mysql-server through yum install mysql-server ? |
Fantastic - I'm almost there.
I typed yum install httpd mysql mysql-server php -- and when I run a test php page on local host - it works - apache sees php BUT it does not show mysql as one of the services when I run the same test page on godaddy where I have a page it comes back with a section that describes the mysql service GO DADDY shows the following - there is no such info on localhost Code:
|
the box @ godaddy also running fedora?
might still have to run yum install php-mysql thought it'd be a dependency, but maybe it wasn't. try above and see what appears |
Fantastic - i typed yum install php-mysql and
it installed php-pdo and php-mysql and now I also have mysql on my display regarding godaddy, they are on linux - following from godaddy Quote:
|
All times are GMT -5. The time now is 03:40 PM. |