Installing PHP
Open Terminal. and kind the below code in terminal and hit enter.
sudo apt-get install php5 libapache2-mod-php5
Type your ubuntu secret if required.
Type y and hit enter to substantiate PHP installation.
After the victorious installation restart Apache victimisation the below code
sudo /etc/init.d/apache2 restart
Test PHP installation
To test PHP is put in, Type
sudo gedit /var/www/phpinfo.php
<?php
phpinfo();
?>
in the terminal and kind your ubuntu secret if required. it'll open the phpinfo.php move into gedit.Type below code within the phpinfo.php file, save and exit it .
Now open your favorite browser and kind http://localhost/phpinfo.php within the address bar and press enter. If you may see the below page , then your php works fine.
at the moment it says:
ReplyDeletein the terminal and kind your ubuntu secret if required. it'll open the phpinfo.php move into gedit.Type below code within the phpinfo.php file, save and exit it .
there is no code below,
please update
enter this inside phpinfo.php file
ReplyDelete