-3
<?php
phpinfo();
?>

IS given as the be all and end all solution to any PHP problems .. however I have not found anywhere a solution to the problem that

<?php
phpinfo();
?> 

is what is actually displayed on the screen. A wordpress install into the same directory will indicate that PHP isn't running. However at a SSH screen php -v indicates that php IS running

I have torn everything out numerous times (using apt-get & purging & re installing). I have googled and gone to the 10,11 12 pages of results attempting to find a solution ... I have found a mistake in the Ubuntu documentation (it referred to a directory as being named as .... module when in fact it is called modules). I have found repeated enquiries about exactly the same problem ... the standard answer is create a file info.php put in

<?php
phpinfo();
?>

and there's the solution... No where I have found oh put in

<?php
phpinfo();
?>

AND if you still see .... try X Y or Z. I have tried "due diligence" I have tried anyone of a hundred possible "solutions" all ending up with

<?php
phpinfo();
?>

but Nothing. Please does anyone have anything else I can try? Thank you

muru
  • 197,895
  • 55
  • 485
  • 740
Sogwac
  • 11
  • 3
  • 1
    Nobody cares that you looked at a hundred solutions which tell you the same thing. Keep your post to the point. And making a file with phpinfo() in it is not a solution, don't be silly. – muru Sep 21 '15 at 20:31
  • Or http://askubuntu.com/q/52545/158442, or http://askubuntu.com/q/590405/158442. – muru Sep 21 '15 at 20:33
  • How did you install PHP and Apache? – kos Sep 21 '15 at 20:33
  • The only reason I mention the file containing phpinfo() is given as the proof that php is installed. I checked from the command line running php info.php (name of file with the phpinfo() in).. does give the correct result of listing all the options that phpinfo should give ... running same file from a browser (IE FIREFOX OR CHROME) same end resut text is displayed rather than output of phpinfo(). I can appreciate merely entering that command Wont solve the problem but the Numerous pages Here and elsewhere seem to offer that as the final comment... no * if this doesn't work then . – Sogwac Sep 23 '15 at 00:54
  • .. I got the text of the file from here I got a suggestion that there is a leading or trailing space involved ... (funny it works from the Command line) so again recopy, manually enter and try again. I am sorry I have spent days "digging" into this and there doesn't seem to be a simple A, then b) then c) solution. The install of LAMP was following instructions on This site apt-get process... making sure all the steps were followed. Checking re checking stoping & restarting APACHE et al. I have removed the various parts removed the whole Purged ... all of which eventually give tha same result – Sogwac Sep 23 '15 at 00:58
  • http://askubuntu.com/questions/590405/cant-get-apache-to-run-with-php5-in-lubuntu doesn't give any answer as if it was resolved though http://askubuntu.com/questions/52545/php-files-are-downloaded-instead-of-being-parsed-by-apache indicates it is being run under XAMPP and no indication of success... – Sogwac Sep 23 '15 at 01:03

1 Answers1

0

First remove all the previous php installations using sudo apt-get remove, them follow the instructions provided in this page, https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu

to install the php components properly.

It is really helpful.