TurnKey Linux Virtual Appliance Library

Noobie question: How to execute php CGI scripts and such

i everyone, I'm taking a web development class, where we've been introduced to hosting on a newly installed LAMP server for the first time and I need to learn how to execute a PHP script for the first time in the web shell... How do I run my script in web shellin Firefox,  and what do I run in command line to do so?

Jeremy's picture

Sorry for slow reply

If you haven't already, you may need to install php5-cli (the php module which allows executing php from the commandline interface). 

apt-get update
apt-get install php5-cli

Then cd to the script location and run it like this:

./script.php

Hopefully that all works. It's off the top of my head so not 100% sure...

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> <hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote> <pre> <address> <code> <cite> <strike> <caption>

More information about formatting options

Leave this field empty. It's part of a security mechanism.
(Dear spammers: moderators are notified of all new posts. Spam is deleted immediately)