LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Arch (https://www.linuxquestions.org/questions/arch-29/)
-   -   Apache with php (https://www.linuxquestions.org/questions/arch-29/apache-with-php-827800/)

vitorsgoncalves 08-22-2010 09:45 AM

Apache with php
 
Hello

I am new to arch linux, maybe this is a stupid question:

I installed apache and php with pacman,I started the http and apache seems to be working. I can view Html pages in localhost, but php pages does not show up.

Any clues?

AlucardZero 08-22-2010 09:59 AM

No because you've given no useful debugging information. What do you mean by "does not show up"? What does show up? What error, if any, do you get from your browser? What do Apache's access_log and error_log say?

vitorsgoncalves 08-22-2010 11:16 AM

2 Attachment(s)
Quote:

Originally Posted by AlucardZero (Post 4074156)
No because you've given no useful debugging information. What do you mean by "does not show up"? What does show up? What error, if any, do you get from your browser? What do Apache's access_log and error_log say?

Sorry for the bad info.

When opening php files in the browser, what shows up is the source code, not the rendered page. There is no error.

The logs are attached. (yes, my system's date is wrong)

bathory 08-22-2010 12:11 PM

Hi,

You need to add in httpd.conf the following:
Code:

AddType application/x-httpd-php .php

vitorsgoncalves 08-22-2010 12:19 PM

Quote:

Originally Posted by bathory (Post 4074237)
Hi,

You need to add in httpd.conf the following:
Code:

AddType application/x-httpd-php .php

It worked, thanks

sandy6573 10-17-2010 09:14 AM

also add
AddType application/x-httpd-php-source .phps---for viewing source in browers for debugging purpose in http.conf file


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