Amazon EC2: PHPMyAdmin Error: The mbstring extension is missing - php

I know that many people has asked this question, But I believe that its all old answers, nothing worked here ..
When I've installed PhPMyadmin 4.7.0 I got this message:
The mbstring extension is missing. Please check your PHP configuration.
I tried to search on all answers, but nothing changed:
Some people asked to fix some issues in this file: /etc/httpd/conf.d/phpMyAdmin.conf
But I dont have this file at all!
Some people said that this line can fix: yum install php56-mbstring
but its not fixed.
My php-v said:
PHP 5.6.29 (cli) (built: Jan 18 2017 19:08:44)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
now what to do? How I can fix it

I found the answer:
In this page:
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/install-LAMP.ht‌​ml
Instead of using this command: sudo yum install -y httpd24 php70 mysql56-server php70-mysqlnd
I used this one:
sudo yum install -y httpd24 php56 mysql55-server php-56-mysqlnd
Then follow all steps in this link:http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/install-LAMP.ht‌​ml

Related

Can't update from php 5.5.12 - Ubuntu 16.04

I'm trying to update php. When I check my php version, it returns:
php -v
PHP 5.5.12 (cli) (built: Mar 10 2017 16:27:17)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
So I added ondrej's repository
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php7.0
But STILL:
php -v
PHP 5.5.12 (cli) (built: Mar 10 2017 16:27:17)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
I don't know what to do anymore... Already tried purge, everything... this php doesn't upgrade, it remains this version. Any ideas?
If you have this problem while upgrading from PHP5 to PHP7 on Ubuntu 16.04
with Apache, here's what helped me (credit goes here):
Disable PHP5 module on Apache:
sudo a2dismod php5
Now enable PHP7:
sudo a2enmod php7.1
To reflect changes Apache restart is required:
sudo systemctl restart apache2
By the way run phpinfo() in your script take a look which version is this running. Command line php is a complete separate system
Try to run First :
sudo apt-get upgrade
And then : For PHP 5.5, PHP 5.6 and PHP 7.0:
sudo apt-add-repository ppa:ondrej/php
You have flipped "apt" and "add". Please take a look at your command.
Then the other steps that you made.

PHP 5 Upgrade On Ubuntu Not Working With Magento

I had an outdated version of PHP on my system, so attempted to upgrade from 5.5.9 to 5.6.
I followed the following steps on my Digital Ocean Ubuntu droplet:
I installed Ondřej Surý's PPA and selected 5.6 as well as other packages related to the main one, like the XML package.
When I do php -v on my server, it says
PHP 5.6.29-1+deb.sury.org~trusty+1 (cli)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies
This indicated to me that the update went through.
But when I restart my apache server and check the error logs, it says
Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.20 configured -- resuming normal operations
I believe the latest version of Magento on my server is giving me this error (HTTP 500) because it is using the wrong version of PHP...
How do I fix this? Thank you.
The digital ocean community site here offered a couple of extra commands:
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php5.6 php5.6-mbstring php5.6-mcrypt php5.6-mysql php5.6-xml
sudo a2dismod php5
sudo a2enmod php5.6
sudo service apache2 restart
Note the a2dismod and a2enmod steps. The post says:
Without the a2dismod/a2ensmod steps, Apache will continue to see your older version of PHP, even if command line is seeing the new version.

Attempted to call function "curl_init"

I know this question was answered a lot of times here but I tried many things and I cannot fix it.
I am developing using symfony 3.
First of all I thought I hadn't php-curl so, I decided to install it doing
sudo apt-get install php-curl
It worked! So, I restarted Apache... and tried again.. and the error jumped again. I saw too I should "delete" the ; of a php.ini line but... surprise! There is not any line with:
;extension=php_curl.dll
I thought then maybe I didn't really install php-curl... so I did:
var_dump(extension_loaded('curl'));
And the answer is:
Current PHP version: 5.6.23-1+deprecated+dontuse+deb.sury.org~trusty+1
EDIT: I followed this:
And now appears
Current PHP version: 5.6.26-1+deb.sury.org~xenial+1
Then I tried to:
sudo apt-get install php5-curl
And is happens:
tureey#tureey:~$ sudo apt-get install php5-curl
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package php5-curl
Actually these are my software stats:
Distributor ID: Ubuntu
Description: Ubuntu 16.04.1 LTS
Release: 16.04
Codename: xenial
And after do:
php -v
PHP 5.6.23-1+deprecated+dontuse+deb.sury.org~trusty+1 (cli)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies
I did and upgrade and update but nothing changes... any solution?
Correct package should be php5.6-curl

How to install xdebug in ubuntu 16.04 in netbeans?

Whenever I try to run this code
example#testserver:~$ sudo apt-get install php5-xdebug
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package php5-xdebug
I get this error "E: Unable to locate package php5-xdebug"
Please help
Thanks
If you're running the default apt installation of PHP on Ubuntu 16.04, then it should be PHP7. If I had to guess from php5-xdebug, then I'd say you were using a command intended for Ubuntu 14.04 or older where the default PHP installation was PHP5. You can verify your PHP version with:
php --version
This is what I see:
PHP 7.0.8-0ubuntu0.16.04.2 (cli) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
with Zend OPcache v7.0.8-0ubuntu0.16.04.2, Copyright (c) 1999-2016, by Zend Technologies
with Xdebug v2.4.0, Copyright (c) 2002-2016, by Derick Rethans
At any rate, you should be able to search available packages for your configuration with:
apt search xdebug
From my relatively fresh Ubuntu 16.04 install without any added PPA's, I get one result:
php-xdebug - Xdebug Module for PHP
So you can install this package by name (note the missing "5" from your command):
sudo apt install php-xdebug
You might also have to restart your webserver. If you're running the stock build of Apache for Ubuntu 16.04:
sudo service apache2 restart

Uninstalling php 5.3 in ubuntu 14.04

I have installed php 5.3 manually by executing commands like make & make install. But I need to upgrade it to v5.5 therefore I deleted all the directories related to php5 using sudo command.
But when I run php -v Still I am getting
PHP 5.3.29 (cli) (built: Jun 8 2015 05:53:32) Copyright (c) 1997-2014 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2014 Zend Technologies
Please help me to remove
The below answer credit goes to Maythux
To uninstall something you installed from source, you would use cd back into the directory you built it from and then run sudo make uninstall but I don't think this will work with PHP since it doesn't have an uninstall.
So what you can do is to make a package from the existing compiled version you have and then you could install the new created package over the old one, and if this works you can remove it. First install checkinstall if you dont have it:
sudo apt-get install checkinstall
Then run:
cd php-5.3.29
sudo checkinstall
Accept all the defaults.The result will be a phpXX.deb package, so try to install it, this will replace the old files from the compiled package:
sudo dpkg -i phpXX.deb
If this goes smooth then you are near to have it. Now purge the package:
sudo apt-get purge phpXX.deb
What to do if this doesn't work
you should remove all files manually
locate php5
Then remove the files and install a new version with apt-get again

Categories