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
Welcome to
LinuxQuestions.org , a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free.
Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please
contact us . If you need to reset your password,
click here .
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
04-07-2005, 10:09 AM
#1
Senior Member
Registered: Jul 2004
Location: Germany
Distribution: open SUSE 11.0, Fedora 7 and Mandriva 2007
Posts: 1,638
Rep:
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.
04-07-2005, 10:10 AM
#2
Member
Registered: Aug 2003
Posts: 150
Rep:
tar -jxvf filename.tar.bz2 should do it ....
Else bunzip2 filename.tar.bz2 then tar -xvf
04-07-2005, 11:27 AM
#3
Member
Registered: Mar 2005
Distribution: slackware-current
Posts: 379
Rep:
You don't need the j or z option anymore. tar xvf will automatically determine the file type and uncompress it.
04-07-2005, 11:29 AM
#4
Senior Member
Registered: Jul 2004
Location: Germany
Distribution: open SUSE 11.0, Fedora 7 and Mandriva 2007
Posts: 1,638
Original Poster
Rep:
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
04-07-2005, 12:28 PM
#5
Senior Member
Registered: Jul 2004
Location: Germany
Distribution: open SUSE 11.0, Fedora 7 and Mandriva 2007
Posts: 1,638
Original Poster
Rep:
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' ?
04-07-2005, 06:31 PM
#6
Moderator
Registered: Aug 2002
Posts: 9,915
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 .
04-08-2005, 07:49 AM
#7
Senior Member
Registered: Jul 2004
Location: Germany
Distribution: open SUSE 11.0, Fedora 7 and Mandriva 2007
Posts: 1,638
Original Poster
Rep:
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.
04-08-2005, 09:53 AM
#8
Moderator
Registered: Aug 2002
Posts: 9,915
You do not need to log on as root to write this file.
Saving it to your home directory is ok.
04-08-2005, 03:42 PM
#9
Senior Member
Registered: Jul 2004
Location: Germany
Distribution: open SUSE 11.0, Fedora 7 and Mandriva 2007
Posts: 1,638
Original Poster
Rep:
Thanks everybody
Now it works and I am gradually learning.
Thread Tools
Search this Thread
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
All times are GMT -5. The time now is 07:45 PM .
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know .
Latest Threads
LQ News