How do I get php5 running?

21,701

If Apache is running (check by using a browser to go to apache address), then try this to see if php is running:

vi /var/www/info.php

<?php phpinfo();?>

Call that file in a browser (e.g. http://ipapacheruns/info.php), it could be (e.g. http://localhost/info.php):

Share:
21,701

Related videos on Youtube

xczzhh
Author by

xczzhh

Updated on September 18, 2022

Comments

  • xczzhh
    xczzhh over 1 year

    I have just installed php5 on Ubuntu, but it's not running. How do I get it running? Or more generally, how do I start an application software that doesn't have an entry in init.d?

    • LnxSlck
      LnxSlck almost 12 years
      Do you have apache up and running?
    • xczzhh
      xczzhh almost 12 years
      @Lnxslck yes... I disabled apache by default, and I have just got it running. Does this have an effect?
  • xczzhh
    xczzhh almost 12 years
    Thanks for the answer. I did exactly what you said, but it's still not running, even if apache2 is running well(with 6 processes). :P
  • LnxSlck
    LnxSlck almost 12 years
    Please check apache is running with a web browser
  • Geppettvs D'Constanzo
    Geppettvs D'Constanzo almost 12 years
    +1 This is the best and easy way to test a successfully installed and running PHP.
  • xczzhh
    xczzhh almost 12 years
    oops... seems not. Can't open the default page...
  • xczzhh
    xczzhh almost 12 years
    Seems that there is something wrong with Apach2. I can't even open the index.html page from a web browser. I must did something wrong. I remember using the command sudo update-rc.d apache2 disable 2 this day earlier... but I have enabled it, even restarted the system... :P
  • LnxSlck
    LnxSlck almost 12 years
    So what it looks like, is that your apache isn't running correctly, until you get the page showing the words "It works" or something like that, you won't be able to get php running.
  • BlitZz
    BlitZz almost 12 years
    do you have any firewall software running? (ufw for instance).