LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 07-12-2006, 08:58 PM   #1
janap-146
Member
 
Registered: Mar 2005
Location: UK
Distribution: Ubuntu, Slackware
Posts: 49

Rep: Reputation: 15
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
 
Old 07-12-2006, 09:26 PM   #2
davidsrsb
Member
 
Registered: Oct 2003
Location: Kuala Lumpur, Malaysia
Distribution: Slackware 13.37 current
Posts: 770

Rep: Reputation: 33
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.
 
Old 07-12-2006, 09:51 PM   #3
janap-146
Member
 
Registered: Mar 2005
Location: UK
Distribution: Ubuntu, Slackware
Posts: 49

Original Poster
Rep: Reputation: 15
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
 
Old 07-12-2006, 10:06 PM   #4
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,123

Rep: Reputation: 151Reputation: 151
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...
 
Old 07-12-2006, 10:22 PM   #5
janap-146
Member
 
Registered: Mar 2005
Location: UK
Distribution: Ubuntu, Slackware
Posts: 49

Original Poster
Rep: Reputation: 15
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
 
Old 07-12-2006, 10:35 PM   #6
mdarby
Member
 
Registered: Nov 2004
Location: Columbus, Ohio
Distribution: Slackware-Current / Debian
Posts: 795

Rep: Reputation: 30
You don't need to create the public_html folder, just use /var/www/htdocs as your webroot.
 
Old 07-12-2006, 10:42 PM   #7
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,123

Rep: Reputation: 151Reputation: 151
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>
 
Old 07-12-2006, 10:57 PM   #8
janap-146
Member
 
Registered: Mar 2005
Location: UK
Distribution: Ubuntu, Slackware
Posts: 49

Original Poster
Rep: Reputation: 15
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP header("Location: xxx.php") not working? baddah Programming 7 05-10-2006 09:00 AM
slackware, apache and PHP from .tgz - problems with PHP szymon Slackware 2 09-06-2004 04:57 PM
PHP & Apache on Slackware 8.1 not working chrisx Slackware 3 02-02-2004 02:49 AM
wine and winesetuptk working well with slackware 9.0 and slackware 9.1 oobe Linux - Software 0 10-19-2003 12:29 PM


All times are GMT -5. The time now is 07:47 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration