LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-07-2005, 10:09 AM   #1
Gins
Senior Member
 
Registered: Jul 2004
Location: Germany
Distribution: open SUSE 11.0, Fedora 7 and Mandriva 2007
Posts: 1,641

Rep: Reputation: 46
Opening of a tar.bz2 file


Hello
I am using Mandrake Linux 10.0

I have downloaded the following file from the Internet.
php-4.3.11.tar.bz2

I in vain tried to install it.

I created a folder called 'php' and moved the file on to it.



[nik@c83-250-88-159 php]$ ls
php-4.3.11.tar.bz2
[nik@c83-250-88-159 php]$ tar -xvzf php-4.3.11.tar.bz2

gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error exit delayed from previous errors


[nik@c83-250-88-159 php]$ gzip -d php-4.3.11.tar.bz2
gzip: php-4.3.11.tar.bz2: unknown suffix -- ignored

[nik@c83-250-88-159 php]$ gzip -d 'php-4.3.11.tar.bz2'
gzip: php-4.3.11.tar.bz2: unknown suffix -- ignored

[nik@c83-250-88-159 php]$ gzip-d 'php-4.3.11.tar.bz2'
bash: gzip-d: command not found

[nik@c83-250-88-159 php]$ gzip -d 'php-4.3.11.tar.bz2'
gzip: php-4.3.11.tar.bz2: unknown suffix -- ignored

[nik@c83-250-88-159 php]$ gzip -d php-4.3.11.tar.bz2
gzip: php-4.3.11.tar.bz2: unknown suffix -- ignored
[nik@c83-250-88-159 php]$


What is the problem? Your help is deeply appreciated.
 
Old 04-07-2005, 10:10 AM   #2
zeos
Member
 
Registered: Aug 2003
Posts: 150

Rep: Reputation: 15
tar -jxvf filename.tar.bz2 should do it ....

Else bunzip2 filename.tar.bz2 then tar -xvf
 
Old 04-07-2005, 11:27 AM   #3
chbin
Member
 
Registered: Mar 2005
Distribution: slackware-current
Posts: 379

Rep: Reputation: 31
You don't need the j or z option anymore. tar xvf will automatically determine the file type and uncompress it.
 
Old 04-07-2005, 11:29 AM   #4
Gins
Senior Member
 
Registered: Jul 2004
Location: Germany
Distribution: open SUSE 11.0, Fedora 7 and Mandriva 2007
Posts: 1,641

Original Poster
Rep: Reputation: 46
Thanks zeos

It worked fine. I installed the program using the following steps:

./configure

make

make install
----------------------------------------------------------------------------------

How can I start the program? If you read the following, you would find how to start the program. I can' t get a clue.
Please help me.



[root@c83-250-88-159 php-4.3.11]# make install
Installing PHP SAPI module: cgi
Installing PHP CGI into: /usr/local/bin/
Installing PEAR environment: /usr/local/lib/php/
[PEAR] Archive_Tar - installed: 1.1
[PEAR] Console_Getopt - installed: 1.2
[PEAR] PEAR - installed: 1.3.5
Wrote PEAR system config file at: /usr/local/etc/pear.conf
You may want to add: /usr/local/lib/php to your php.ini include_path
[PEAR] HTML_Template_IT- installed: 1.1
[PEAR] Net_UserAgent_Detect- installed: 2.0.1
[PEAR] XML_RPC - installed: 1.2.2
Installing build environment: /usr/local/lib/php/build/
Installing header files: /usr/local/include/php/
Installing helper programs: /usr/local/bin/
program: phpize
program: php-config
program: phpextdist


[root@c83-250-88-159 php-4.3.11]# ls
acconfig.h CREDITS main/ php4.spec.in regex/
acconfig.h.in cvsclean* makedist* php.gif run-tests.php*
acinclude.m4 ext/ Makefile php.ini-dist sapi/
aclocal.m4 EXTENSIONS Makefile.frag php.ini-recommended scripts/
build/ footer Makefile.fragments README.CVS-RULES server-tests.php*
buildconf* generated_lists Makefile.global README.EXTENSIONS snapshot*
CODING_STANDARDS genfiles* Makefile.objects README.EXT_SKEL stamp-h.in
config.cache header makerpm README.PARAMETER_PARSING_API stub.c
config.guess include/ missing README.QNX tests/
config.log INSTALL mkinstalldirs README.SELF-CONTAINED-EXTENSIONS TODO
config.nice* install-sh modules/ README.STREAMS TODO_SEGFAULTS
config.status* libs/ netware/ README.SUBMITTING_PATCH TSRM/
config.sub libtool* NEWS README.TESTING win32/
configure* LICENSE pear/ README.UNIX-BUILD-SYSTEM Zend/
configure.in ltmain.sh php4.spec README.Zeus
 
Old 04-07-2005, 12:28 PM   #5
Gins
Senior Member
 
Registered: Jul 2004
Location: Germany
Distribution: open SUSE 11.0, Fedora 7 and Mandriva 2007
Posts: 1,641

Original Poster
Rep: Reputation: 46
I just wrote the following command to start the program.

The following is the result:

[nik@c83-250-88-159 nik]$ php 4
Status: 404
Content-type: text/html
X-Powered-By: PHP/4.3.11

No input file specified.
[nik@c83-250-88-159 nik]$


What is the meaning of ' No input file specified' ?
 
Old 04-07-2005, 06:31 PM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 17,224

Rep: Reputation: 2216Reputation: 2216Reputation: 2216Reputation: 2216Reputation: 2216Reputation: 2216Reputation: 2216Reputation: 2216Reputation: 2216Reputation: 2216Reputation: 2216
The php binary is an interpreter similar to shell scripts i.e. /bin/bash but uses the php language. An example file is posted below saved with the filename hello
Code:
#!/usr/bin/php 
<?php
    echo "This is a PHP-CLI Script!!";
?>
To run the code you would type at the command line
php hello
or if you changed the permissions of the file to be executable
./hello

http://us2.php.net/features.commandline

You can find lots more info by googling.

Last edited by michaelk; 04-07-2005 at 06:37 PM.
 
Old 04-08-2005, 07:49 AM   #7
Gins
Senior Member
 
Registered: Jul 2004
Location: Germany
Distribution: open SUSE 11.0, Fedora 7 and Mandriva 2007
Posts: 1,641

Original Poster
Rep: Reputation: 46
michaelk, thanks for the repoy

I can write the file you mentionede on the console.

I can use the 'vi wordprocessor' on the console.

Just create a file called ' vi hello' and write the scripts you mentioned.

Where do I save this file? Should be in my home directory? Do I have to log on as a root user to write this file?

Please tell me.
 
Old 04-08-2005, 09:53 AM   #8
michaelk
Moderator
 
Registered: Aug 2002
Posts: 17,224

Rep: Reputation: 2216Reputation: 2216Reputation: 2216Reputation: 2216Reputation: 2216Reputation: 2216Reputation: 2216Reputation: 2216Reputation: 2216Reputation: 2216Reputation: 2216
You do not need to log on as root to write this file.

Saving it to your home directory is ok.
 
Old 04-08-2005, 03:42 PM   #9
Gins
Senior Member
 
Registered: Jul 2004
Location: Germany
Distribution: open SUSE 11.0, Fedora 7 and Mandriva 2007
Posts: 1,641

Original Poster
Rep: Reputation: 46
Thanks everybody

Now it works and I am gradually learning.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to make a tar.bz2 file bruse Linux - Newbie 5 03-30-2005 01:42 AM
Unpacking a .tar.bz2 file njschroe Linux - Software 1 01-31-2005 03:25 PM
how to compile a file of .tar.bz2 zameer_india Linux - Software 7 12-21-2004 12:15 AM
problem unzipping a tar.bz2 file tar: Error is not recov jyome Linux - Software 4 09-04-2003 01:04 PM
Opening .tar.bz2 files dominique Linux - Newbie 7 11-30-2001 02:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:38 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration