LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-04-2008, 06:26 AM   #1
kratosal
LQ Newbie
 
Registered: Mar 2008
Posts: 13

Rep: Reputation: 0
is there way to run php scripts without having any server os......


some virtualization or ide of php for linux ubuntu gusty 7.10
 
Old 04-04-2008, 10:17 AM   #2
kotnik
Member
 
Registered: Nov 2004
Location: Novi Sad, Serbia
Distribution: Debian, Slackware, Gentoo, openSuSE
Posts: 254

Rep: Reputation: 31
If you want to run php scripts in ubuntu, do this:

Code:
sudo apt-get install php5-cli
 
Old 04-04-2008, 10:22 AM   #3
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
yeah, php is "just" a piece of software like everything else..you don't need the whole web server (like Apache, along with some plugins) to run php scripts unless you want to serve them for the rest of the world

The same goes for (at least most of) the other similar things.
 
Old 04-06-2008, 09:36 AM   #4
kratosal
LQ Newbie
 
Registered: Mar 2008
Posts: 13

Original Poster
Rep: Reputation: 0
hey thanx kotnik but what if i dont have net connection at home and i can't installed php-cli like that, i am using ubuntu gusty 7.10, isn't this thing is pre- installed in ubuntu, if not then any other way to install it any web link for its debian package or source file..............


plzzzzzzz help
 
Old 04-06-2008, 01:49 PM   #5
kotnik
Member
 
Registered: Nov 2004
Location: Novi Sad, Serbia
Distribution: Debian, Slackware, Gentoo, openSuSE
Posts: 254

Rep: Reputation: 31
Well, you'll have to download it somehow...

Just do 'sudo apt-get install php5-cli' and write down packages it asks. Then go to http://packages.ubuntu.com/, download required packages, and then go home.

Once home, install them like this:

dpkg -i package_name.deb
 
Old 04-06-2008, 02:30 PM   #6
marquardl
Member
 
Registered: Apr 2008
Posts: 100

Rep: Reputation: 15
php myscript.php

PHP has usually CLI enabled by default, unless specifically disabled by the system administrator or the distribution.

Code:
run php -v
If the output contains something like 'cli' then it is CLI-enabled.

You can fetch parameters from the commandline by using $argc and $argv[], similar to C programming. Launch your script like this:

Code:
php myscript.php
Bye,
M

Linux Archive

Last edited by marquardl; 05-01-2008 at 01:38 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Using PHP to run a script on another server qscomputing Programming 4 04-12-2006 10:49 AM
able to run root-only commands via php scripts? Swakoo Linux - General 2 01-09-2006 06:01 AM
Parsing PHP Scripts using Apache in SuSe 9.3 (without a dedicated server) elliotfuller SUSE / openSUSE 7 07-27-2005 11:40 AM
Running PHP Scripts in SuSe Linux 9.3 w/o a server. elliotfuller Linux - Software 3 06-18-2005 06:27 PM
how do you run scripts toejam Linux - General 5 05-24-2004 08:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:42 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration