Unix Technical Forum

apache-php-mysql HELP!!

This is a discussion on apache-php-mysql HELP!! within the Slackware Linux Support forums, part of the Unix Operating Systems category; --> Help! I have just switched to slackware 9.1 for the first time, and impressed i am too with the ...


Go Back   Unix Technical Forum > Unix Operating Systems > Slackware Linux Support

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-18-2008, 08:40 PM
david mcdade
 
Posts: n/a
Default apache-php-mysql HELP!!

Help!

I have just switched to slackware 9.1 for the first time, and impressed i am
too with the speed of it.
However i have been used to using distros that setup apache, mod_php and
mysql pretty much automatically - the way i want.

When i installed slackware i pretty much installed everything, so apache,
php and mysql is in there, i just need to know how to get them working in
harmony...

1. How do i enable mod_php in apache? does mod_php exist?
2. How do i get mysql to work? i currently get complaints about 'cannot
connect to local mysql server through socket /../..mysql.sock'.

These might sound like dumb questions, but as i said i am used to using
'easy' distros. I am on a tight time sched, so dont have time to wade
through manuals.

any help would be gratefully appreciated

cheers
David


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-18-2008, 08:40 PM
zeitgeist
 
Posts: n/a
Default Re: apache-php-mysql HELP!!

david mcdade wrote in alt.os.linux.slackware:

> Help!
>
> I have just switched to slackware 9.1 for the first time, and impressed i
> am too with the speed of it.
> However i have been used to using distros that setup apache, mod_php and
> mysql pretty much automatically - the way i want.
>
> When i installed slackware i pretty much installed everything, so apache,
> php and mysql is in there, i just need to know how to get them working in
> harmony...
>
> 1. How do i enable mod_php in apache? does mod_php exist?
> 2. How do i get mysql to work? i currently get complaints about 'cannot
> connect to local mysql server through socket /../..mysql.sock'.
>
> These might sound like dumb questions, but as i said i am used to using
> 'easy' distros. I am on a tight time sched, so dont have time to wade
> through manuals.
>
> any help would be gratefully appreciated
>
> cheers
> David


To the mysql part: this sounds like the mysql server is not running. Check
if it is using "ps -A | grep mysqld*". If it prints out something it's
running, if not it's not. If it's not running look for it (I have it in
/usr/local/libexec/mysqld, but I think I have recompiled it by myself). I
have a little rc script for mysqld to start which looks like this:

#!/bin/sh
#
# /etc/rc.d/rc.mysql
#

mysql_start() {
echo "Starting mysqld..."
/usr/local/libexec/mysqld --user=root &
}

mysql_stop() {
echo "Stopping service mysqld..."
killall mysqld
}

mysql_restart() {
mysql_stop
mysql_start
}

case "$1" in
'start')
mysql_start
;;
'stop')
mysql_stop
;;
'restart')
mysql_restart
;;
*)
esac

This makes it very easy to start it, you have to put it in /etc/rc.d and
you can do things like "./rc.mysql start"

PHP and the Apache should be working in harmony, mysql should work in
harmony with PHP too. You just need to start the httpd server "./rc.httpd
start", again in /etc/rc.d - they shold work find (don't know for 9.1
'cause I "only" have 9.0).

I hope this helps,
zeitgeist

--
A baby is God's opinion that the world should go on.
-- Carl Sandburg

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-18-2008, 08:41 PM
Vincent Cox
 
Posts: n/a
Default Re: apache-php-mysql HELP!!

vincent wrote
> Help!
>
> I have just switched to slackware 9.1 for the first time, and impressed i am
> too with the speed of it.
> However i have been used to using distros that setup apache, mod_php and
> mysql pretty much automatically - the way i want.
>
> When i installed slackware i pretty much installed everything, so apache,
> php and mysql is in there, i just need to know how to get them working in
> harmony...
>
> 1. How do i enable mod_php in apache? does mod_php exist?


Uncomment the line near the bottom of /etc/apache/httpd.conf.
to enable php.
> 2. How do i get mysql to work? i currently get complaints about 'cannot
> connect to local mysql server through socket /../..mysql.sock'.


Have you set up mysql ? if not then just starting it wont do the trick.
you got to set up the database and users etc.

read /etc/rc.d/rc.mysql to get you started.
and the /usr/doc/mysql documentation.
>
> These might sound like dumb questions, but as i said i am used to using
> 'easy' distros. I am on a tight time sched, so dont have time to wade
> through manuals.
>
> any help would be gratefully appreciated
>
> cheers
> David
>
>


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 08:01 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com