Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 11-08-2009, 01:11 AM   #1
Senior Member
Registered: May 2008
Distribution: Slackware
Posts: 1,033

Rep: Reputation: 69
How do I enable php on my apache server?

I'm running slackware 12.0 and would like my website to use php for a database that I will be implementing. On the web server, php is installed. I can run php -f *.php and I can see the modules with php -m.

However, when I put in a simple php file like


print "Hello World.";

in my /var/www/htdocs folder and I view it in firefox I simply see the html src code, instead of just Hello World.

I have no other php file in my /var/www/htdocs folder. What do I need to do?
Old 11-08-2009, 01:34 AM   #2
Senior Member
Registered: May 2008
Distribution: Slackware
Posts: 1,033

Original Poster
Rep: Reputation: 69
Got it to work, I had to edit the httpd.conf


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
enable cgi in apache server a7mlinux Linux - Server 1 08-19-2009 08:56 PM
Please help with Apache Web Server / Apache Tomcat / PHP / Java / PHP-Java Bridge jpmad4it Linux - Server 2 01-05-2009 06:07 AM
Enable GD for PHP on RHE Server 5.2 stokeska Linux - Newbie 1 12-22-2008 07:22 PM
setting up a slack, apache server with php and a sql server. caged Slackware 1 10-25-2004 04:45 AM
Apache+php on one server and MySQL on onother server? goe Linux - Newbie 3 08-19-2004 04:25 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:38 AM.

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