This is a way to install PHP, type or paste this into your terminal:
# sudo apt-get install php5 libapache2-mod-php5
Once it's finished installing, restart apache, using:
# sudo /etc/init.d/apache2 restart
Testing PHP
Now, let's make sure that PHP is working properly. To do this, we're going to run phpinfo(). You can, of course, swap out gedit with your editor of choice.
# sudo gedit /var/www/phpinfo.php
Type or paste the following into the document, and save it. (remove the space before the '?php')
< ?php phpinfo(); ?>
Now we can test PHP by browsing to:
http://localhost/phpinfo.php
Search Linux Here
Monday, February 25, 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment