I am new to Ubuntu and PHP i need install PHP 5.3.10 on Ubuntu 14.04.I tried
several ways
1.apt-get install php5 (it is installing php 5.5.9 it is not version what i need )
2.sudo -i
wget http://in1.php.net/distributions/php-5.3.10.tar.bz2
tar -xvf php-5.3.10.tar.bz2
cd php-5.3.10
./configure
make
make install
(when it run "make" command it is given error)
3.sudo add-apt-repository ppa:eugenesan/ppa
sudo apt-get update
sudo apt-get install php5
(it is also not working for me )
any can tell how install php 5.3.10 on Ubuntu 14.04 step by step
Thank you
This will install php 5.3.10 version.on Ubuntu 14.04
Download shell script from this link. once you have that .sh downloaded file. you need to change the permission using this command
sudo chmod 755 php5_4_downgrade_5.3.sh
Next you can run the script using this command
sudo sh php5_4_downgrade_5.3.sh
Related
The error I'm facing is on Gitpod with PHP version, so the question is, how can I delete PHP completely from the workspace or replace it? Basically, I want to downgrade it.
I want to replace PHP with an older version. Unfortunately, I’m not able to get rid of the default PHP version 7.4 of the MySQL workspace.
I tried nearly every style of removing it in my .gitpod.Dockerfile file.
I activated the Feature Preview to have sudo support and I uninstalled every PHP version via gitpod dockerfile and ran
sudo apt-get purge ‘php*’
in the command line. It just says that no PHP is installed, but
whereis php
still gives me the output.
php -v
always gives me PHP v7.4
To install another php version is possible (e.g. with brew) but without removing the old one, I don’t know how I could use the new one.
Could someone please tell me, how can I downgrade this PHP version in "GITPOD" by replacing it or some other way?
Edit:
this was the code I was trying to run:
FROM gitpod/workspace-mysql
USER root
RUN sudo add-apt-repository ppa:ondrej/php
RUN sudo apt-get -y update
RUN sudo apt-get -y install php7.2
RUN sudo update-alternatives --set php /usr/bin/php7.2
RUN sudo a2dismod php7.4 RUN
sudo systemctl restart apache2
USER gitpod
Thanks in advance.
Best Regards
The problem is the install command. because of the script that runs in the background.
So the solution is running the following command instead of running apt-get install
install-packages php7.2
details of the answer could be found in the following thread:
Downgrade default PHP v7.4.3 to 7.1.3 or 7.2
I have been trying to update PHP on my install of WordPress on Google Cloud.
I have followed these instructions: How do I upgrade from PHP 7.0 to 7.3 on google cloud platform?.
When I do a php -v command, it shows that it is updated, but within WordPress it is still showing version 7.0, not the updated version.
Your system appears to have two installations of PHP. One for the CLI and another Apache or you have not restarted Apache after the update. First restart Apache and recheck.
The command to install Apache PHP is sudo apt install libapache2-mod-php7.3.
Warning: Be careful with manual updates of PHP and other software that may have interdependencies. Make sure you have backed up your system (image) before so that you can recover is something goes wrong. Debian 4.9 is very old (obsolete) and might not be supported or even tested with the latest versions of third-party software.
The Linux command where php will tell you where PHP is installed. To figure out if you have a different installation for Apache, create a new web page, such as myphpinfo.php with the following contents. Then use your browser to view the page:
<?php
// Show all information, defaults to INFO_ALL
phpinfo();
?>
Your browser will display a page like this:
Use SSH commands:
Go to root
sudo -i
install latest version of php
apt-get install php7.4
update it
apt-get update
install packages
apt-get install ca-certificates apt-transport-https
wget -q https://packages.sury.org/php/apt.gpg -O- | sudo apt-key add -
echo "deb https://packages.sury.org/php/ stretch main" | sudo tee /etc/apt/sources.list.d/php.list
check your php version
php -v
enable php7.4 and disable your current php7.0
sudo a2dismod php7.0
sudo a2enmod php7.4
install the libraries
sudo apt-get install phpmyadmin php-mbstring php-gettext
sudo apt-get install php-mysql
sudo apt-get install php-curl
sudo apt-get install php-xml
sudo apt-get install php-gd
restart apache
sudo service apache2 restart
I have a Laravel project that uses a specific library that uses php 7.2.10.
You will need to install php7.2.10 on your server (Does not work with the Laravel library, so will not install a new version of PHP).
I tried the following command but it doesn't work (I installed a new version of PHP 7.2.24 on the server, maybe I can remove it).
wget http://be.php.net/distributions/php-7.2.10.tar.gz
tar -zxvf php-7.2.10.tar.gz
cd php-7.2.10/
./configure --prefix=/usr/local/bin/php && make && make install
I can´t use version 7.2.24 that is already installed in my server. I need 7.2.10 version
Try diabling unwanted php versions
sudo a2dismod php7.2.24
and enable the version you need
sudo a2enmod php7.2.10
Finally i make it work. I completely remove php7.2 (In my case the installed one was 7.2.24) and then i repeat the command line steps:
wget http://be.php.net/distributions/php-7.2.10.tar.gz
tar -zxvf php-7.2.10.tar.gz
cd php-7.2.10/
./configure --prefix=/usr/local/bin/php && make && make install
sudo service apache2 restart
After that i enable new php version by
sudo a2enmod php7.2
sudo service apache2 restart
I had LAMP Server installed on Ubuntu 12.10 with PHP 5.3. I had to remove it so i used this link.
Now I am trying to install LAMP with PHP 5.4 or higher using the ondrej ppa but i end up installing 5.3.10 again and again. I install using the below commands :
for 5.5 i tried,
sudo add-apt-repository ppa:ondrej/php5
and for 5.4 i tried,
sudo add-apt-repository ppa:ondrej/php5-oldstable
and then the regular update and install
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install php5
However in the end when i run php -v i see that the version installed is 5.3.10-1ubuntu3.19
I have tried restarting the web server. still noting changes. I dont know where it is going wrong.
I am using PhpStorm on Linux Mint 16. I created a Hello World, but am struggling to run it. I am getting an error "PHP Interpreter is not installed. Press 'Fix' to edit your project configuration."
When I hit "Fix", I get:
Any ideas how to fix this? There are no Interpreter options.
You should install PHP. Your IDE is not responsible for that, you need to do it yourself.
See this site for instructions: http://community.linuxmint.com/tutorial/view/486
Update:
Add PHP interpreter following: https://www.jetbrains.com/phpstorm/webhelp/enabling-php-support.html
PHP home could be set to /usr/bin on linux.
i did this
sudo apt-get install php5-dev
sudo apt-get install php-pear
sudo apt-get install php5-cgi
then add interpreter and php was under the /usr/bin