-   Slackware (
-   -   PHP not working - In Slackware 10.2 (

janap-146 07-12-2006 09:58 PM

PHP not working - In Slackware 10.2

I have just installed Slackware 10.2 to be able to use it as a Test Server for some things I like to experiment with instead of messing up my live site!! I need Apache, PHP, MySQL to work.

I have Apache, MySQL working, I think...!

I have been following instructions here for setting up PHP:

I have looked through my httpd.conf file to find this line:

"LoadModule rewrite_module lib"

but it's not there! I am supposed to write this under it:

LoadModule php5_module /usr/lib/apache2/

Could anyone please give me some advice on what I should do to get PHP working?

The versions of Apache, MySQL and PHP are all the ones that came with Slackware.

If I type phpinfo.php in the browser like this:
http://localhost/phpinfo.php I just get a 404

Hope that somebody can help me

Many thanks


davidsrsb 07-12-2006 10:26 PM

It looks like you are trying to follow instructions to install php5.
Slackware comes with apache 1.3.x and php4 as php5 breaks too many server applications still.

janap-146 07-12-2006 10:51 PM


Thanks for your reply.

I will see if I can find any more info about it on here, although I'm currently following about 5 or 6 different tutorials on getting it working, but I'm not having much luck!

There is one thing that is really baffling me though, I cannot find my /www or /htdocs or /public_html folders anywhere, where should these folders be located??

Many thanks

gilead 07-12-2006 11:06 PM

Often, it's /var/www /usr/local/apache/htdocs and /home/<username>/public_html - it can be changed, but that's a starting point anyway...

janap-146 07-12-2006 11:22 PM

Thanks I have found the /var/www/htdocs folder. I don't have /usr/local/apache/htdocs or /home/<username>/public_html

Where should I find /public_html? Should I create this folder myself somewhere? If so where?

Sorry for so many questions, thanks for helping

mdarby 07-12-2006 11:35 PM

You don't need to create the public_html folder, just use /var/www/htdocs as your webroot.

gilead 07-12-2006 11:42 PM

The public_html folder, when it's used, is in a user's home directory. For example, if user smithj has personal web pages, they would be under /home/smithj/public_html and the URL would be

I'm not sure what Slackware's default web server is - I've compiled a 2.0 series version for my boxes. The version 1.3 docs are at and the version 2.0 docs are at - you can search either one for the UserDir directive (for example, In my httpd.conf, I have:

UserDir public_html
UserDir disabled root

You should also control the access to these directories. Here is the sample code in the version 2.0 httpd.conf here:

<Directory /home/*/public_html>
    AllowOverride FileInfo AuthConfig Limit Indexes
    Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
        Order allow,deny
        Allow from all
        Order deny,allow
        Deny from all

janap-146 07-12-2006 11:57 PM


Thanks all for your help, I have just got php working!

I will put my site in /var/www/htdocs and see if it works. I only want to use this as a kind of test server to try things out on, so I will only ever be running it from localhost.

Many thanks to everyone for helping

All times are GMT -5. The time now is 11:14 AM.