GIT – Q. I have Apache Web server and configured. Everything works fine except I am not able to connect to a database server (I am able to connect server with client). So how do I configure or connect scripts?

A. You need to MySQL module for php4 or php5. Without php-mysql shared object or module, php scripts won’t able to connect to MySQL database server.

Debian / User

To install type the following command:
# apt-get install php4-mysql
if you are using PHP5, enter:
# apt-get install php5-mysql

RHEL <= 4 user

If you are using Red Hat Linux:
# up2date php-mysql

If you are using Fedora / / RHEL 5 Linux:
# yum install php-mysql
Restart apache to take effect. Now you will be able to connect MySQL via PHP scripts.
# service restart

Print Friendly

Comments

comments

Bài viết liên quan