why enabling pdo drivers did not works in php.ini file - php

I have a problem saying pdo exception. could not find driver I tried un- commenting and adding drivers/libraries in php.ini file. Still the error is same. below are a few lines of my php.ini file.
I even tried installing pdo drivers with the following command.
sudo apt-get install php5-mysql then i got another list of errors. the error is also posted below. Seriously out of clue. Please help me here
I have my laravel5 on port 8000 (i run the app by localhost:8000)
and phpmyadmin is operated on localhost:8080
;extension=php_openssl.dll
;extension=php_pdo_firebird.dll
extension=php_pdo_mysql.dll
extension=pdo.so
extension=pdo_mysql.so
;extension=php_pdo_oci.dll
;extension=php_pdo_odbc.dll
usman#usman-cs:~/lampstack-5.5.26-0/php$ sudo apt-get install php5-mysql
[sudo] password for usman:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
php5-mysql : Depends: libmysqlclient18 (>= 5.5.24+dfsg-1) but it is not going to be installed
Depends: php5-common (= 5.5.9+dfsg-1ubuntu4) but 5.5.9+dfsg-1ubuntu4.13 is to be installed
E: Unable to correct problems, you have held broken packages.

Related

How to download php7.2-gd extension in ubuntu 21.04?

I want to install gd extension in my current php-project(php version is 7.2.34) for that i use this command sudo apt-get install php7.2-gd it's throwing following error and it's not showing in the list when i run php -m command ,How to install gd extension please help me to fix this issue..
Error
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
php7.2-gd : Depends: libjpeg62-turbo (>= 1.3.1) but it is not installable
E: Unable to correct problems, you have held broken packages.
This package depends on libjpeg62-turbo so you need to install it first
wget http://ftp.debian.org/debian/pool/main/libj/libjpeg-turbo/libjpeg62-turbo_1.5.1-2_amd64.deb
sudo apt-get install ./libjpeg62-turbo_1.5.1-2_amd64.deb
after that, you could install your package easily
sudo apt-get install php7.2-gd

I ran apt-get dist-upgrade and my php stop working

I have searched but couldn't find a resource that helped, so I have to say it out loud. Please help me. I mistakenly ran sudo apt-get upgrade -u dist-upgrade
After that, all the websites on my server stopped working. I tried to check if Php is still installed by typing php -vbut I got
-bash: php: command not found
I also tried to reinstall php using
sudo apt-get install php
And I saw this
sudo apt-get install php
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
php : Depends: php7.2 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Then I tried running
Sudo apt-get install php7.2
And I saw this
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
php7.2 : Depends: libapache2-mod-php7.2 but it is not going to be installed or
php7.2-fpm but it is not going to be installed or
php7.2-cgi but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
I also tried installing the modules: and I get this:
root#matrixpluspluto:~# sudo apt-get install php7.2 php7.2-cli php7.2-c
gi php7.2-fpm libapache2-mod-php7.2 php7.2-opcache
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libapache2-mod-php7.2 : Depends: libc6 (>= 2.27) but 2.24-11+deb9u1 is to be installed
Depends: libsodium23 (>= 1.0.14) but it is not going to be installed
php7.2-cgi : Depends: libc6 (>= 2.27) but 2.24-11+deb9u1 is to be installed
Depends: libsodium23 (>= 1.0.14) but it is not going to be installed
php7.2-cli : Depends: libc6 (>= 2.27) but 2.24-11+deb9u1 is to be installed
Depends: libsodium23 (>= 1.0.14) but it is not going to be installed
php7.2-fpm : Depends: libc6 (>= 2.27) but 2.24-11+deb9u1 is to be installed
Depends: libsodium23 (>= 1.0.14) but it is not going to be installed
php7.2-opcache : Depends: libc6 (>= 2.27) but 2.24-11+deb9u1 is to be installed
E: Unable to correct problems, you have held broken packages.
I checked and saw that libc6 v2.24 is already installed
Please help me. Before this I was using php7.1 after the upgrade I started seeing 7.2. Anything I do concerning php doesn't work out. Pove been trying to fix this for more than 2 days, please help.
Don't know if you solved it yet but I had the same problem.
Solved it by running :
sudo apt-get purge php* .
Note that this is not a good solution but a desperate one. Also I knew what php related packages I had installed, so I wasen't afraid of what the command would purge.
Then I watched what packages are being purged and reintalled them.
Everything working fine for now.

Cannot install php5-mysql in raspbian

I have been trying to install php5-mysql in order to run an owncloud server, but every time I try it shows a dependency error, view it here:
pi#raspberrypi:/var/www/html $ sudo apt-get install php5-mysql
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
php5-mysql : Depends: libmysqlclient18 but it is not installable
E: Unable to correct problems, you have held broken packages.
I am inputting the command sudo apt-get install php5-MySQL. I have looked for the dependency but so far haven't found it and tried to install it using synaptic but it shows the same error. Do I need to use something different as is this out of date or has been removed? The tutorial I am following to run owncloud on my pi is available here
If there any detail I need to provide I will do so, I would just like to know how to obtain that dependency or a suitable alternative for owncloud on raspberry pi.

Installation pdo_pgsql in Ubuntu10 not working

Am trying to install pdo_pgsql in ubuntu 10.04 and PHP 5.4.37. Actually the postgresql is installed and working properly with phppgadmin.
Now the problem is the pdo driver for pgsql is missing.
I installed pdo for pgsql, when I enter pecl install pdo_pgsql
# sudo pecl install pdo_pgsql
`pecl/pdo_pgsql is already installed and is the same as the released version 1.0.2
And also added a new pgsql.ini file in /etc/php5/apache2/conf.d/ as
extension=pdo_pgsql
when I run phpinfo()
I can able to see
/etc/php5/apache2/conf.d/pgsql.ini,
in Additional .ini files parsed
But I can't able to see the drivers loaded in PDO, only mysql and sqlite have been loaded.
Additional Message I got from server,
PHP Warning: PHP Startup: pdo_pgsql: Unable to initialize module
Module compiled with module API=20090626
PHP compiled with module API=20100525
These options need to match
in Unknown on line 0
FYI,
Even I tried
# sudo apt-get install php5-pgsql
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
php5-pgsql: Depends: phpapi-20090626
Depends: php5-common (= 5.3.2-1ubuntu4.30) but 5.4.37-1+deb.sury.org~lucid+1 is to be installed
E: Broken packages
Please suggest me how to proceed further.
I even restarted the apache and server itself.
Thanks
apt-get install php5-pgsql
Try this
-----------------------------------------REMOVE
sudo apt-get purge php5-pgsql
Use this to remove pgsql
Depend what php try with php5-pgsql php-pgsql php4-pgsql

The following packages have unmet dependencies

I'm trying to install GMP on Ubuntu 14.04:
$ sudo apt-get install php5-gmp
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
php5-gmp : Depends: php5-common (= 5.5.9+dfsg-1ubuntu4.5) but 5.5.17+dfsg-2+deb.sury.org~precise+1 is to be installed
E: Unable to correct problems, you have held broken packages.
Why is it not letting me install this?
somehow you have installed a special version of php-common (= 5.5.17+dfsg-2+deb.sury.org~precise+1)
try to
apt-get remove php5-common
and then install again.
Your installation appears to be broken by php5-common-5.5.17+dfsg-2+deb.sury.org~precise+1 package installed from some alien repo.
Try to start with:
sudo apt-search php5
remove everything looking suspicious and then reinstall it from the official repo. I think, simple removal of this alien common and reinstalling gmp might resolve an issue.

Categories