feeble

Apache+php help

5 posts in this topic

hay im having a problems getting my php to work on slackware 10.0

as far as i know php if you install it when you do the system is set and ready to go

all you have to do is uncomment a section in the apache config,

so i dont that check my modules etc.. everything seems to be fine untill....

I try to install any php based software on my server things like forums or

content managment sys

All i get is a kinda normal webpage but with all the php code in the form elements or at the top and bottom of the page

i hope someone can help with this coz its been bugging my for ages now and i need to move

along with building the rest of my site

thanks FeeB

0

Share this post


Link to post
Share on other sites

if you're seeing php source, then the httpd.conf file does not define the .php extension with the php engine. the module may or may not be loaded, but the extension is not associated. i suspect you are missing the

AddType application/x-httpd-php .php .php3 .phtml

directive

0

Share this post


Link to post
Share on other sites

The easiest way in my opinion is to add this code to the end (or wherever) of your httpd.conf:

ScriptAlias /php /usr/local/bin    <--(put the folder where your php binary resides.)
AddType application/x-httpd-php .php .php3 .phtml
Action application/x-httpd-php /php/php

0

Share this post


Link to post
Share on other sites

when php is loaded as an apache module, you should not require the scriptalias directive. it is only used to load cgi script engines, which the apache module takes care of.

0

Share this post


Link to post
Share on other sites

thanks guys i got it up now

replax is right i only need to add

AddType application/x-httpd-php .php .php3 .phtml
Action application/x-httpd-php /php/php

to my httpd.conf

hehe you can ckeck my fourm out now at http://slackpunx.zapto.org :)

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now