LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-20-2006, 07:03 PM   #1
crillegs
LQ Newbie
 
Registered: Nov 2005
Posts: 8

Rep: Reputation: 0
Server won't show PHP


Hi Linuxquestions!

Finally I've managed to set up my Apache2 server, in Fedora Core 4, and installed PHP5 properly with it.

I've added:

LoadModule php5_module modules/libphp5.so
AddType application/x-httpd-php-source .phps
AddType application/x-httpd-php .php .phtml

to my /apache2/conf/httpd.conf file, but it won't show my PHP code when writing: http://localhost/

My PHP code isn't wrong, but I don't think it runs the code/compile the code, because if I press view source I can actually see my PHP code, wich I shouldn't be able to, if it ran properly.

Any good ideas about what to do?

Best Regards

Christian Sorensen
 
Old 05-20-2006, 07:35 PM   #2
allelopath
Member
 
Registered: Jan 2003
Location: New Mexico
Distribution: Ubuntu 18.04.3 LTS
Posts: 539

Rep: Reputation: 30
no idea, but have you tried it in different browsers?
 
Old 05-20-2006, 08:05 PM   #3
crillegs
LQ Newbie
 
Registered: Nov 2005
Posts: 8

Original Poster
Rep: Reputation: 0
Different Browsers

Yes I have. But that wouldn't be the problem either, it's should apache not activating PHP support/modules!
 
Old 05-20-2006, 09:24 PM   #4
leandean
Member
 
Registered: Oct 2005
Location: Burley, WA
Distribution: Sabayon, Debian
Posts: 278

Rep: Reputation: Disabled
Did you set the directory index in httpd.conf to whatever .php you want to display??
 
Old 05-21-2006, 11:03 AM   #5
crillegs
LQ Newbie
 
Registered: Nov 2005
Posts: 8

Original Poster
Rep: Reputation: 0
Directory Index

Yes I have done that... Well I found out it only run the php code in .php files... But it doesn't work in the Index.html file though...
 
Old 05-21-2006, 12:53 PM   #6
PetruM
LQ Newbie
 
Registered: Apr 2006
Location: Sweden
Distribution: Slackware, Ubuntu 22.04 LTS
Posts: 19

Rep: Reputation: Disabled
Create the .htaccess file where you have the web page (or edit it if it already exist; note that it's a hidden file) and add this line:

AddType application/x-httpd-php .html

This way PHP code will be processed in .html files too.
Good luck.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
can't show php files MaaSTaaR Ubuntu 12 01-19-2006 01:15 PM
show PHP-code in website Boby Programming 2 08-02-2004 05:40 PM
make php show up? Maver Linux - General 5 06-11-2004 03:42 PM
PHP show query results Gerardoj Programming 1 05-11-2004 01:31 PM
PHP does not show mysql as an extension Linix Linux - Newbie 7 01-31-2004 10:13 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:41 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration