PHP and Apache - Shows source text

  dean_e_boy 09:53 14 Feb 06
Locked

I am quite new to linux, but last night decided to install MySql, Apache and PHP. I have installed all (after six hours) and can use mysql. However, when I run the php script in firefox and konqurer it shows only the source file text, it does not seem to show what it is supposed to. The php file is suppose to show some infor ( phpinfo(); ). Does anybody know what I may have done wrong. I am using Suse Linux 9.3. Any help would be gratefully recieved.

  McTedo 14:54 18 Feb 06

This happened to me on Windows - I fixed it when I realised I had not associated .php with the PHP script.

If this is the same for you, you need to add:
AddType application/x-httpd-php .php

to Apache\conf\httpd.conf.

Hope this helps.

  welshwizard712 17:03 19 Feb 06

Correct!

The above answer seems the likely answer, also make sure that you have loaded the php module with apache.

<?php
phpinfo();
?>

Is the code btw.

Regards

Matt

This thread is now locked and can not be replied to.

Huawei P10 review

1995-2015: How technology has changed the world in 20 years

An overview: What leading creative agencies are doing to improve diversity

New iPad, iPhone SE & Red iPhone 7 on sale now