Monday, 7 April 2014

Check your PHP Setup for MySQL support

<? phpinfo() ?>

If not enabled

 
Very rare since a MySQL client library is distributed with PHP and built into PHP by default.


However, it is possible to build PHP without MySQL support. Some possible fixes:


apt-get install php-mysql
rpm -Uvh php-mysql-4.2.2-1.i386.rpm
./configure --with-mysql=shared,/usr
cp modules/mysql.so /usr/local/lib/php
extension_dir=/usr/local/lib/php
extension=mysql.so


- 3 -


Slide 3/64 December 6, 2002 Sanity Check
Make sure MySQL is running
prompt:~> mysqlshow
+-----------+
| Databases |
+-----------+
| mysql |
| test |
+-----------+


Or with the latest PHP
<? echo mysql_stat() ?>
Output:


Uptime: 6717 Threads: 1 Questions: 1 Slow queries: 0 Opens: 6 Flush tables: 1
Open tables: 0 Queries per second avg: 0.000


"News Powered By"
 


No comments:

Post a Comment

About Me

Popular Posts

Designed By Seo Blogger Templates