PHP problem
I have an error encountered in my PHP it seems that i need to install PHP with mysql support. I have an existing PHP5 and Mysql and i dont know if my mysql have a support. how can i do that php5 w/ mysql support?? can anyone teach me the step by step im only newbie and i dont have any idea whats going on but i really need this.. Could anyone help me bout my problem?..tnx a lot
|
what does the output of
<?php phpinfo(); ?> say regarding mysql? |
Usually php has mysql support by default. You could look in /etc/php.ini and
/etc/php.d/mysql.ini for more info. Also phpinfo function will give you the required information. |
Not always, my server had MySQL and PHP but lacked the php-mysql module and thus PHP failed to communicate with MySQL
Distribution would also help to know. I'd suggest a missing MySQL module for PHP, which is very very easy to fix with a package manager. |
Did you check that mysql is running? Running
Code:
ps aux | grep mysql |
if it is redhat or fedora, u can use rpm to check whether php-mysql module is installed.
rpm -q php-mysql |
PHP error.
YOYO123Fullname:
Fatal error: Call to undefined function mysql_connect() in /var/www/html/GetTime2.php on line 63 this is the I saw in my php info... what should i do?? |
Look at line 63. What does it say? Without the code no one here can tell you what went wrong with your code.
Also post the contents of file /etc/php.d/mysql.ini |
Quote:
|
Thats why the contents of the file that I said. If it has got the php-mysql module installed it will have the extension=mysql.so or something there.
If the distro is Debian based or Ubuntu like sudo apt-get install php-mysql should do it. If it is something else Fedora or RH or CentOS yum install php-mysql should do it. Or else find the binary package if available and install. |
All times are GMT -5. The time now is 08:40 AM. |