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.
|
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.
|
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.
|
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. |
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. |
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! :)
|
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?
|
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.
http://us2.php.net/manual/en/ref.mail.php ... might help. :) |
All times are GMT -5. The time now is 10:42 AM. |