LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   PHP and Apache -- Config question (https://www.linuxquestions.org/questions/slackware-14/php-and-apache-config-question-251310/)

j0217995 11-04-2004 08:02 PM

PHP and Apache -- Config question
 
Ok I'm kinda new to Slackware. I installled off the Slackware 9 CD set I bought a long time, just never had a chance to get it up and working. I just did an install of everything, I clean it up and remove packages as I figure out what I want to do with this box. I downloaded swaret and updated it following a post from this forum.

I have since installed Webmin and am fairly comfortable working in it. Now I'm trying to setup PhpMyAdmin and get that working. I know using GUI tools to get myself working until I can master CLI. So how do i know I have Apache compiled w/ PHP support and working correctly? Does it assume that on installation of the package or do i have to look for another package?

Pardon the stupid question

Azmeen 11-04-2004 08:38 PM

If you've gotten Apache and PHP off a mirror, they should be ready to be used in a production/test environment.

You just have to enable it.

If you insist on using Webmin or whatever config tool, I suggest you stop reading this post now and wait for someone else to show you how. But if you want to find out an easier way to to do it, by all means keep on reading.

Here's the steps (to be done as root):

a) Open /etc/apache/httpd.conf with your favourite text editor.

b) Look for this section:
Code:

<IfModule mod_dir.c>
    DirectoryIndex index.html
</IfModule>

and change it to:
Code:

<IfModule mod_dir.c>
    DirectoryIndex index.html index.php
</IfModule>

c) Find this line:
Code:

#Include /etc/apache/mod_php.conf
and uncomment it as follows (just remove the leading hash):
Code:

Include /etc/apache/mod_php.conf
d) Restart apache by running /etc/rc.d/rc.httpd restart

You're all set now :)

CroMagnon 11-04-2004 08:43 PM

The easiest way to tell if you have php set up correctly is to create a "test.php" file in your web root directory that contains just:

Code:

<?php phpinfo(); ?>
then browse to http://server/test.php
If you see a blank page, it's not set up properly. If you see a bunch of PHP information about settings and modules - it's working :)

j0217995 11-05-2004 06:26 AM

Thanks for all the help.... It helped me learn something else new. I think thats what I enjoy so much about learning Linux, it seems like there will always be something new to learn.

Azmeen 11-05-2004 10:09 AM

Quote:

Originally posted by j0217995
Thanks for all the help.... It helped me learn something else new. I think thats what I enjoy so much about learning Linux, it seems like there will always be something new to learn.
Of course! Learning is a life long journey... and rest assured, while you're in Linuxland, there's always someone who will help you along the way.

Cheers, and keep us updated on your progress.


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