1

I`ve installed php 5.3.24 in my UBUNTU 18.0.4 but unable to show info.php page

Last login: Thu Jul 11 06:59:31 2019 from 10.10.2.194
sagar@ubuntu:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.2 LTS
Release:        18.04
Codename:       bionic
sagar@ubuntu:~$ 
sagar@ubuntu:~$ php -v
PHP 5.3.24 (cli) (built: Jul 11 2019 07:30:40) 
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2013 Zend Technologies
sagar@ubuntu:~$ 
sagar@ubuntu:~$ 

enter image description here

PLS Give any suggestion

Is UBUNTU 18 is compatible with php 5.3.24?

  • How did you install PHP 5.3? Why do you want 5.3, and not some more recent version that is actually in 18.04's repositories? – vidarlo Jul 11 '19 at 10:14
  • @vidarlo I`ve downloaded as guided in below URL (askubuntu.com/questions/1052746/…) – sgor Jul 12 '19 at 3:26
  • 1
    Dear Angry Reviewers, Please note that Ask Ubuntu's "off topic" policy relates to the version of Ubuntu. This is addressed in Meta: meta.askubuntu.com/questions/18710/… – Oli Jul 12 '19 at 15:37
5

Do not run this on a public facing webserver.

This version of PHP has some rather ugly security problems.

Update your scripts to work with a newer php version. Anything else is plain stupid, and should only be used to verify functionality during porting of scripts.

First we'll have to install Apache development files, a few misc build dependants and build essentials:

sudo apt install apache2 apache2-dev build-essentials libxml2-dev libmariadbclient-dev-compat checkinstall

Now we can continue with the tutorial; Copy paste mostly, with some modifications:

cd /tmp && wget http://in1.php.net/distributions/php-5.3.29.tar.bz2
tar -xvf php-5.3.29.tar.bz2
cd php-5.3.29
./configure --with-mysql --with-apxs2=/usr/bin/apxs --with-tsrm-pthreads --enable-maintainer-zts --with-libdir=/usr/lib/x86_64-linux-gnu/ #Note extra options cf. other answer
make -j
sudo checkinstall
sudo a2enmod php5

Finally, you'll have to add the line

AddType application/x-httpd-php .php

to /etc/apache2/apache2.conf using your favorite editor. Add it near the bottom.

After that, do a

sudo service apache2 restart

And php 5.3.29 should be installed.

The above was tested on 18.04. You probably want other php modules as well, which has to be enabled with ./configure. Which depends on the code you plan to run.

| improve this answer | |
  • its worked for me.. Thanks for helping... – sgor Jul 18 '19 at 4:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.