LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   PHP not working - In Slackware 10.2 (http://www.linuxquestions.org/questions/slackware-14/php-not-working-in-slackware-10-2-a-463503/)

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

PHP not working - In Slackware 10.2
 
Hi,

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:

http://www.linuxquestions.org/questi...d.php?t=455410

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/libphp5.so


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

janap-146

davidsrsb 07-12-2006 09: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 09:51 PM

Hi,

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 10: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 10: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 10:35 PM

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

gilead 07-12-2006 10: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 http://your.servername.com/~smithj/

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 http://httpd.apache.org/docs/1.3/ and the version 2.0 docs are at http://httpd.apache.org/docs/2.0/ - you can search either one for the UserDir directive (for example, http://httpd.apache.org/docs/2.0/mod...r.html#userdir). In my httpd.conf, I have:
Code:

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:
Code:

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


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

Hi,

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 12:29 AM.