can i run a php program to connect to mysql db 4.0 in terminal
I found a solution to run php codes from terminal and it works.Thanks.But when i write a program in php that contains mysql database connection stuffs,and i try to run that from terminal,but it gives me error as following :-
Call to undefined function: mysql_connect() in /home/supritip/public_html/test |
Quote:
|
make a test php page and put a call to phpinfo() in it. you should see there if you have mysql support.
or you could try this.. php -r "phpinfo();" | grep MYSQL |
Quote:
|
Hi,
Thanks for all your suggestions. yes i have downloaded CLI and also installed.The problem is that inside php it creates another php.ini,which is used when i run php samples from commend prompt.And in that php.ini mysql support was not there.Also when i locate php.ini in terminal it is not showing that php.ini resides in that cli folder.Any way i find it and set mysql support for php on and it works.Its great that i found this myself.And i m very happy. Still thanks for all your help.I m happy that so many people replied to my question.:) |
All times are GMT -5. The time now is 07:12 AM. |