Find the answer to your Linux question:
Results 1 to 3 of 3
Hi, iam having Linux , i want to write a simple program and i want to run that program...... Is there any software is required ? then after installation.......... how ...
  1. #1
    Linux Newbie
    Join Date
    Oct 2006
    Posts
    107

    php

    Hi,

    iam having Linux , i want to write a simple program and i want to run that program......

    Is there any software is required ?

    then after installation.......... how to the execute the program........

    Thanks in Advance

  2. #2
    Linux Newbie birdman's Avatar
    Join Date
    Mar 2006
    Location
    Ireland
    Posts
    141
    You can run PHP from the command line if you wish:

    PHP: Using PHP from the command line - Manual

    If you look on the rest of the site you will find all the information for installation as well.

  3. #3
    Trusted Penguin Cabhan's Avatar
    Join Date
    Jan 2005
    Location
    Seattle, WA, USA
    Posts
    3,230
    To give you a slightly more concise answer:

    You will need to install PHP. How you will do this depends on your distro, but if you open your package manager (Synaptic on Ubuntu, YaST on SuSE, etc.) and search for 'php', you should find it. Install.

    If you want to display your PHP page in a web browser, you will need to have an HTTP server somewhere. If you have a website, you can host the PHP page there; otherwise you need to install an HTTP server on your system as well. Search for 'apache' in your package manager and install it. You can now start Apache, write a PHP script, put it in /var/www/localhost/htdocs, and point your webbrowser to http://localhost/foo.php.

    If you just want to run a PHP script, you don't need Apache at all. You can just write your script, then on the commandline, run: "php foo.php".

    Got it?
    DISTRO=Arch
    Registered Linux User #388732

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...