Linux - NewbieThis 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
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.
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am running RH Linux 9 with PHP 4.2.2, but I want to upgrade PHP to 5.1.1 or 4.4.1 for my need. Can anyone guide me to do this. I have tried to upgrade PHP to 5.1.1 (from source) with no success.
post the error u got while installing from source
its also not a good idea to try to overwrite php4 with php5
install it in another folder...then configure apache(web server) to use php5 instead
[root@me php-5.1.1]#
[root@me php-5.1.1]# './configure' '--host=i686-pc-linux-gnu' '--build=i686-pc-linux-gnu' '--target=i386-redhat-linux' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--cache-file=../config.cache' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d' '--enable-force-cgi-redirect' '--disable-debug' '--enable-pic' '--disable-rpath' '--enable-inline-optimization' '--with-bz2' '--with-db3' '--with-curl' '--with-dom=/usr' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--with-gd' '--enable-gd-native-ttf' '--with-ttf' '--with-gdbm' '--with-gettext' '--with-ncurses' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-png' '--with-pspell' '--with-regex=system' '--with-xml' '--with-expat-dir=/usr' '--with-zlib' '--with-layout=GNU' '--enable-bcmath' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-safe-mode' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-discard-path' '--enable-track-vars' '--enable-trans-sid' '--enable-yp' '--enable-wddx' '--without-oci8' '--with-pear=/usr/share/pear' '--with-imap=shared' '--with-imap-ssl' '--with-kerberos=/usr/kerberos' '--with-ldap=shared' '--with-mysql=shared,/usr' '--with-pgsql=shared' '--with-snmp=shared,/usr' '--with-snmp=shared' '--enable-ucd-snmp-hack' '--with-unixODBC=shared' '--enable-memory-limit' '--enable-bcmath' '--enable-shmop' '--enable-versioning' '--enable-calendar' '--enable-dbx' '--enable-dio' '--enable-mcal' '--enable-force-cgi-redirect'
loading cache ../config.cache
checking for Cygwin environment... no
checking for mingw32 environment... no
checking for egrep... grep -E
checking for a sed that does not truncate output... /bin/sed
checking host system type... i686-pc-linux-gnu
checking target system type... i386-redhat-linux-gnu
checking for gcc... gcc
checking whether the C compiler (gcc ) works... yes
checking whether the C compiler (gcc ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking whether gcc and cc understand -c and -o together... yes
checking how to run the C preprocessor... gcc -E
checking for AIX... no
checking whether ln -s works... yes
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking for re2c... no
configure: warning: You will need re2c 0.98 or later if you want to regenerate PHP parsers.
checking for gawk... gawk
checking for bison... no
checking for byacc... no
checking for bison version... invalid
configure: warning: bison versions supported for regeneration of the Zend/PHP parsers: 1.28 1.35 1.75 1.875 2.0 2.1 (found: none).
checking for flex... lex
checking for yywrap in -ll... no
checking lex output file root... ./configure: line 3238: lex: command not found
configure: error: cannot find output from lex; giving up
[root@me php-5.1.1]# make
make: *** No targets specified and no makefile found. Stop.
[root@me php-5.1.1]#
You'll need the development package, libxml2-devel, which contains the programming headers and other things needed to build software using the libraries. IIRC you'll have to upgrade Apache too, since recent versions of PHP require a newer Apache than the one shipped with RH9 to work.
Why do I need to install so many packages?
The ./configure command I used was generated by "php -i | grep configure."
Doesn't it mean that all packages in ./configure command were already installed and used to make previous PHP?
The development package is only needed to build the software, not to run it. It was installed on whatever system Red Hat built the package on, but is not on your system apparently.
the packages have to be installed...having it on another comp wont matter
./configure checks if u have all the packages that the program needs
if u can...try to install rh9 again, this time ticking all the programming tools and devel tools also during install
or even better...use a newer version instaead of rh9
I couldn't reinstall Linux because there are some websites running on this machine. I don't want to break it.
Anyway, I think I just need the packages already installed on the machine, and I should remove unnecessaries declared in ./configure command.
I am wondering if it is a good idea.
At this time, ./configure command asks me to install BZip2, but I don't think I would need it because the machine is running only for web server.
Should I remove it from ./configure command?
I have successfully upgraded to PHP 4.4.1, but after rebooting the system, I still see PHP 4.2.2 in phpinfo().
This is a virtual dedicated server I rented from a web host. Maybe it is not allowed to upgrade PHP.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.