LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Help installing php 5.1.4 (https://www.linuxquestions.org/questions/linux-newbie-8/help-installing-php-5-1-4-a-454570/)

Bedworth22 06-14-2006 12:34 AM

Help installing php 5.1.4
 
I need to update my linux box to include php 5.1.4 and have very little idea how to go about it.

I am running SuSe 9.3 with updates installed. I have installed apache 2.0.53, mysql 5.0.22 and php 5.0.3 simply using YAST and a couple of rpm's for mysql.

Unfortunatley for me - there seems to be no rpm for php 5.1.4. I have downloaded the tar to root, read numerous articles on installing - much to no avail.

I need to use the box as a webserver and no more (except for a few home directories) hence I have not and probably will not delve too deeply into the machinations of linux or its syntax. The current box has been up and working for more than 12 months with absolutely no problems whatsoever - and has required very little maintenance, which does not bode well for my learning the intricacies.

Most articles talk about installing to /usr/local and so on. None of my installations exist there. My php directory lives at /etc/php5 and the binary lives at /usr/bin. Needless to say, I am always logged in as root.

The question is: do I need to uninstall anything prior to installing php 5.1.4? What commands should I use to unpack and install (is it a case of just replacing /usr/local/bin with /usr/bin)? Is there an rpm that I could use to make it really simple?

Thanks - Keith

BobNutfield 06-14-2006 01:11 AM

Hi and welcome to LQ.

Are you trying install PHP with a tarball that looks like this:

PHP-5.1.4.tar.gz (or something similar to this?

If so, this is really not difficult. Please post back the syntax of the tar file you want to install. The basic procedure is:

as normal user - tar -xfm nameofprogram.tar.gz (could be bz2, in which case tar -xjfm_

This unpacks the file, creating a directory with the same name (without the tar ending.)

Change into the new directory. Type make.

Change to root (su then password), and type make install.

That is the basic procedure, but you will want to read the README or INSTALL files for any special instructions.

Hope this helps

Bob

Bedworth22 06-14-2006 09:54 AM

Thanks for the reply Bob

I must seem really dim - but I couldn't get this working. I was not logged in as a normal user as there are no normal users - just the root admin. I have both tars in the directory /root. Typing the following, I got:

curric-station-168:~ # - tar -xfm php-5.1.4.tar.gz
bash: popd: directory stack empty

However, I was able to use extract from konqueror

Changing to the php-5.1.4 directory and typing the following gave:

curric-station-168:~/php-5.1.4/php-5.1.4 # make
make: *** No targets specified and no makefile found. Stop.

Below is a complete listing of the files in the directory. Can you cure my dimness?

drwxr-xr-x 14 1002 1002 2264 May 12 15:41 .
drwxr-xr-x 3 root root 80 Jun 14 16:11 ..
-rw-r--r-- 1 1002 1002 8014 Mar 8 23:54 .gdbinit
-rw-r--r-- 1 1002 1002 11110 Dec 22 20:27 CODING_STANDARDS
-rw-r--r-- 1 1002 1002 91 Apr 22 2002 CREDITS
-rw-r--r-- 1 1002 1002 23175 Jan 23 18:07 EXTENSIONS
-rw-r--r-- 1 1002 1002 88589 Dec 1 2005 INSTALL
-rw-r--r-- 1 1002 1002 3218 Jan 1 12:30 LICENSE
-rw-r--r-- 1 1002 1002 941 Oct 16 2005 Makefile.frag
-rw-r--r-- 1 1002 1002 2570 Mar 21 18:17 Makefile.gcov
-rw-r--r-- 1 1002 1002 4308 Apr 8 18:53 Makefile.global
-rw-r--r-- 1 1002 1002 88855 May 3 23:44 NEWS
-rw-r--r-- 1 1002 1002 4728 Dec 4 2005 README.CVS-RULES
-rw-r--r-- 1 1002 1002 1570 Oct 12 2001 README.EXTENSIONS
-rw-r--r-- 1 1002 1002 7126 Jun 29 2003 README.EXT_SKEL
-rw-r--r-- 1 1002 1002 3888 Jan 3 2003 README.PARAMETER_PARSING_API
-rw-r--r-- 1 1002 1002 4740 Aug 24 2004 README.PHP4-TO-PHP5-THIN-CHANGES
-rw-r--r-- 1 1002 1002 2112 Apr 7 1999 README.QNX
-rw-r--r-- 1 1002 1002 4768 Oct 23 2002 README.SELF-CONTAINED-EXTENSIONS
-rw-r--r-- 1 1002 1002 15427 Mar 4 2003 README.STREAMS
-rw-r--r-- 1 1002 1002 4557 Dec 22 2003 README.SUBMITTING_PATCH
-rw-r--r-- 1 1002 1002 6508 Apr 15 2004 README.TESTING
-rw-r--r-- 1 1002 1002 4922 Mar 25 2003 README.TESTING2
-rw-r--r-- 1 1002 1002 4261 Jul 3 2003 README.UNIX-BUILD-SYSTEM
-rw-r--r-- 1 1002 1002 6290 Dec 23 2003 README.WIN32-BUILD-SYSTEM
-rw-r--r-- 1 1002 1002 4289 Feb 8 2004 README.Zeus
-rw-r--r-- 1 1002 1002 5756 Dec 6 2005 README.input_filter
-rw-r--r-- 1 1002 1002 5354 Sep 7 2005 TODO
-rw-r--r-- 1 1002 1002 163 Nov 13 2005 TODO-5.1
-rw-r--r-- 1 1002 1002 4789 May 28 2004 TODO-PHP5
drwxr-xr-x 2 1002 1002 824 May 12 15:41 TSRM
-rwxr-xr-x 1 1002 1002 17478 Nov 27 2005 UPGRADING
drwxr-xr-x 4 1002 1002 4184 May 12 15:41 Zend
-rw-r--r-- 1 1002 1002 3337 May 12 15:41 acconfig.h
-rw-r--r-- 1 1002 1002 28 Jun 8 2000 acconfig.h.in
-rw-r--r-- 1 1002 1002 66376 Apr 10 13:17 acinclude.m4
-rw-r--r-- 1 1002 1002 287456 May 12 15:41 aclocal.m4
drwxr-xr-x 2 1002 1002 392 May 12 15:40 build
-rwxr-xr-x 1 1002 1002 1244 Nov 29 2005 buildconf
-rw-r--r-- 1 1002 1002 51 Dec 2 2003 buildconf.bat
-rw-r--r-- 1 1002 1002 43499 Nov 29 2005 config.guess
-rw-r--r-- 1 1002 1002 31743 Nov 29 2005 config.sub
-rwxr-xr-x 1 1002 1002 2948317 May 12 15:41 configure
-rw-r--r-- 1 1002 1002 41990 May 4 00:30 configure.in
-rwxr-xr-x 1 1002 1002 58 Mar 14 2004 cvsclean
-rwxr-xr-x 1 1002 1002 50 Dec 19 2003 cvsclean.bat
drwxr-xr-x 81 1002 1002 2120 May 12 15:41 ext
-rw-r--r-- 1 1002 1002 137 Feb 20 2003 footer
-rw-r--r-- 1 1002 1002 2230 May 12 15:41 generated_lists
-rwxr-xr-x 1 1002 1002 459 Nov 8 2005 genfiles
-rw-r--r-- 1 1002 1002 1194 Jan 1 12:50 header
-rw-r--r-- 1 1002 1002 0 May 12 15:41 install-sh
-rw-r--r-- 1 1002 1002 186760 Nov 29 2005 ltmain.sh
drwxr-xr-x 3 1002 1002 1896 May 12 15:41 main
-rwxr-xr-x 1 1002 1002 3522 Jun 29 2003 makedist
-rw-r--r-- 1 1002 1002 5317 Feb 8 2004 makerpm
-rw-r--r-- 1 1002 1002 0 May 12 15:41 missing
-rw-r--r-- 1 1002 1002 0 May 12 15:41 mkinstalldirs
drwxr-xr-x 2 1002 1002 104 May 12 15:41 netware
drwxr-xr-x 2 1002 1002 152 May 12 15:41 pear
-rw-r--r-- 1 1002 1002 2523 Mar 6 19:10 php.gif
-rw-r--r-- 1 1002 1002 41989 Feb 8 23:43 php.ini-dist
-rw-r--r-- 1 1002 1002 46069 Feb 8 23:43 php.ini-recommended
-rw-r--r-- 1 1002 1002 1489 Jan 17 2004 php5.spec.in
drwxr-xr-x 2 1002 1002 840 May 12 15:41 regex
-rwxr-xr-x 1 1002 1002 54636 May 3 22:37 run-tests.php
drwxr-xr-x 22 1002 1002 568 May 12 15:41 sapi
drwxr-xr-x 5 1002 1002 248 May 12 15:41 scripts
-rwxr-xr-x 1 1002 1002 2105 Sep 19 2005 server-tests-config.php
-rwxr-xr-x 1 1002 1002 51718 Feb 16 03:15 server-tests.php
-rwxr-xr-x 1 1002 1002 108 Dec 30 1999 snapshot
-rw-r--r-- 1 1002 1002 10 Nov 21 1999 stamp-h.in
-rw-r--r-- 1 1002 1002 1 Dec 1 2000 stub.c
drwxr-xr-x 8 1002 1002 1392 May 12 15:41 tests
drwxr-xr-x 4 1002 1002 1728 May 12 15:41 win32

BobNutfield 06-14-2006 11:12 AM

Code:

rwxr-xr-x 1 1002 1002 2948317 May 12 15:41 configure
It appears you do have a configure file here. Did you run:

./configure

when you entered the directory. Before you run make you have to run the above.

If you have not yet, try that.

Bob

BobNutfield 06-14-2006 11:16 AM

BTW, there are rpms for PHP for Suse here:


BobNutfield 06-14-2006 11:17 AM




Sorry, don't know why it didn't post before.

BobNutfield 06-14-2006 11:20 AM

http://rpm.pbone.net/index.php3/stat...ch/php-session

for some reason, urls are not posting for me. Had to write it out.

Bob

Bedworth22 06-14-2006 11:44 PM

Thanks Bob, you're a lifesaver.

No - I hadn't tried ./configure I wasn't sure of the parameters to give (having never used make before). The rpm solution looks good - I shall try that first.

Live in the knowledge that you are not just helping me, but 1200 youngsters :-) And I think it's time that I learned a little more about linux.

Cheers, Keith

BobNutfield 06-15-2006 01:06 PM

You will find people here more than willing to help. If you have further difficulties, post back. Most of the time you do no have to include any special parameters when you run the ./configure script when installing software from source. But almost all the major software used by Suse will have an rpm available for it.

Bob


All times are GMT -5. The time now is 06:53 AM.