Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I'm trying to get mysql native driver support on my new debian squeeze LAMP server and for the life of me I can't get it to work. php mysqli fetch_all is heavily used in my code so I need mysqlnd support. I've installed the php5-mysql package via apt-get which according to everything I've read has support for mysqli but I still cant get fetch_all() to work. There must be something obvious that I'm missing.
Thanks for the help.
Use alternative repositories such as:
DotDeb
http://dotdeb.org
See "Instructions" page, or download package.
ONE2TEAM
http://deb.one2team.ru
(mirror of dotdeb's php5, and some other php modules)
I was recently looking into this as well. There doesn't seem to be support for it in the regular Debian packages in Squeeze. The are adding it to testing and unstable through an alternative package, php5-mysqlnd.
You could try to find third-party php packages, or you could always build php yourself with support for mysqlnd. This was in a reply from the package maintainer.
apt-get install php5-dev
cd /tmp
apt-get source php5
cd /tmp/php5-5.3.6/ext/mysqlnd
mv config9.m4 config.m4
sed -ie "s{ext/mysqlnd/php_mysqlnd_config.h{config.h{" mysqlnd_portability.h
phpize
./configure
cd /tmp/php5-5.3.6/ext/mysql
phpize
./configure --with-mysql=mysqlnd
make && make install
cd /tmp/php5-5.3.6/ext/mysqli
phpize
./configure --with-mysqli=mysqlnd
make && make install
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
I a2enmod php7.4 and a2dismod php7.3 on apache & Ubuntu and my Wordpress sites stopped working saying cannot connect to database.
Upon further investigation through phpinfo mysqli is not enabled with php7.4. If I reenable php7.3 then mysqli is enabled, switch back to 7.4 and nothing.
I have tried looking at php.ini and adding:
extension=php_mysqli
extension=php_mysqli.so
No change.
I have tried running sudo apt-get install php-mysql and it says it is already installed.
I have tried running sudo apt-get install php7.4-mysql and it says that doesn't exist.
Does php7.4 not support mysqli at all?
OK I've found it.
Need to add repository: sudo add-apt-repository ppa:ondrej/php
Then sudo apt-get install php7.4-mysql
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I have some problems with installing a php 7 64bits or any php that uses 64bits .
I require 64 bits because the value that is returning to my DB is too big for a 32 bits and I can't make it smaller to fit for a 32 bits .
Can anyone give me an tutorial for a installation of php 7 64bits for Debian 7 ?
I tried using this :
`apt-get install -y php7.0
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.0 : Depends: libapache2-mod-php7.0 but it is not going to be installed or
php7.0-fpm but it is not going to be installed or
php7.0-cgi but it is not going to be installed
Depends: php7.0-common but it is not going to be installed
E: Unable to correct problems, you have held broken packages.`
And this is the repository add-apt-repository ppa:ondrej/php
First, make sure you are using a Debian Linux install that is 64-bit. You can find out by running "uname -a". If you see "x86_64" in the response you are good.
Second, do you really need PHP 7 on Debian 7?
If PHP 5/Debian 7 can work, you can do a simple "apt-get install php5" to install PHP. I would recommend using the Dotdeb repository. It contains more recent versions of PHP compared to the standard Debian repos. The following URL will contain instructions on how to set it up on your server. https://www.dotdeb.org/instructions/
If you can upgrade to Debian 8, Dotdeb repo already has PHP7. You can simply do "apt-get install php7" to install it.
Third, if you really want PHP 7 on Debian 7, you can compile it yourself. The following link has instructions on how to do that. https://github.com/drj-io/php7-debian-build
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
How do I install a PHP extension from Github onto my server. I'm testing out PHP7 and wanted to install https://github.com/mkoppanen/imagick/tree/phpseven but there is no documentation on how to install it on linux.
Probably a newbie question but would really appreciate the help.
Thank you!
If you're using phpbrew you can use the ext install command, like so:
$ phpbrew ext install <provider>:<organization>/<repository> <tag|branch>
By example:
# install imagic from 'phpseven' branch
$ phpbrew ext install github:mkoppanen/imagick phpseven
# install xdebug beta (compatible with PHP7)
$ phpbrew ext install github:xdebug/xdebug XDEBUG_2_4_0beta1
# install phalcon framework from 'phalcon-v2.0.8' tag
$ phpbrew ext install github:phalcon/cphalcon phalcon-v2.0.8
# install php-ast extension from master
$ phpbrew ext install github:nikic/php-ast
PS: I do help to maintain the phpbrew project and I'm not saying this is the only way to achieve what you asked. But it's certainly one of the easiest ways to try extensions and php versions once you have your environment set up :)
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I need to install clamav to be used on php. How can I do it? I have tried to google how to install clamav, but most instructions either install clam av correctly, but not the php package, or missing dependencies, or similar problems.
You just need to install ClamAV like normal (with the epel repo)...
yum install clamav
yum install clamav-devel
If you don't have EPEL you can get it from IUS community (if you want you can also grab the IUS repo and get the latest version of PHP) - thank the RackSpace engineers for this!
wget http://dl.iuscommunity.org/pub/ius/stable/CentOS/6/x86_64/epel-release-6-5.noarch.rpm
rpm -ivh epel-release-6-5.noarch.rpm
Then you download and install this library, which will handle all the hard things for you.
wget **the direct link you got**
tar -xvzf php-clamav_0.15.7.tar.gz
cd php-clamav-0.15.7
phpize
./configure
make
make install
Now add the extension to your /etc/php.ini
extension=/usr/lib64/php/modules/clamav.so
Remember to change the path to what was given to you by make install
then restart your Apache
service httpd restart
Make a file with the contents:
<?php
echo cl_info();
It should come up with something like this:
Now you should have access to all the library functions, you can now scan files like this:
$retcode = cl_scanfile($file, $virus_name);
if ($retcode === CL_VIRUS)
{
echo "Virus Detected! {$virus_name}";
}
Congratulations! You can find other functions here
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
I need to install a version of PHP that has been compiled to work with Postgres, unlike the default version that came with my Mac Leopard system. How can I do this without somehow disabling the httpd.conf and php.ini files or confusing the system due to having so many of them?
I used homebrew to do this:
brew install https://github.com/adamv/homebrew-alt/raw/master/duplicates/php.rb --with-mysql --with-intl --with-apxs2=/usr/sbin/apxs --enable-cli --enable-mbregex --with-pgsql
this shouldn't replace the existing php.ini file, but if you want to be careful, you can make a copy first. it doesn't affect httpd.conf
more detailed explanation
MacPorts creates an entirely separate install tree for its packages:
sudo port install php5-postgresql
will install everything you need. Your php.ini, for example, will be in /opt/local/etc/php5/php.ini.
Get MacPorts from here: MacPorts