Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
08-17-2004, 08:56 AM
|
#1
|
Member
Registered: Jun 2003
Location: Sevenoaks, UK
Distribution: Ubuntu
Posts: 183
Rep:
|
LAMP(Linux, Apache, MySQL, PHP) Problem
Hello,
My Slack is 9.0 I'm trying to get the typical LAMP (Linux, Apache, MySQL, PHP) configuration running. But Apache won't serve up a PHP file properly. That is, each time I browse to test.php, the browser asks if I want to download the file.
I've added the following lines to my httpd.conf file:
LoadModule php4_module libexec/libphp4.so
AddType appliation/x-httpd-php .php
AddType appliation/x-httpd-php-source .phps
So, any suggestions how to fix this ?
Thanks
|
|
|
08-17-2004, 09:20 AM
|
#2
|
Senior Member
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145
Rep:
|
I don't know which version of Apache is on LAMP but latest on Apache (at least on Slackware) moved all the libs to libexec/apache instead of libexec so try: LoadModule php4_module libexec/apache/libphp4.so
|
|
|
08-17-2004, 09:25 AM
|
#3
|
Member
Registered: Jun 2003
Location: Sevenoaks, UK
Distribution: Ubuntu
Posts: 183
Original Poster
Rep:
|
that's not the problem  the library is on the place it's written  So the problem is somewhere else...
|
|
|
08-17-2004, 09:30 AM
|
#4
|
Senior Member
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145
Rep:
|
"AddType appliation/x-httpd-php .php
AddType appliation/x-httpd-php-source .phps"
If you pasted that from your configuration then it should be application instead of appliation.
If not, do you get any error messages or something?
|
|
|
08-17-2004, 09:36 AM
|
#5
|
Member
Registered: Jun 2003
Location: Sevenoaks, UK
Distribution: Ubuntu
Posts: 183
Original Poster
Rep:
|
It's not pasted, i wrote it. Sorry my fault. The problem is that I don't get any error messages.
|
|
|
08-17-2004, 09:44 AM
|
#6
|
Senior Member
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145
Rep:
|
Mmm, very weird.
I was seeing my apache config file, and httpd.conf has a line: Include /etc/apache/mod_php.conf
Then in the file mod_php.conf i've the lines you pasted above. This shouldn't interfere, however it tells in a comment that php needs 4 packages installed to run properly: openssl-solibs (or openssl), gmp, mysql and of course apache. Check if you have them.
Btw, double check the lib at libexec instead of libexec/apache, i know you did, just in case 
Last edited by gbonvehi; 08-17-2004 at 09:50 AM.
|
|
|
08-17-2004, 01:50 PM
|
#7
|
Senior Member
Registered: Nov 2002
Location: Stockton, CA
Distribution: Slackware 11 - kernel 2.6.19.1 - Dropline Gnome 2.16.2
Posts: 1,132
Rep:
|
Here are some excerpts from my web site ( http://shilo.is-a-geek.com/slack/apache19.html ) that may help you.
Quote:
Now sometimes your web pages are gonna end with .htm or .html.
Other times, you may want to use web pages that end in .php. Trust me on
this. So next up, we're gonna find a section that looks like this:
# DirectoryIndex: Name of the file or files to use as a pre-written HTML
# directory index. Separate multiple entries with spaces.
#
<IfModule mod_dir.c>
DirectoryIndex index.html index.htm
</IfModule>
And we're gonna make it look like this:
# DirectoryIndex: Name of the file or files to use as a pre-written HTML
# directory index. Separate multiple entries with spaces.
#
<IfModule mod_dir.c>
DirectoryIndex index.html index.htm index.shtml index.shtm index.php
</IfModule>
|
Quote:
The last thing that we are going to do is allow are web server to
run php scripts. Why? I like this little program called squirrelmail. It uses
php. This is something I had to do to get it to work. Find a section that looks
like this:
# ==> mod_php configuration settings <==
#
# PACKAGES REQUIRED: openssl-solibs (A series) and/or openssl (N series),
# mysql (AP series), gmp (L series), and apache (N series)
#
#Include /etc/apache/mod_php.conf
And we're gonna make it look like this:
# ==> mod_php configuration settings <==
#
# PACKAGES REQUIRED: openssl-solibs (A series) and/or openssl (N series),
# mysql (AP series), gmp (L series), and apache (N series)
#
Include /etc/apache/mod_php.conf
That wraps up the configuration in the /etc/apache/httpd.conf file. We still
have one more step to do (At least I did before things started working).
You need to open up the file named /etc/apache/mod_php.conf. Here's
what mine used to look like:
#
# mod_php - PHP Hypertext Preprocessor module
#
# Load the PHP module:
LoadModule php4_module libexec/apache/libphp4.so
# Tell Apache to feed all *.php files through the PHP module:
AddType application/x-httpd-php .php
# This will display PHP files in colored syntax form. Use with caution.
#AddType application/x-httpd-php-source .phps
This didn't work for me. I had to change mine to look like this:
#
# mod_php - PHP Hypertext Preprocessor module
#
#LoadModule php4_module libexec/libphp4.so
LoadModule php4_module libexec/apache/libphp4.so
#AddModule mod_php4.c
# Tell Apache to feed all *.php files through the PHP module
AddType application/x-httpd-php .php
# This will display PHP files in colored syntax form. Use with caution.
#AddType application/x-httpd-php-source .phps
|
|
|
|
08-17-2004, 02:52 PM
|
#8
|
Member
Registered: Jun 2003
Location: Sevenoaks, UK
Distribution: Ubuntu
Posts: 183
Original Poster
Rep:
|
Thanks  I fixed the problem after adding AddModule...
thanks anyway
Cheers
|
|
|
All times are GMT -5. The time now is 07:53 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|