-   Linux - Software (
-   -   Apache/PHP Help on Slackware (

wenberg 01-03-2004 08:25 PM

Apache/PHP Help on Slackware
Hi, I've recently installed Slackware and I'm still a complete newbie. I've recently got it to work as a router, but now my problem is ... how do I get Apache up and running? Apache and PHP are installed, but I want to know how to start it at boot and manually. I do lots of PHP for web development and I was hoping to have a Slack box running at home to test my pages on. After I can get Apache/PHP running, then I'll tackle MySQL.

TheDarkLord 01-03-2004 08:32 PM

You'll need to find where Apache is installed. It can be in a few different places. Nevertheless, once you locate Apache_dir, look for a bin directory. Inside that you should find "apachectl." You will also see "httpd" but it is better to use apachectl. In the bin directory you should run ./apachectl -k start. This will at least get Apache (the http daemon up and running). You can set up a script that will start this in /etc/rc.d, /etc/rc.d/init.d or at the very least (though, not always recommended) you can put a line in /etc/rc.local that calls for apachectl -k start.

TheDarkLord 01-03-2004 08:34 PM

Oh sorry, I forgot about the PHP. Look inside your PHP directory (if you haven't installed it yet) for INSTALL. It will show you a few lines that need to be put into your Apache configuration file (usually httpd.conf) to get it going with PHP support.

wenberg 01-03-2004 08:54 PM

Any ideas where the apache bin directory is?

whereis apache ... gives me ...

apache: /etc/apache /usr/include/apache

... doesn't seem to contain a /bin directory.

TheDarkLord 01-03-2004 08:58 PM

First of all, make sure it is not already running:
you can do this:
# ps -e | grep httpd

If you get nothing then Apache is not running. Look in /usr/local/apache. That is the most common place for it. You can also cheat and look for it with:
# whereis apachectl
or apache2 or apache

This command should yield a location for you quickly. Did you install this from a disk or did you build it from source? Hopefully, if you built it from source, you should be able to easily find where it was installed to.

wenberg 01-03-2004 09:40 PM

Found it at /usr/sbin. I installed apache/php by way of the Slackware install program. Thank you very much. Everything works fine. Now on to bigger and better things! :)

TheDarkLord 01-03-2004 09:44 PM

So, are you pretty decent with PHP and such? I am just getting started with it. So far the only thing I've written is a sendmail script for name and email on a website. Is there anything that stands out that helped you out with it?

wenberg 01-03-2004 10:04 PM

PHP comes built in with a mail() function. You shouldn't have to write a function to use sendmail unless you specifically want to use a named server instead of the local mail() function.

... might help. :)

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