LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   how to reconfigure php? (https://www.linuxquestions.org/questions/linux-software-2/how-to-reconfigure-php-549095/)

ZAMO 04-26-2007 02:34 AM

how to reconfigure php?
 
hai,


how can i installed mysql recently. i want php to accept mysql .how can i reconfigure PHP to recognize mysql.
i had
PHP 4.3.9
MySQL-client-standard-4.1.22-0.rhel4
MySQL-server-standard-4.1.22-0.rhel4


Advise are invited...

the_ajp 04-26-2007 02:52 AM

did you compile from source ??
if so reconfigure with

./config.nice --with-mysql

if you installed a binary package you should make a test page containing

<?php

phpinfo();

?>

and look in there if it has been compiled with mysql bindings.

g'luck.

avallach 04-26-2007 02:52 AM

Edit your php.ini file, there are many options for mysql.
The most importtant are extension to communicate with your mysql:
Code:

extension=mysql.so
extension=pdo_mysql.so # if you want to use pdo

Of course if it has mysql support compiled in :)

ZAMO 04-26-2007 04:20 AM

hai Avallach,
After i did waht you told above, am getting the following errors. why?
# php -v
PHP Warning: Unknown(): Unable to load dynamic library '/usr/lib/php4/mysql.so' - /usr/lib/php4/mysql.so: file too short in Unknown on line 0
PHP 4.3.9 (cgi) (built: Nov 24 2004 08:48:16)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
[root@mani php4]#

avallach 04-26-2007 07:46 AM

What distro do you use ? Maybe you don't have php compiled with mysql support have you got libmysqlclient installed AFAIR remember it is also required


All times are GMT -5. The time now is 08:08 PM.